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

sort-object-keys

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

sort-object-keys - npm Package Compare versions

Comparing version 1.1.2 to 1.1.3

8

index.js

@@ -10,6 +10,10 @@ module.exports = function sortObjectByKeyNameList(object, sortWith) {

}
return (keys || []).concat(Object.keys(object).sort(sortFn)).reduce(function(total, key) {
total[key] = object[key];
var objectKeys = Object.keys(object);
return (keys || []).concat(objectKeys.sort(sortFn)).reduce(function(total, key) {
if (objectKeys.indexOf(key) !== -1) {
total[key] = object[key];
}
return total;
}, Object.create(null));
}
{
"name": "sort-object-keys",
"version": "1.1.2",
"version": "1.1.3",
"description": "Sort an object's keys, including an optional key list",

@@ -28,6 +28,14 @@ "keywords": [

},
"config": {
"ghooks": {
"pre-commit": "npm t",
"commit-msg": "validate-commit-msg"
}
},
"devDependencies": {
"ghooks": "^1.0.1",
"semantic-release": "^4.3.5",
"travis-after-all": "^1.4.4"
"travis-after-all": "^1.4.4",
"validate-commit-msg": "^2.4.1"
}
}
}
# Sort Object
[![Build Status](https://travis-ci.org/keithamus/sort-object-keys.svg)](https://travis-ci.org/keithamus/sort-object-keys)

@@ -4,0 +6,0 @@

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