mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-06 09:47:48 +00:00
Replace window var with root to better grab the global when using custom IIFEs.
Former-commit-id: f79834c6b53d692e85801d6258cd8beb35c776c2
This commit is contained in:
@@ -347,6 +347,7 @@
|
||||
function createContext() {
|
||||
return vm.createContext({
|
||||
'clearTimeout': clearTimeout,
|
||||
'console': console,
|
||||
'setTimeout': setTimeout
|
||||
});
|
||||
}
|
||||
@@ -1376,8 +1377,8 @@
|
||||
|
||||
(function() {
|
||||
var commands = [
|
||||
'iife=this["lodash"]=(function(window){%output%;return _}(this))',
|
||||
'iife=define(function(window){return function(){%output%;return _}}(this));'
|
||||
'iife=this["lodash"]=(function(){%output%;return _}())',
|
||||
'iife=define(function(){return (function(){%output%;return _}())});'
|
||||
];
|
||||
|
||||
commands.forEach(function(command) {
|
||||
@@ -1607,7 +1608,7 @@
|
||||
function strip(value) {
|
||||
return String(value)
|
||||
.replace(/^ *\/\/.*/gm, '')
|
||||
.replace(/\b(?:basicEach|context|forEach|forOwn|window)\b/g, '')
|
||||
.replace(/\b(?:basicEach|context|forEach|forOwn)\b/g, '')
|
||||
.replace(/\blodash\.(createCallback\()\b/g, '$1')
|
||||
.replace(/[\s;]/g, '');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user