pnpm
Version:
Fast, disk space efficient package manager
112 lines (111 loc) • 6.71 kB
JSON
{
"_args": [
[
{
"raw": "json-schema-traverse@^0.4.1",
"scope": null,
"escapedName": "json-schema-traverse",
"name": "json-schema-traverse",
"rawSpec": "^0.4.1",
"spec": ">=0.4.1 <0.5.0",
"type": "range"
},
"/home/zoltan/src/pnpm/pnpm/packages/pnpm/node_modules/ajv"
]
],
"_from": "json-schema-traverse@>=0.4.1 <0.5.0",
"_id": "json-schema-traverse@0.4.1",
"_inCache": true,
"_location": "/json-schema-traverse",
"_nodeVersion": "10.0.0",
"_npmOperationalInternal": {
"host": "s3://npm-registry-packages",
"tmp": "tmp/json-schema-traverse_0.4.1_1528620124976_0.4290201343994062"
},
"_npmUser": {
"name": "esp",
"email": "e.poberezkin@me.com"
},
"_npmVersion": "5.6.0",
"_phantomChildren": {},
"_requested": {
"raw": "json-schema-traverse@^0.4.1",
"scope": null,
"escapedName": "json-schema-traverse",
"name": "json-schema-traverse",
"rawSpec": "^0.4.1",
"spec": ">=0.4.1 <0.5.0",
"type": "range"
},
"_requiredBy": [
"/ajv"
],
"_resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
"_shasum": "69f6a87d9513ab8bb8fe63bdb0979c448e684660",
"_shrinkwrap": null,
"_spec": "json-schema-traverse@^0.4.1",
"_where": "/home/zoltan/src/pnpm/pnpm/packages/pnpm/node_modules/ajv",
"author": {
"name": "Evgeny Poberezkin"
},
"bugs": {
"url": "https://github.com/epoberezkin/json-schema-traverse/issues"
},
"dependencies": {},
"description": "Traverse JSON Schema passing each schema object to callback",
"devDependencies": {
"coveralls": "^2.13.1",
"eslint": "^3.19.0",
"mocha": "^3.4.2",
"nyc": "^11.0.2",
"pre-commit": "^1.2.2"
},
"directories": {},
"dist": {
"integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
"shasum": "69f6a87d9513ab8bb8fe63bdb0979c448e684660",
"tarball": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
"fileCount": 9,
"unpackedSize": 19564,
"npm-signature": "-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbHOReCRA9TVsSAnZWagAAVWUP/0MJPYc1bhxL+UjZWR+N\n0w1lIESRrtuAzcNFPDBfPvd8bBr3gxJlaLHMkpvzyEZGN69bgQP2hsp6I+Mg\nxvZz/mSOnK5Yj9/VTytxEjlwqW0GDK24x08GXNAZenNidRht1iZvBjugZbJa\n0hxF0z2Xjkn9VXgtOI0QiBLj9t4mutLrte3kFFDNpLTzoRx5r08JeA3L4k4I\na/Svzav/z4c8AsUFaeY/eAtGPm9KqwLzX0eLWQ7ueYPR7YgtY7WUWuSSh8+f\nuk9UJrG0OVS4GPl8YvwMvjf3Di9nUDwoQem9QnsIJCaXJ+Gbknv8B/Lit/9a\nzmjaNJDDNOF8t2iUfwUZWarFBGxYsZBcoECDPrU/tGMj/8IfHXMNHVWraqAp\nfZ9pvYbJ7s8DTlpJ8pkuGUDPrZIX4POWYcsuYVjUUpRwV73HnCIIAJibctmm\nOf1HzG0WaF5OE0ZU06UcGD6SUiZTgtyqaA0jU9vExTYhYSobaWqGKxA1PspG\nMATdwowCSsHWrUx+jXpzuJnEAyDBLW0iVh+rjBmWWvZHS+fub3rE/yT5FOPI\nk1y4qSwsF2I8T8R+Moo1OewFQzUBbaCjdpnOsBluUWmSvkRiwr/lcwZznt51\nBCTVCgPAGPQhcHbHtM/cK8tqpGEXeFTKtHZ5fHCGsL49sLtGPTj3b948t4z/\n1BiZ\r\n=77vn\r\n-----END PGP SIGNATURE-----\r\n"
},
"gitHead": "bc898eeee723833fc9d604523e00014350bcc4e1",
"homepage": "https://github.com/epoberezkin/json-schema-traverse#readme",
"keywords": [
"JSON-Schema",
"traverse",
"iterate"
],
"license": "MIT",
"main": "index.js",
"maintainers": [
{
"name": "esp",
"email": "e.poberezkin@me.com"
}
],
"name": "json-schema-traverse",
"nyc": {
"exclude": [
"**/spec/**",
"node_modules"
],
"reporter": [
"lcov",
"text-summary"
]
},
"optionalDependencies": {},
"readme": "# json-schema-traverse\nTraverse JSON Schema passing each schema object to callback\n\n[](https://travis-ci.org/epoberezkin/json-schema-traverse)\n[](https://www.npmjs.com/package/json-schema-traverse)\n[](https://coveralls.io/github/epoberezkin/json-schema-traverse?branch=master)\n\n\n## Install\n\n```\nnpm install json-schema-traverse\n```\n\n\n## Usage\n\n```javascript\nconst traverse = require('json-schema-traverse');\nconst schema = {\n properties: {\n foo: {type: 'string'},\n bar: {type: 'integer'}\n }\n};\n\ntraverse(schema, {cb});\n// cb is called 3 times with:\n// 1. root schema\n// 2. {type: 'string'}\n// 3. {type: 'integer'}\n\n// Or:\n\ntraverse(schema, {cb: {pre, post}});\n// pre is called 3 times with:\n// 1. root schema\n// 2. {type: 'string'}\n// 3. {type: 'integer'}\n//\n// post is called 3 times with:\n// 1. {type: 'string'}\n// 2. {type: 'integer'}\n// 3. root schema\n\n```\n\nCallback function `cb` is called for each schema object (not including draft-06 boolean schemas), including the root schema, in pre-order traversal. Schema references ($ref) are not resolved, they are passed as is. Alternatively, you can pass a `{pre, post}` object as `cb`, and then `pre` will be called before traversing child elements, and `post` will be called after all child elements have been traversed.\n\nCallback is passed these parameters:\n\n- _schema_: the current schema object\n- _JSON pointer_: from the root schema to the current schema object\n- _root schema_: the schema passed to `traverse` object\n- _parent JSON pointer_: from the root schema to the parent schema object (see below)\n- _parent keyword_: the keyword inside which this schema appears (e.g. `properties`, `anyOf`, etc.)\n- _parent schema_: not necessarily parent object/array; in the example above the parent schema for `{type: 'string'}` is the root schema\n- _index/property_: index or property name in the array/object containing multiple schemas; in the example above for `{type: 'string'}` the property name is `'foo'`\n\n\n## Traverse objects in all unknown keywords\n\n```javascript\nconst traverse = require('json-schema-traverse');\nconst schema = {\n mySchema: {\n minimum: 1,\n maximum: 2\n }\n};\n\ntraverse(schema, {allKeys: true, cb});\n// cb is called 2 times with:\n// 1. root schema\n// 2. mySchema\n```\n\nWithout option `allKeys: true` callback will be called only with root schema.\n\n\n## License\n\n[MIT](https://github.com/epoberezkin/json-schema-traverse/blob/master/LICENSE)\n",
"readmeFilename": "README.md",
"repository": {
"type": "git",
"url": "git+https://github.com/epoberezkin/json-schema-traverse.git"
},
"scripts": {
"eslint": "eslint index.js spec",
"test": "npm run eslint && nyc npm run test-spec",
"test-spec": "mocha spec -R spec"
},
"version": "0.4.1"
}