sort-object
Advanced tools
Comparing version 2.0.2 to 2.0.3
11
index.js
@@ -10,7 +10,8 @@ /*! | ||
var isObject = require('is-extendable'); | ||
var sortDesc = require('sort-desc'); | ||
var bytewise = require('bytewise'); | ||
var union = require('union-value'); | ||
var sortAsc = require('sort-asc'); | ||
var isObject = require('is-extendable'); | ||
var get = require('get-value'); | ||
var bytewise = require('bytewise'); | ||
@@ -80,4 +81,3 @@ var sortFns = {desc: sortDesc, asc: sortAsc}; | ||
item = isObject(item) ? bytewise.encode(JSON.stringify(item)).toString() : item; | ||
sortBy[item] = sortBy[item] || []; | ||
sortBy[item].push(key); | ||
union(sortBy, item, [key]); | ||
keys.push(item); | ||
@@ -94,6 +94,5 @@ tmp[key] = val; | ||
var val = obj[key]; | ||
sortBy[key] = sortBy[key] || []; | ||
sortBy[key].push(key); | ||
union(sortBy, key, [key]); | ||
tmp[key] = val; | ||
} | ||
} |
{ | ||
"name": "sort-object", | ||
"description": "Sort the keys in an object.", | ||
"version": "2.0.2", | ||
"version": "2.0.3", | ||
"homepage": "https://github.com/doowb/sort-object", | ||
@@ -46,3 +46,4 @@ "author": { | ||
"sort-asc": "^0.1.0", | ||
"sort-desc": "^0.1.1" | ||
"sort-desc": "^0.1.1", | ||
"union-value": "^0.1.1" | ||
}, | ||
@@ -49,0 +50,0 @@ "keywords": [ |
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
6705
6
79
+ Addedunion-value@^0.1.1
+ Addedarr-union@3.1.0(transitive)
+ Addedisobject@1.0.2(transitive)
+ Addedset-value@0.2.0(transitive)
+ Addedunion-value@0.1.1(transitive)