+26
.github/workflows/mirror.yml
+26
.github/workflows/mirror.yml
···
···
+2
-2
README.md
+2
-2
README.md
···- Isolate the [global object](https://developer.mozilla.org/en-US/docs/Glossary/Global_object) and uses a separate object using a `with` statement-- Wraps all passed through globals, like `Array`, in a recursive proxy that disallows access to prototype-polluting propeties, such as `constructor`If you haven't run away screaming yet, maybe that's what you're looking for. Just a bit more safety.But really, I wrote this just for fun and I haven't written any tests yet and neither have I tested all edge cases.
···- Isolate the [global object](https://developer.mozilla.org/en-US/docs/Glossary/Global_object) and uses a separate object using a `with` statement+- Wraps all passed through globals, like `Array`, in a recursive masking object that disallows access to object prototype properties+- In the browser: Creates an `iframe` element and uses that frame's globals instead to prvent prototype pollution.If you haven't run away screaming yet, maybe that's what you're looking for. Just a bit more safety.But really, I wrote this just for fun and I haven't written any tests yet and neither have I tested all edge cases.
+2
-1
package.json
+2
-1
package.json
······
······
+132
-60
src/index.ts
+132
-60
src/index.ts
························
··················+const scriptGlobal = new (require('vm').Script)('exports = globalThis').runInNewContext({}).exports;······
+1
-1
tsconfig.json
+1
-1
tsconfig.json
+5
yarn.lock
+5
yarn.lock
···resolved "https://registry.yarnpkg.com/@types/node/-/node-18.0.4.tgz#48aedbf35efb3af1248e4cd4d792c730290cd5d6"integrity sha512-M0+G6V0Y4YV8cqzHssZpaNCqvYwlCiulmm0PwpNLF55r/+cT8Ol42CHRU1SEaYFH2rTwiiE1aYg/2g2rrtGdPA==resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0"
···resolved "https://registry.yarnpkg.com/@types/node/-/node-18.0.4.tgz#48aedbf35efb3af1248e4cd4d792c730290cd5d6"integrity sha512-M0+G6V0Y4YV8cqzHssZpaNCqvYwlCiulmm0PwpNLF55r/+cT8Ol42CHRU1SEaYFH2rTwiiE1aYg/2g2rrtGdPA==+resolved "https://registry.yarnpkg.com/@types/node/-/node-18.0.6.tgz#0ba49ac517ad69abe7a1508bc9b3a5483df9d5d7"+integrity sha512-/xUq6H2aQm261exT6iZTMifUySEt4GR5KX8eYyY+C4MSNPqSh9oNIP7tz2GLKTlFaiBbgZNxffoR3CVRG+cljw==resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0"