sort-object
Advanced tools
Comparing version 0.3.2 to 1.0.0
/*! | ||
* sort-keys <https://github.com/helpers/sort-keys> | ||
* sort-object <https://github.com/helpers/sort-object> | ||
* | ||
* Copyright (c) 2014 Brian Woodward, Jon Schlinkert, contributors. | ||
* Copyright (c) 2014-2015, Brian Woodward. | ||
* Licensed under the MIT License | ||
@@ -13,3 +13,2 @@ */ | ||
module.exports = function (obj, options) { | ||
@@ -16,0 +15,0 @@ var sort = {desc: sortDesc, asc: sortAsc}; |
{ | ||
"name": "sort-object", | ||
"description": "Sort the keys in an object.", | ||
"version": "0.3.2", | ||
"homepage": "https://github.com/helpers/sort-object", | ||
"version": "1.0.0", | ||
"homepage": "https://github.com/doowb/sort-object", | ||
"author": { | ||
@@ -12,19 +12,35 @@ "name": "Brian Woodward", | ||
"type": "git", | ||
"url": "git://github.com/helpers/sort-object.git" | ||
"url": "git://github.com/doowb/sort-object.git" | ||
}, | ||
"bugs": { | ||
"url": "https://github.com/helpers/sort-object/issues" | ||
"url": "https://github.com/doowb/sort-object/issues" | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"maintainers": [ | ||
{ | ||
"name": "Jon Schlinkert", | ||
"url": "https://github.com/helpers" | ||
"url": "https://github.com/jonschlinkert" | ||
} | ||
], | ||
"licenses": [ | ||
{ | ||
"type": "MIT", | ||
"url": "https://github.com/helpers/sort-object/blob/master/LICENSE-MIT" | ||
} | ||
], | ||
"license": { | ||
"type": "MIT", | ||
"url": "https://github.com/doowb/sort-object/blob/master/LICENSE" | ||
}, | ||
"main": "index.js", | ||
"engines": { | ||
"node": ">=0.10.0" | ||
}, | ||
"scripts": { | ||
"test": "mocha -R spec" | ||
}, | ||
"devDependencies": { | ||
"mocha": "*", | ||
"should": "^4.0.4" | ||
}, | ||
"dependencies": { | ||
"sort-asc": "^0.1.0", | ||
"sort-desc": "^0.1.1" | ||
}, | ||
"keywords": [ | ||
@@ -45,19 +61,3 @@ "arr", | ||
"utils" | ||
], | ||
"main": "index.js", | ||
"engines": { | ||
"node": ">=0.10.0" | ||
}, | ||
"scripts": { | ||
"test": "mocha -R spec" | ||
}, | ||
"devDependencies": { | ||
"mocha": "*", | ||
"should": "^4.0.4", | ||
"verb": "^0.2.15" | ||
}, | ||
"dependencies": { | ||
"sort-asc": "^0.1.0", | ||
"sort-desc": "^0.1.1" | ||
} | ||
} | ||
] | ||
} |
@@ -1,7 +0,6 @@ | ||
# sort-object [![NPM version](https://badge.fury.io/js/sort-object.png)](http://badge.fury.io/js/sort-object) | ||
# sort-object [![NPM version](https://badge.fury.io/js/sort-object.svg)](http://badge.fury.io/js/sort-object) | ||
> Sort the keys in an object. | ||
## Install | ||
#### Install with [npm](npmjs.org) | ||
## Install with [npm](npmjs.org) | ||
@@ -21,3 +20,3 @@ ```bash | ||
```js | ||
console.log(sortObj({a: 1, c: 2, b: 3})); | ||
sortObj({a: 1, c: 2, b: 3}); | ||
//=> {a: 1, b: 3, c: 2} | ||
@@ -31,3 +30,3 @@ ``` | ||
```js | ||
console.log(sortObj({a: 1, c: 2, b: 3}, {keys: ['a', 'b']})); | ||
sortObj({a: 1, c: 2, b: 3}, {keys: ['a', 'b']}); | ||
//=> {a: 1, b: 3} | ||
@@ -39,3 +38,3 @@ ``` | ||
```js | ||
console.log(sortObj({a: 1, c: 2, b: 3}, ['a', 'c'])); | ||
sortObj({a: 1, c: 2, b: 3}, ['a', 'c']); | ||
//=> {a: 1, c: 2} | ||
@@ -57,3 +56,3 @@ ``` | ||
var o = {a: 1, c: 2, e: 5, d: 4, b: 3}; | ||
console.log(sortObj(o, {keys: ['a', 'b']})); | ||
sortObj(o, {keys: ['a', 'b']}); | ||
@@ -74,3 +73,3 @@ //=> {a: 1, b: 3} | ||
}); | ||
console.log(obj); | ||
obj; | ||
//=> {a: 1, b: 3, c: 2, d: 4, e: 5} | ||
@@ -85,3 +84,3 @@ ``` | ||
var o = {a: 1, c: 2, e: 5, d: 4, b: 3}; | ||
console.log(sortObj(o, {sortOrder: 'ASC'})); | ||
sortObj(o, {sortOrder: 'ASC'}); | ||
//=> {e: 5, d: 4, c: 3, b: 2, a: 1} | ||
@@ -116,3 +115,3 @@ ``` | ||
## License | ||
Copyright (c) 2014 Brian Woodward, contributors. | ||
Copyright (c) 2014-2015 Brian Woodward | ||
Released under the MIT license | ||
@@ -122,2 +121,2 @@ | ||
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on October 24, 2014._ | ||
_This file was generated by [verb](https://github.com/assemble/verb) on January 30, 2015._ |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
2
0
4728
3
51
114