Added logging, changed some directory structure

This commit is contained in:
2018-01-13 21:33:40 -05:00
parent f079a5f067
commit 8e72ffb917
73656 changed files with 35284 additions and 53718 deletions

View File

@@ -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;
};

View File

@@ -0,0 +1,68 @@
{
"_args": [
[
"invert-kv@1.0.0",
"C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\torrent-project"
]
],
"_from": "invert-kv@1.0.0",
"_id": "invert-kv@1.0.0",
"_inBundle": false,
"_integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=",
"_location": "/react-scripts/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": [
"/react-scripts/lcid"
],
"_resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz",
"_spec": "1.0.0",
"_where": "C:\\Users\\deranjer\\go\\src\\github.com\\deranjer\\goTorrent\\torrent-project",
"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"
}

View File

@@ -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)