Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

sort-object

Package Overview
Dependencies
Maintainers
2
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sort-object - npm Package Compare versions

Comparing version 0.3.2 to 1.0.0

5

index.js
/*!
* 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};

58

package.json
{
"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._
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc