package.json 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  1. {
  2. "_args": [
  3. [
  4. {
  5. "raw": "json-stable-stringify@^1.0.1",
  6. "scope": null,
  7. "escapedName": "json-stable-stringify",
  8. "name": "json-stable-stringify",
  9. "rawSpec": "^1.0.1",
  10. "spec": ">=1.0.1 <2.0.0",
  11. "type": "range"
  12. },
  13. "/mnt/Data/bach/Documents/ola/OLA#4/OLA#4DOC/sys/node_modules/ajv"
  14. ]
  15. ],
  16. "_from": "json-stable-stringify@>=1.0.1 <2.0.0",
  17. "_id": "json-stable-stringify@1.0.1",
  18. "_inCache": true,
  19. "_location": "/json-stable-stringify",
  20. "_nodeVersion": "4.2.1",
  21. "_npmOperationalInternal": {
  22. "host": "packages-5-east.internal.npmjs.com",
  23. "tmp": "tmp/json-stable-stringify-1.0.1.tgz_1454436356521_0.9410459187347442"
  24. },
  25. "_npmUser": {
  26. "name": "substack",
  27. "email": "substack@gmail.com"
  28. },
  29. "_npmVersion": "3.4.1",
  30. "_phantomChildren": {},
  31. "_requested": {
  32. "raw": "json-stable-stringify@^1.0.1",
  33. "scope": null,
  34. "escapedName": "json-stable-stringify",
  35. "name": "json-stable-stringify",
  36. "rawSpec": "^1.0.1",
  37. "spec": ">=1.0.1 <2.0.0",
  38. "type": "range"
  39. },
  40. "_requiredBy": [
  41. "/ajv"
  42. ],
  43. "_resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz",
  44. "_shasum": "9a759d39c5f2ff503fd5300646ed445f88c4f9af",
  45. "_shrinkwrap": null,
  46. "_spec": "json-stable-stringify@^1.0.1",
  47. "_where": "/mnt/Data/bach/Documents/ola/OLA#4/OLA#4DOC/sys/node_modules/ajv",
  48. "author": {
  49. "name": "James Halliday",
  50. "email": "mail@substack.net",
  51. "url": "http://substack.net"
  52. },
  53. "bugs": {
  54. "url": "https://github.com/substack/json-stable-stringify/issues"
  55. },
  56. "dependencies": {
  57. "jsonify": "~0.0.0"
  58. },
  59. "description": "deterministic JSON.stringify() with custom sorting to get deterministic hashes from stringified results",
  60. "devDependencies": {
  61. "tape": "~1.0.4"
  62. },
  63. "directories": {},
  64. "dist": {
  65. "shasum": "9a759d39c5f2ff503fd5300646ed445f88c4f9af",
  66. "tarball": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-1.0.1.tgz"
  67. },
  68. "gitHead": "4a3ac9cc006a91e64901f8ebe78d23bf9fc9fbd0",
  69. "homepage": "https://github.com/substack/json-stable-stringify",
  70. "keywords": [
  71. "json",
  72. "stringify",
  73. "deterministic",
  74. "hash",
  75. "sort",
  76. "stable"
  77. ],
  78. "license": "MIT",
  79. "main": "index.js",
  80. "maintainers": [
  81. {
  82. "name": "substack",
  83. "email": "mail@substack.net"
  84. }
  85. ],
  86. "name": "json-stable-stringify",
  87. "optionalDependencies": {},
  88. "readme": "# json-stable-stringify\n\ndeterministic version of `JSON.stringify()` so you can get a consistent hash\nfrom stringified results\n\nYou can also pass in a custom comparison function.\n\n[![browser support](https://ci.testling.com/substack/json-stable-stringify.png)](https://ci.testling.com/substack/json-stable-stringify)\n\n[![build status](https://secure.travis-ci.org/substack/json-stable-stringify.png)](http://travis-ci.org/substack/json-stable-stringify)\n\n# example\n\n``` js\nvar stringify = require('json-stable-stringify');\nvar obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 };\nconsole.log(stringify(obj));\n```\n\noutput:\n\n```\n{\"a\":3,\"b\":[{\"x\":4,\"y\":5,\"z\":6},7],\"c\":8}\n```\n\n# methods\n\n``` js\nvar stringify = require('json-stable-stringify')\n```\n\n## var str = stringify(obj, opts)\n\nReturn a deterministic stringified string `str` from the object `obj`.\n\n## options\n\n### cmp\n\nIf `opts` is given, you can supply an `opts.cmp` to have a custom comparison\nfunction for object keys. Your function `opts.cmp` is called with these\nparameters:\n\n``` js\nopts.cmp({ key: akey, value: avalue }, { key: bkey, value: bvalue })\n```\n\nFor example, to sort on the object key names in reverse order you could write:\n\n``` js\nvar stringify = require('json-stable-stringify');\n\nvar obj = { c: 8, b: [{z:6,y:5,x:4},7], a: 3 };\nvar s = stringify(obj, function (a, b) {\n return a.key < b.key ? 1 : -1;\n});\nconsole.log(s);\n```\n\nwhich results in the output string:\n\n```\n{\"c\":8,\"b\":[{\"z\":6,\"y\":5,\"x\":4},7],\"a\":3}\n```\n\nOr if you wanted to sort on the object values in reverse order, you could write:\n\n```\nvar stringify = require('json-stable-stringify');\n\nvar obj = { d: 6, c: 5, b: [{z:3,y:2,x:1},9], a: 10 };\nvar s = stringify(obj, function (a, b) {\n return a.value < b.value ? 1 : -1;\n});\nconsole.log(s);\n```\n\nwhich outputs:\n\n```\n{\"d\":6,\"c\":5,\"b\":[{\"z\":3,\"y\":2,\"x\":1},9],\"a\":10}\n```\n\n### space\n\nIf you specify `opts.space`, it will indent the output for pretty-printing.\nValid values are strings (e.g. `{space: \\t}`) or a number of spaces\n(`{space: 3}`).\n\nFor example:\n\n```js\nvar obj = { b: 1, a: { foo: 'bar', and: [1, 2, 3] } };\nvar s = stringify(obj, { space: ' ' });\nconsole.log(s);\n```\n\nwhich outputs:\n\n```\n{\n \"a\": {\n \"and\": [\n 1,\n 2,\n 3\n ],\n \"foo\": \"bar\"\n },\n \"b\": 1\n}\n```\n\n### replacer\n\nThe replacer parameter is a function `opts.replacer(key, value)` that behaves\nthe same as the replacer\n[from the core JSON object](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Using_native_JSON#The_replacer_parameter).\n\n# install\n\nWith [npm](https://npmjs.org) do:\n\n```\nnpm install json-stable-stringify\n```\n\n# license\n\nMIT\n",
  89. "readmeFilename": "readme.markdown",
  90. "repository": {
  91. "type": "git",
  92. "url": "git://github.com/substack/json-stable-stringify.git"
  93. },
  94. "scripts": {
  95. "test": "tape test/*.js"
  96. },
  97. "testling": {
  98. "files": "test/*.js",
  99. "browsers": [
  100. "ie/8..latest",
  101. "ff/5",
  102. "ff/latest",
  103. "chrome/15",
  104. "chrome/latest",
  105. "safari/latest",
  106. "opera/latest"
  107. ]
  108. },
  109. "version": "1.0.1"
  110. }