schnee effeckt und fehler Korektur
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;
|
||||
});
|
||||
}
|
||||
32
node_modules/sort-keys-length/package.json
generated
vendored
Normal file
32
node_modules/sort-keys-length/package.json
generated
vendored
Normal file
@@ -0,0 +1,32 @@
|
||||
{
|
||||
"name": "sort-keys-length",
|
||||
"version": "1.0.1",
|
||||
"description": "Sort objecy keys by length",
|
||||
"license": "MIT",
|
||||
"repository": "kevva/sort-keys-length",
|
||||
"author": {
|
||||
"name": "Kevin Mårtensson",
|
||||
"email": "kevinmartensson@gmail.com",
|
||||
"url": "https://github.com/kevva"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "node test.js"
|
||||
},
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"keywords": [
|
||||
"length",
|
||||
"object",
|
||||
"sort"
|
||||
],
|
||||
"dependencies": {
|
||||
"sort-keys": "^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ava": "^0.0.4"
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user