]> gerrit.simantics Code Review - simantics/district.git/blobdiff - org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/object/to-array.js
Adding integrated tile server
[simantics/district.git] / org.simantics.maps.server / node / node-v4.8.0-win-x64 / node_modules / npm / node_modules / node-gyp / node_modules / path-array / node_modules / array-index / node_modules / es6-symbol / node_modules / es5-ext / object / to-array.js
diff --git a/org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/object/to-array.js b/org.simantics.maps.server/node/node-v4.8.0-win-x64/node_modules/npm/node_modules/node-gyp/node_modules/path-array/node_modules/array-index/node_modules/es6-symbol/node_modules/es5-ext/object/to-array.js
new file mode 100644 (file)
index 0000000..a954abb
--- /dev/null
@@ -0,0 +1,18 @@
+'use strict';
+
+var callable = require('./valid-callable')
+  , forEach  = require('./for-each')
+
+  , call = Function.prototype.call
+
+  , defaultCb = function (value, key) { return [key, value]; };
+
+module.exports = function (obj/*, cb, thisArg, compareFn*/) {
+       var a = [], cb = arguments[1], thisArg = arguments[2];
+       cb = (cb == null) ? defaultCb : callable(cb);
+
+       forEach(obj, function (value, key, obj, index) {
+               a.push(call.call(cb, thisArg, value, key, this, index));
+       }, obj, arguments[3]);
+       return a;
+};