diff options
author | Rebecca Turner <me@re-becca.org> | 2016-03-16 03:49:02 +0300 |
---|---|---|
committer | Rebecca Turner <me@re-becca.org> | 2016-03-17 23:03:33 +0300 |
commit | 7537fe1748c27e6f1144b279b256cd3376d5c41c (patch) | |
tree | 8aba763749a2c9550679ab39a7b4425393843ccf /node_modules/sorted-object | |
parent | 32f2bd0e26116db253e619d67c4feae1de3ad2c2 (diff) |
sorted-object@2.0.0
Create objects with `{}` instead of `Object.create(null)` to make the results
strictly equal to what, say, parsed JSON would provide.
Credit: @domenic
Diffstat (limited to 'node_modules/sorted-object')
-rw-r--r-- | node_modules/sorted-object/LICENSE.txt | 2 | ||||
-rw-r--r-- | node_modules/sorted-object/lib/sorted-object.js | 2 | ||||
-rw-r--r-- | node_modules/sorted-object/package.json | 110 |
3 files changed, 75 insertions, 39 deletions
diff --git a/node_modules/sorted-object/LICENSE.txt b/node_modules/sorted-object/LICENSE.txt index a92a60b82..4a323deb5 100644 --- a/node_modules/sorted-object/LICENSE.txt +++ b/node_modules/sorted-object/LICENSE.txt @@ -1,4 +1,4 @@ -Copyright © 2014 Domenic Denicola <domenic@domenicdenicola.com> +Copyright © 2014–2016 Domenic Denicola <d@domenic.me> This work is free. You can redistribute it and/or modify it under the terms of the Do What The Fuck You Want To Public License, Version 2, diff --git a/node_modules/sorted-object/lib/sorted-object.js b/node_modules/sorted-object/lib/sorted-object.js index 26ebd500a..1b3fe81a6 100644 --- a/node_modules/sorted-object/lib/sorted-object.js +++ b/node_modules/sorted-object/lib/sorted-object.js @@ -1,7 +1,7 @@ "use strict"; module.exports = function (input) { - var output = Object.create(null); + var output = {}; Object.keys(input).sort().forEach(function (key) { output[key] = input[key]; diff --git a/node_modules/sorted-object/package.json b/node_modules/sorted-object/package.json index 9b7e338b7..60a8356ba 100644 --- a/node_modules/sorted-object/package.json +++ b/node_modules/sorted-object/package.json @@ -1,53 +1,89 @@ { - "name": "sorted-object", - "description": "Returns a copy of an object with its keys sorted", - "keywords": [ - "sort", - "keys", - "object" + "_args": [ + [ + "sorted-object@latest", + "/Users/rebecca/code/npm" + ] ], - "version": "1.0.0", + "_from": "sorted-object@latest", + "_id": "sorted-object@2.0.0", + "_inCache": true, + "_installable": true, + "_location": "/sorted-object", + "_nodeVersion": "5.7.1", + "_npmOperationalInternal": { + "host": "packages-12-west.internal.npmjs.com", + "tmp": "tmp/sorted-object-2.0.0.tgz_1457910693572_0.6718082851730287" + }, + "_npmUser": { + "email": "d@domenic.me", + "name": "domenic" + }, + "_npmVersion": "3.6.0", + "_phantomChildren": {}, + "_requested": { + "name": "sorted-object", + "raw": "sorted-object@latest", + "rawSpec": "latest", + "scope": null, + "spec": "latest", + "type": "tag" + }, + "_requiredBy": [ + "/" + ], + "_resolved": "https://registry.npmjs.org/sorted-object/-/sorted-object-2.0.0.tgz", + "_shasum": "1cfea981609047d8043807a490a9d99b317faf7f", + "_shrinkwrap": null, + "_spec": "sorted-object@latest", + "_where": "/Users/rebecca/code/npm", "author": { + "email": "d@domenic.me", "name": "Domenic Denicola", - "email": "domenic@domenicdenicola.com", - "url": "http://domenic.me/" - }, - "license": "WTFPL", - "repository": { - "type": "git", - "url": "git://github.com/domenic/sorted-object.git" + "url": "https://domenic.me/" }, "bugs": { - "url": "http://github.com/domenic/sorted-object/issues" - }, - "main": "lib/sorted-object.js", - "scripts": { - "test": "tape test/tests.js", - "lint": "jshint lib && jshint test" + "url": "https://github.com/domenic/sorted-object/issues" }, + "dependencies": {}, + "description": "Returns a copy of an object with its keys sorted", "devDependencies": { - "jshint": "~2.4.3", - "tape": "~2.4.2" + "eslint": "^2.4.0", + "tape": "^4.5.1" }, - "homepage": "https://github.com/domenic/sorted-object", - "_id": "sorted-object@1.0.0", + "directories": {}, "dist": { - "shasum": "5d1f4f9c1fb2cd48965967304e212eb44cfb6d05", - "tarball": "http://registry.npmjs.org/sorted-object/-/sorted-object-1.0.0.tgz" - }, - "_from": "sorted-object@>=1.0.0 <1.1.0", - "_npmVersion": "1.3.25", - "_npmUser": { - "name": "domenic", - "email": "domenic@domenicdenicola.com" + "shasum": "1cfea981609047d8043807a490a9d99b317faf7f", + "tarball": "http://registry.npmjs.org/sorted-object/-/sorted-object-2.0.0.tgz" }, + "files": [ + "lib/" + ], + "gitHead": "3cbdde212c8ceef219fbb8fa7805bfc38b94aa90", + "homepage": "https://github.com/domenic/sorted-object#readme", + "keywords": [ + "sort", + "keys", + "object" + ], + "license": "WTFPL", + "main": "lib/sorted-object.js", "maintainers": [ { - "name": "domenic", - "email": "domenic@domenicdenicola.com" + "email": "domenic@domenicdenicola.com", + "name": "domenic" } ], - "directories": {}, - "_shasum": "5d1f4f9c1fb2cd48965967304e212eb44cfb6d05", - "_resolved": "https://registry.npmjs.org/sorted-object/-/sorted-object-1.0.0.tgz" + "name": "sorted-object", + "optionalDependencies": {}, + "readme": "ERROR: No README data found!", + "repository": { + "type": "git", + "url": "git+https://github.com/domenic/sorted-object.git" + }, + "scripts": { + "lint": "eslint .", + "test": "tape test/tests.js" + }, + "version": "2.0.0" } |