montagejs / collections

This package contains JavaScript implementations of common data structures with idiomatic interfaces.
http://www.collectionsjs.com
Other
2.09k stars 185 forks source link

Add browser support where eval is not allowed by CSP #250

Open mihaicodrean opened 1 year ago

mihaicodrean commented 1 year ago

How about enhancing this: var globalEval = eval, global = globalEval('this'); to this: var globalEval = eval, global = typeof window !== 'undefined' ? window : globalEval('this'); I can create a pull request if that helps adoption.

mihaicodrean commented 1 year ago

To further clarify, eval() is no longer allowed in Thunderbird add-ons, for example.