"Fossies" - the Fresh Open Source Software Archive

Member "Atom/resources/app/apm/node_modules/invert-kv/index.js" (7 Feb 2017, 229 Bytes) of archive /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 module.exports = function (obj) {
    3     if (typeof obj !== 'object') {
    4         throw new TypeError('Expected an object');
    5     }
    6 
    7     var ret = {};
    8 
    9     for (var key in obj) {
   10         var val = obj[key];
   11         ret[val] = key;
   12     }
   13 
   14     return ret;
   15 };