diff options
Diffstat (limited to 'node_modules/map-obj')
-rw-r--r-- | node_modules/map-obj/index.js | 13 | ||||
-rw-r--r-- | node_modules/map-obj/license | 21 | ||||
-rw-r--r-- | node_modules/map-obj/package.json | 36 | ||||
-rw-r--r-- | node_modules/map-obj/readme.md | 29 |
4 files changed, 0 insertions, 99 deletions
diff --git a/node_modules/map-obj/index.js b/node_modules/map-obj/index.js deleted file mode 100644 index 8b7b4d6..0000000 --- a/node_modules/map-obj/index.js +++ /dev/null @@ -1,13 +0,0 @@ -'use strict'; -module.exports = function (obj, cb) { - var ret = {}; - var keys = Object.keys(obj); - - for (var i = 0; i < keys.length; i++) { - var key = keys[i]; - var res = cb(key, obj[key], obj); - ret[res[0]] = res[1]; - } - - return ret; -}; diff --git a/node_modules/map-obj/license b/node_modules/map-obj/license deleted file mode 100644 index 654d0bf..0000000 --- a/node_modules/map-obj/license +++ /dev/null @@ -1,21 +0,0 @@ -The MIT License (MIT) - -Copyright (c) Sindre Sorhus <sindresorhus@gmail.com> (sindresorhus.com) - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. diff --git a/node_modules/map-obj/package.json b/node_modules/map-obj/package.json deleted file mode 100644 index d178305..0000000 --- a/node_modules/map-obj/package.json +++ /dev/null @@ -1,36 +0,0 @@ -{ - "name": "map-obj", - "version": "1.0.1", - "description": "Map object keys and values into a new object", - "license": "MIT", - "repository": "sindresorhus/map-obj", - "author": { - "name": "Sindre Sorhus", - "email": "sindresorhus@gmail.com", - "url": "sindresorhus.com" - }, - "engines": { - "node": ">=0.10.0" - }, - "scripts": { - "test": "node test.js" - }, - "files": [ - "index.js" - ], - "keywords": [ - "map", - "obj", - "object", - "key", - "keys", - "value", - "values", - "val", - "iterate", - "iterator" - ], - "devDependencies": { - "ava": "0.0.4" - } -} diff --git a/node_modules/map-obj/readme.md b/node_modules/map-obj/readme.md deleted file mode 100644 index fee03d9..0000000 --- a/node_modules/map-obj/readme.md +++ /dev/null @@ -1,29 +0,0 @@ -# map-obj [](https://travis-ci.org/sindresorhus/map-obj) - -> Map object keys and values into a new object - - -## Install - -``` -$ npm install --save map-obj -``` - - -## Usage - -```js -var mapObj = require('map-obj'); - -var newObject = mapObj({foo: 'bar'}, function (key, value, object) { - // first element is the new key and second is the new value - // here we reverse the order - return [value, key]; -}); -//=> {bar: 'foo'} -``` - - -## License - -MIT © [Sindre Sorhus](http://sindresorhus.com) |