3 ms·
Scopeleaks.js: detect variables leaking into the global scope
- Pewpewarrows 16y agoThis looks pretty neat, especially while we have to wait for Strict Mode to be supported in all the major browsers.
- tlrobinson 16y agoRelated: my "LeakHelper" project, which goes beyond top level global variables by traversing the entire reachable JavaScript object graph, executing a function of your choosing for each object: http://github.com/tlrobinson/leakhelper http://github.com/tlrobinson/leakhelper All it really does is the traversing (but it handles the gory details of that using a couple different set implementations), but it's easy to use it for various purposes like finding newly created objects, or objects you expected to no longer be referenced anywhere (logical memory leaks), etc.
- js4all 16y agoCool helper. Namespace pollution is still an issue even with popular libs.