88 lines
13 KiB
JSON
88 lines
13 KiB
JSON
|
{
|
||
|
"_args": [
|
||
|
[
|
||
|
{
|
||
|
"raw": "jsprim@^1.2.2",
|
||
|
"scope": null,
|
||
|
"escapedName": "jsprim",
|
||
|
"name": "jsprim",
|
||
|
"rawSpec": "^1.2.2",
|
||
|
"spec": ">=1.2.2 <2.0.0",
|
||
|
"type": "range"
|
||
|
},
|
||
|
"/home/jdaugherty/work/GT2/GT2-Android/node_modules/http-signature"
|
||
|
]
|
||
|
],
|
||
|
"_from": "jsprim@>=1.2.2 <2.0.0",
|
||
|
"_id": "jsprim@1.4.1",
|
||
|
"_inCache": true,
|
||
|
"_location": "/jsprim",
|
||
|
"_nodeVersion": "0.10.45",
|
||
|
"_npmOperationalInternal": {
|
||
|
"host": "s3://npm-registry-packages",
|
||
|
"tmp": "tmp/jsprim-1.4.1.tgz_1501691396911_0.08959000837057829"
|
||
|
},
|
||
|
"_npmUser": {
|
||
|
"name": "dap",
|
||
|
"email": "dap@cs.brown.edu"
|
||
|
},
|
||
|
"_npmVersion": "2.15.1",
|
||
|
"_phantomChildren": {},
|
||
|
"_requested": {
|
||
|
"raw": "jsprim@^1.2.2",
|
||
|
"scope": null,
|
||
|
"escapedName": "jsprim",
|
||
|
"name": "jsprim",
|
||
|
"rawSpec": "^1.2.2",
|
||
|
"spec": ">=1.2.2 <2.0.0",
|
||
|
"type": "range"
|
||
|
},
|
||
|
"_requiredBy": [
|
||
|
"/http-signature"
|
||
|
],
|
||
|
"_resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz",
|
||
|
"_shasum": "313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2",
|
||
|
"_shrinkwrap": null,
|
||
|
"_spec": "jsprim@^1.2.2",
|
||
|
"_where": "/home/jdaugherty/work/GT2/GT2-Android/node_modules/http-signature",
|
||
|
"bugs": {
|
||
|
"url": "https://github.com/joyent/node-jsprim/issues"
|
||
|
},
|
||
|
"dependencies": {
|
||
|
"assert-plus": "1.0.0",
|
||
|
"extsprintf": "1.3.0",
|
||
|
"json-schema": "0.2.3",
|
||
|
"verror": "1.10.0"
|
||
|
},
|
||
|
"description": "utilities for primitive JavaScript types",
|
||
|
"devDependencies": {},
|
||
|
"directories": {},
|
||
|
"dist": {
|
||
|
"shasum": "313e66bc1e5cc06e438bc1b7499c2e5c56acb6a2",
|
||
|
"tarball": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz"
|
||
|
},
|
||
|
"engines": [
|
||
|
"node >=0.6.0"
|
||
|
],
|
||
|
"gitHead": "f7d80a9e8e3f79c0b76448ad9ceab252fb309b32",
|
||
|
"homepage": "https://github.com/joyent/node-jsprim#readme",
|
||
|
"license": "MIT",
|
||
|
"main": "./lib/jsprim.js",
|
||
|
"maintainers": [
|
||
|
{
|
||
|
"name": "dap",
|
||
|
"email": "dap@cs.brown.edu"
|
||
|
}
|
||
|
],
|
||
|
"name": "jsprim",
|
||
|
"optionalDependencies": {},
|
||
|
"readme": "# jsprim: utilities for primitive JavaScript types\n\nThis module provides miscellaneous facilities for working with strings,\nnumbers, dates, and objects and arrays of these basic types.\n\n\n### deepCopy(obj)\n\nCreates a deep copy of a primitive type, object, or array of primitive types.\n\n\n### deepEqual(obj1, obj2)\n\nReturns whether two objects are equal.\n\n\n### isEmpty(obj)\n\nReturns true if the given object has no properties and false otherwise. This\nis O(1) (unlike `Object.keys(obj).length === 0`, which is O(N)).\n\n### hasKey(obj, key)\n\nReturns true if the given object has an enumerable, non-inherited property\ncalled `key`. [For information on enumerability and ownership of properties, see\nthe MDN\ndocumentation.](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Enumerability_and_ownership_of_properties)\n\n### forEachKey(obj, callback)\n\nLike Array.forEach, but iterates enumerable, owned properties of an object\nrather than elements of an array. Equivalent to:\n\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n callback(key, obj[key]);\n }\n }\n\n\n### flattenObject(obj, depth)\n\nFlattens an object up to a given level of nesting, returning an array of arrays\nof length \"depth + 1\", where the first \"depth\" elements correspond to flattened\ncolumns and the last element contains the remaining object . For example:\n\n flattenObject({\n 'I': {\n 'A': {\n 'i': {\n 'datum1': [ 1, 2 ],\n 'datum2': [ 3, 4 ]\n },\n 'ii': {\n 'datum1': [ 3, 4 ]\n }\n },\n 'B': {\n 'i': {\n 'datum1': [ 5, 6 ]\n },\n 'ii': {\n 'datum1': [ 7, 8 ],\n 'datum2': [ 3, 4 ],\n },\n 'iii': {\n }\n }\n },\n 'II': {\n 'A': {\n 'i': {\n 'datum1': [ 1, 2 ],\n 'datum2': [ 3, 4 ]\n }\n }\n }\n }, 3)\n\nbecomes:\n\n [\n [ 'I', 'A', 'i', { 'datum1': [ 1, 2 ], 'datum2': [ 3, 4 ] } ],\n [ 'I', 'A', 'ii', { 'datum1': [ 3, 4 ] } ],\n [ 'I', 'B', 'i', { 'datum1': [ 5, 6 ] } ],\n [ 'I', 'B', 'ii', { 'datum1': [ 7, 8 ], 'datum2': [ 3, 4 ] } ],\n [ 'I', 'B', 'iii', {} ],\n [ 'II', 'A', 'i', { 'datum1': [ 1, 2 ], 'datum2': [ 3, 4 ] } ]\n ]\n\nThis function is strict: \"depth\" must be a non-negative integer and \"obj\" must\nbe a non-null object with at least \"depth\" levels of nesting under all keys.\n\n\n### flattenIter(obj, depth, func)\n\nThis is similar to `flattenObject` except that instead of returning an array,\nthis function invokes `func(entry)` for each `entry` in the array that\n`flattenObject` would return. `flattenIter(obj, depth, func)` is logically\nequivalent to `flattenObject(obj, depth).forEach(func)`. Importantly, this\nversion never constructs the full array. Its memory usage is O(depth) rather\nthan O(n) (where `n` is the number of flattened elements).\n\nThere's another difference between `flattenObject` and `flattenIter` that's\nrelated to the special case where `depth === 0`. In this case, `flattenObject`\nomits the array wrapping `obj` (which is regrettable).\n\n\n### pluck(obj, key)\n\nFetch nested property \"key\" from object \"obj\", traversing objects as needed.\nFor example, `pluck(obj, \"foo.bar.baz\")` is roughly equivalent to\n`obj.foo.bar.baz`, except that:\n\n1. If traversal fails, the resulting value is undefined, and no error is\n thrown. For example, `pluck({}, \"foo.bar\")` is just undefined.\n2. If \"obj\" has property \"key\" directly (without traversing), the\n corresponding property is returned. For example,\n `pluck({ 'foo.bar': 1 }, 'foo.bar')` is 1, not undefined. This is also\n true recursively, so
|
||
|
"readmeFilename": "README.md",
|
||
|
"repository": {
|
||
|
"type": "git",
|
||
|
"url": "git://github.com/joyent/node-jsprim.git"
|
||
|
},
|
||
|
"scripts": {},
|
||
|
"version": "1.4.1"
|
||
|
}
|