mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-03 16:47:49 +00:00
Add bizarro Map.
This commit is contained in:
@@ -422,6 +422,9 @@
|
||||
return !(key == 'valueOf' && this && this.valueOf === 1) && _propertyIsEnumerable.call(this, key);
|
||||
});
|
||||
|
||||
var _Map = root.Map;
|
||||
setProperty(root, 'Map', _.noop);
|
||||
|
||||
var _Set = root.Set;
|
||||
setProperty(root, 'Set', _.noop);
|
||||
|
||||
@@ -441,6 +444,11 @@
|
||||
// Restore built-in methods.
|
||||
setProperty(objectProto, 'propertyIsEnumerable', _propertyIsEnumerable);
|
||||
|
||||
if (_Map) {
|
||||
setProperty(root, 'Map', Map);
|
||||
} else {
|
||||
delete root.Map;
|
||||
}
|
||||
if (_Set) {
|
||||
setProperty(root, 'Set', Set);
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user