ejs
ejs copied to clipboard
feat: use globalThis shim
This supports environments like https://hardenedjs.org/ that support globalThis but do not support getting the global object via the Function constructor.
Seems like it could be a minor security concern, that people could simply declare their own globalThis variable outside the EJS context. Might it not make more sense to inline the (relatively small) code for this polyfill directly into EJS?
This is the code: https://github.com/ungap/global-this/blob/master/esm/index.js