summaryrefslogtreecommitdiff
path: root/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/map.js
diff options
context:
space:
mode:
Diffstat (limited to 'tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/map.js')
-rw-r--r--tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/map.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/map.js b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/map.js
new file mode 100644
index 0000000000..6b39d3c94b
--- /dev/null
+++ b/tools/eslint/node_modules/escope/node_modules/es6-map/node_modules/es5-ext/object/map.js
@@ -0,0 +1,15 @@
+'use strict';
+
+var callable = require('./valid-callable')
+ , forEach = require('./for-each')
+
+ , call = Function.prototype.call;
+
+module.exports = function (obj, cb/*, thisArg*/) {
+ var o = {}, thisArg = arguments[2];
+ callable(cb);
+ forEach(obj, function (value, key, obj, index) {
+ o[key] = call.call(cb, thisArg, value, key, obj, index);
+ });
+ return o;
+};