"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/es5-ext/object/map-keys.js" (25 Apr 2018, 408 Bytes) of package /windows/misc/atom-windows.zip:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) Javascript source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 "use strict";
    2 
    3 var callable = require("./valid-callable")
    4   , forEach  = require("./for-each")
    5   , call     = Function.prototype.call;
    6 
    7 module.exports = function (obj, cb /*, thisArg*/) {
    8     var result = {}, thisArg = arguments[2];
    9     callable(cb);
   10     forEach(
   11         obj,
   12         function (value, key, targetObj, index) {
   13             result[call.call(cb, thisArg, key, value, this, index)] = value;
   14         },
   15         obj
   16     );
   17     return result;
   18 };