aboutsummaryrefslogtreecommitdiff
path: root/node_modules/invert-kv
diff options
context:
space:
mode:
authorDimitri Staessens <dimitri@ouroboros.rocks>2019-10-06 21:37:45 +0200
committerDimitri Staessens <dimitri@ouroboros.rocks>2019-10-06 21:37:45 +0200
commit3c51c3be85bb0d1bdb87ea0d6632f1c256912f27 (patch)
treec7ccc8279b12c4f7bdbbb4270d617e48f51722e4 /node_modules/invert-kv
parent412c104bebc507bea9c94fd53b5bdc4b64cbfe31 (diff)
downloadwebsite-3c51c3be85bb0d1bdb87ea0d6632f1c256912f27.tar.gz
website-3c51c3be85bb0d1bdb87ea0d6632f1c256912f27.zip
build: Add some required modules for node
Diffstat (limited to 'node_modules/invert-kv')
-rw-r--r--node_modules/invert-kv/index.js15
-rw-r--r--node_modules/invert-kv/package.json69
-rw-r--r--node_modules/invert-kv/readme.md25
3 files changed, 109 insertions, 0 deletions
diff --git a/node_modules/invert-kv/index.js b/node_modules/invert-kv/index.js
new file mode 100644
index 0000000..61e2196
--- /dev/null
+++ b/node_modules/invert-kv/index.js
@@ -0,0 +1,15 @@
+'use strict';
+module.exports = function (obj) {
+ if (typeof obj !== 'object') {
+ throw new TypeError('Expected an object');
+ }
+
+ var ret = {};
+
+ for (var key in obj) {
+ var val = obj[key];
+ ret[val] = key;
+ }
+
+ return ret;
+};
diff --git a/node_modules/invert-kv/package.json b/node_modules/invert-kv/package.json
new file mode 100644
index 0000000..7d66cf9
--- /dev/null
+++ b/node_modules/invert-kv/package.json
@@ -0,0 +1,69 @@
+{
+ "_args": [
+ [
+ "invert-kv@1.0.0",
+ "/home/dstaesse/git/website"
+ ]
+ ],
+ "_development": true,
+ "_from": "invert-kv@1.0.0",
+ "_id": "invert-kv@1.0.0",
+ "_inBundle": false,
+ "_integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=",
+ "_location": "/invert-kv",
+ "_phantomChildren": {},
+ "_requested": {
+ "type": "version",
+ "registry": true,
+ "raw": "invert-kv@1.0.0",
+ "name": "invert-kv",
+ "escapedName": "invert-kv",
+ "rawSpec": "1.0.0",
+ "saveSpec": null,
+ "fetchSpec": "1.0.0"
+ },
+ "_requiredBy": [
+ "/lcid"
+ ],
+ "_resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz",
+ "_spec": "1.0.0",
+ "_where": "/home/dstaesse/git/website",
+ "author": {
+ "name": "Sindre Sorhus",
+ "email": "sindresorhus@gmail.com",
+ "url": "http://sindresorhus.com"
+ },
+ "bugs": {
+ "url": "https://github.com/sindresorhus/invert-kv/issues"
+ },
+ "description": "Invert the key/value of an object. Example: {foo: 'bar'} → {bar: 'foo'}",
+ "devDependencies": {
+ "mocha": "*"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ },
+ "files": [
+ "index.js"
+ ],
+ "homepage": "https://github.com/sindresorhus/invert-kv#readme",
+ "keywords": [
+ "object",
+ "obj",
+ "key",
+ "value",
+ "val",
+ "kv",
+ "invert"
+ ],
+ "license": "MIT",
+ "name": "invert-kv",
+ "repository": {
+ "type": "git",
+ "url": "git+https://github.com/sindresorhus/invert-kv.git"
+ },
+ "scripts": {
+ "test": "mocha"
+ },
+ "version": "1.0.0"
+}
diff --git a/node_modules/invert-kv/readme.md b/node_modules/invert-kv/readme.md
new file mode 100644
index 0000000..039fc7c
--- /dev/null
+++ b/node_modules/invert-kv/readme.md
@@ -0,0 +1,25 @@
+# invert-kv [![Build Status](https://travis-ci.org/sindresorhus/invert-kv.svg?branch=master)](https://travis-ci.org/sindresorhus/invert-kv)
+
+> Invert the key/value of an object. Example: `{foo: 'bar'}` → `{bar: 'foo'}`
+
+
+## Install
+
+```sh
+$ npm install --save invert-kv
+```
+
+
+## Usage
+
+```js
+var invertKv = require('invert-kv');
+
+invertKv({foo: 'bar', unicorn: 'rainbow'});
+//=> {bar: 'foo', rainbow: 'unicorn'}
+```
+
+
+## License
+
+MIT © [Sindre Sorhus](http://sindresorhus.com)