TheDesk
This commit is contained in:
19
node_modules/sort-keys-length/LICENSE.md
generated
vendored
Normal file
19
node_modules/sort-keys-length/LICENSE.md
generated
vendored
Normal file
@@ -0,0 +1,19 @@
|
||||
Copyright (c) Kevin Mårtensson
|
||||
|
||||
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.
|
35
node_modules/sort-keys-length/README.md
generated
vendored
Normal file
35
node_modules/sort-keys-length/README.md
generated
vendored
Normal file
@@ -0,0 +1,35 @@
|
||||
# sort-keys-length [](http://travis-ci.org/kevva/sort-keys-length)
|
||||
|
||||
> Sort object keys by length
|
||||
|
||||
## Install
|
||||
|
||||
```sh
|
||||
$ npm install --save sort-keys-length
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var sortKeysLength = require('sort-keys-length');
|
||||
|
||||
sortKeysLength.asc({ ab: 'x', a: 'y', abc: 'z' });
|
||||
//=> { a: 'y', ab: 'x', abc: 'z' }
|
||||
|
||||
sortKeysLength.desc({ ab: 'x', a: 'y', abc: 'z' });
|
||||
//=> { abc: 'z', ab: 'x', a: 'y' }
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
### .asc
|
||||
|
||||
Ascending sort.
|
||||
|
||||
### .desc
|
||||
|
||||
Descending sort.
|
||||
|
||||
## License
|
||||
|
||||
MIT © [Kevin Mårtensson](https://github.com/kevva)
|
22
node_modules/sort-keys-length/index.js
generated
vendored
Normal file
22
node_modules/sort-keys-length/index.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
'use strict';
|
||||
|
||||
var sortKeys = require('sort-keys');
|
||||
|
||||
/**
|
||||
* Sort object keys by length
|
||||
*
|
||||
* @param obj
|
||||
* @api public
|
||||
*/
|
||||
|
||||
module.exports.desc = function (obj) {
|
||||
return sortKeys(obj, function (a, b) {
|
||||
return b.length - a.length;
|
||||
});
|
||||
}
|
||||
|
||||
module.exports.asc = function (obj) {
|
||||
return sortKeys(obj, function (a, b) {
|
||||
return a.length - b.length;
|
||||
});
|
||||
}
|
95
node_modules/sort-keys-length/package.json
generated
vendored
Normal file
95
node_modules/sort-keys-length/package.json
generated
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
{
|
||||
"_args": [
|
||||
[
|
||||
{
|
||||
"raw": "sort-keys-length@^1.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "sort-keys-length",
|
||||
"name": "sort-keys-length",
|
||||
"rawSpec": "^1.0.0",
|
||||
"spec": ">=1.0.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"C:\\Users\\ryuki\\TheDesk\\node_modules\\ext-name"
|
||||
]
|
||||
],
|
||||
"_from": "sort-keys-length@>=1.0.0 <2.0.0",
|
||||
"_id": "sort-keys-length@1.0.1",
|
||||
"_inCache": true,
|
||||
"_location": "/sort-keys-length",
|
||||
"_nodeVersion": "1.0.3",
|
||||
"_npmUser": {
|
||||
"name": "kevva",
|
||||
"email": "kevinmartensson@gmail.com"
|
||||
},
|
||||
"_npmVersion": "2.2.0",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"raw": "sort-keys-length@^1.0.0",
|
||||
"scope": null,
|
||||
"escapedName": "sort-keys-length",
|
||||
"name": "sort-keys-length",
|
||||
"rawSpec": "^1.0.0",
|
||||
"spec": ">=1.0.0 <2.0.0",
|
||||
"type": "range"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/ext-name"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/sort-keys-length/-/sort-keys-length-1.0.1.tgz",
|
||||
"_shasum": "9cb6f4f4e9e48155a6aa0671edd336ff1479a188",
|
||||
"_shrinkwrap": null,
|
||||
"_spec": "sort-keys-length@^1.0.0",
|
||||
"_where": "C:\\Users\\ryuki\\TheDesk\\node_modules\\ext-name",
|
||||
"author": {
|
||||
"name": "Kevin Mårtensson",
|
||||
"email": "kevinmartensson@gmail.com",
|
||||
"url": "https://github.com/kevva"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/kevva/sort-keys-length/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"sort-keys": "^1.0.0"
|
||||
},
|
||||
"description": "Sort objecy keys by length",
|
||||
"devDependencies": {
|
||||
"ava": "^0.0.4"
|
||||
},
|
||||
"directories": {},
|
||||
"dist": {
|
||||
"shasum": "9cb6f4f4e9e48155a6aa0671edd336ff1479a188",
|
||||
"tarball": "https://registry.npmjs.org/sort-keys-length/-/sort-keys-length-1.0.1.tgz"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"gitHead": "745e75f1ca4bcb50f120a899afd1508d0b6c7a31",
|
||||
"homepage": "https://github.com/kevva/sort-keys-length",
|
||||
"keywords": [
|
||||
"length",
|
||||
"object",
|
||||
"sort"
|
||||
],
|
||||
"license": "MIT",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "kevva",
|
||||
"email": "kevinmartensson@gmail.com"
|
||||
}
|
||||
],
|
||||
"name": "sort-keys-length",
|
||||
"optionalDependencies": {},
|
||||
"readme": "ERROR: No README data found!",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/kevva/sort-keys-length.git"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "node test.js"
|
||||
},
|
||||
"version": "1.0.1"
|
||||
}
|
Reference in New Issue
Block a user