{"name":"@swagger-api/apidom-json-pointer","version":"0.69.1","author":{"name":"Vladimír Gorej"},"license":"Apache-2.0","_id":"@swagger-api/apidom-json-pointer@0.69.1","maintainers":[{"name":"swagger-api","email":"apiteam@swagger.io"}],"homepage":"https://github.com/swagger-api/apidom#readme","bugs":{"url":"https://github.com/swagger-api/apidom/issues"},"dist":{"shasum":"4a9de62c27007fec87b116784c835566bd0566a5","tarball":"http://registry-npm.ywwl.com/@swagger-api/apidom-json-pointer/download/@swagger-api/apidom-json-pointer-0.69.1.tgz","fileCount":18,"integrity":"sha512-bRSSpSdXVQQ0LTmdY/KDZ7XqxwMf1DmgOqStFq71A8UZs1cTAa83qQ7+OAPqz3/qhSVAOE1sIU5fc32j+wqtmg==","signatures":[{"sig":"MEUCIF9y9o+2rPQmHua2ToULsdK7+JjcjerUSUyqoyFnhxJxAiEA8U7EikWrgUuPs4/L6aPjxRr8HZNMmB49+xAI1MRfMqQ=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":887395,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkIw8qACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrLARAAoUKHcZfU5qJIQ1qgZsD9cx2X3fUM2m0B4q+tvufYO/xaAao6\r\nIx1ttEteRPwwvas++1op7JdORORfTSxlIf4amvOK4DwNfCkKmq2X9pVWWfBR\r\n5CHgGkFg2WxFem+/Rt8OcrB8KoLVh6DlUv+vRqG/8xflTLZ+QpE0igudVG0E\r\noEKBc/4ENHCvMEDtbBezr6b3yIxlThihQ3MFBu+NCV9GEYV6NKMBzfJKiIf+\r\nRLccs/VhCPiu7wnQ677EL3lRO/KAEO6pgJ9owJcrOWBK0aUU/7ybfcJeP55s\r\n5nb5t3gCjzjav7ogpvwRDvSJyjXktalMHhHiHKWkYg+SO03e3ZSXm3hp+RJb\r\nqTefQ1N8gJcWIaswswkuw1Z198JsvAhVnMC9byjFdmtlWy0Z5UnOG9VJ4zSI\r\nXfpL7iuTJiFltgjvdntW2dvadK1NPB6+53Opn8A2sUFibHn2obn0yfKprd+U\r\nmfAUSvDypr0aJf42TxKfUsLYG7zAq6V/ixMJDA3mC6oE3qdCANpZfkfF6OBo\r\nuR7DDZcAVA64NG+E3v/OC1jof2nlS1uJcBMFDf8PC/74Rizy9lmfRIjmjBep\r\nuiWxTs5RG26q1w3iA1b0dL0/kvxNAMiHwRsfWnhvVKKVFACUahPCIa1JtU39\r\nc8a7i/u/F/7wxg4Xt+NSell0YSDDO1Kls28=\r\n=5eUp\r\n-----END PGP SIGNATURE-----\r\n","size":148762,"noattachment":false,"key":"/@swagger-api/apidom-json-pointer/-/@swagger-api/apidom-json-pointer-0.69.1.tgz"},"main":"./cjs/index.cjs","type":"module","types":"./types/dist.d.ts","unpkg":"./dist/apidom-json-pointer.browser.min.js","exports":{"types":"./types/dist.d.ts","import":"./es/index.js","require":"./cjs/index.cjs"},"gitHead":"977837b2e93c600fe09ded688cd67c5ee2a782d5","scripts":{"lint":"eslint ./","test":"cross-env NODE_ENV=test BABEL_ENV=cjs mocha","build":"npm run clean && run-p --max-parallel ${CPU_CORES:-2} typescript:declaration build:es build:cjs build:umd:browser","clean":"rimraf ./es ./cjs ./dist ./types","prepack":"copyfiles -u 3 ../../LICENSES/* LICENSES && copyfiles -u 2 ../../NOTICE .","build:es":"cross-env BABEL_ENV=es babel src --out-dir es --extensions '.ts' --root-mode 'upward'","lint:fix":"eslint ./ --fix","postpack":"rimraf NOTICE LICENSES","build:cjs":"cross-env BABEL_ENV=cjs babel src --out-dir cjs --extensions '.ts' --out-file-extension '.cjs' --root-mode 'upward'","build:umd:browser":"cross-env BABEL_ENV=browser BROWSERSLIST_ENV=production webpack --config config/webpack/browser.config.js --progress","typescript:check-types":"tsc --noEmit","typescript:declaration":"tsc -p declaration.tsconfig.json && rollup -c config/rollup/types.dist.js"},"_npmUser":{"name":"swagger-api","email":"apiteam@swagger.io"},"repository":{"url":"git+https://github.com/swagger-api/apidom.git","type":"git"},"_npmVersion":"lerna/6.6.1/node@v16.19.1+x64 (linux)","description":"Evaluate JSON Pointer expressions against ApiDOM.","directories":{},"sideEffects":false,"_nodeVersion":"16.19.1","dependencies":{"ramda":"=0.28.0","@types/ramda":"=0.28.23","ramda-adjunct":"=3.4.0","@babel/runtime-corejs3":"^7.20.7","@swagger-api/apidom-core":"^0.69.1"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/apidom-json-pointer_0.69.1_1680019242460_0.7295177101239929","host":"s3://npm-registry-packages"},"readme":"# @swagger-api/apidom-json-pointer\n\n`apidom-json-pointer` is a package that evaluates [JSON Pointer](https://datatracker.ietf.org/doc/html/rfc6901) against ApiDOM.\n\n## Installation\n\nYou can install this package via [npm CLI](https://docs.npmjs.com/cli) by running the following command:\n\n```sh\n $ npm install @swagger-api/apidom-json-pointer\n```\n## Evaluating\n\n```js\nimport { ObjectElement } from '@swagger-api/apidom-core';\nimport { evaluate } from '@swagger-api/apidom-json-pointer';\n\nconst apidom = new ObjectElement({ a: { b: 'c' } });\nconst result =  evaluate('/a/b', apidom);\n// => StringElement('c')\n```\n\n## Parsing\n\nParses JSON Pointer into list of tokens.\n\n```js\nimport { parse } from '@swagger-api/apidom-json-pointer';\n\nconst tokens = parse('/a/b'); // => ['a', 'b']\n```\n\n## Compiling\n\nCompiles list of tokens into JSON Pointer.\n\n```js\nimport { compile } from '@swagger-api/apidom-json-pointer';\n\nconst jsonPointer = compile(['a', 'b']); // => '/a/b'\n```\n\n## Escaping\n\nEscapes/unescapes tokens of JSON Pointer.\n\n```js\nimport { escape, unescape } from '@swagger-api/apidom-json-pointer';\n\nescape('~a/'); // => '~0a~1'\nunescape('~0a~1'); // => '~a/'\n```\n\n## Transforming URI to JSON Pointer\n\nHandles case of [URI Fragment Identifier Representation](https://datatracker.ietf.org/doc/html/rfc6901#section-6).\n\n```js\nimport { uriToPointer } from '@swagger-api/apidom-json-pointer';\n\nuriToPointer('https://example.com/path/#/a/b'); // => '/a/b'\n```\n\n## Invalid JSON Pointers\n\nIf invalid JSON Pointer is supplied to `parse` or `evaluate` functions, `InvalidJsonPointerError`\nis thrown.\n\n```js\nimport { InvalidJsonPointerError } from '@swagger-api/apidom-json-pointer';\n```\n\nIf valid JSON Pointer is supplied to `evaluate` function and the pointer cannot be evaluated against\nApiDOM fragment, `EvaluationJsonPointerError` is thrown.\n\n```js\nimport { EvaluationJsonPointerError } from '@swagger-api/apidom-json-pointer';\n```\n","publish_time":1680019242699,"_cnpm_publish_time":1680019242699,"dist-tags":{"latest":"1.14.0","v1.11-maintenance":"1.11.6"}}