{"_id":"@rdfjs/prefix-map","_rev":"6-aaab09e0c82051a29d49e6d97628a5a9","name":"@rdfjs/prefix-map","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"@rdfjs/prefix-map","version":"0.1.0","keywords":["map","prefix","rdf","rdfjs"],"author":{"url":"https://www.bergnet.org/people/bergi/card#me","name":"Thomas Bergwinkl","email":"bergi@axolotlfarm.org"},"license":"MIT","_id":"@rdfjs/prefix-map@0.1.0","maintainers":[{"name":"bergos","email":"bergi@bergnet.org"},{"name":"l00mi","email":"npm.michael@oiu.ch"}],"homepage":"https://github.com/rdfjs-base/prefix-map","bugs":{"url":"https://github.com/rdfjs-base/prefix-map/issues"},"dist":{"shasum":"535477372be8fa6e22285fb99d22932b52ab9edc","tarball":"https://registry.npmjs.org/@rdfjs/prefix-map/-/prefix-map-0.1.0.tgz","fileCount":8,"integrity":"sha512-F3B2EXysSX0wu7gE5puJONPJVxTQLGroDTMvR/9ZRsBYffNlHZmtT8H2fWi5UiPbVxXBiMElN+Y6MIuinYmKog==","signatures":[{"sig":"MEUCIQDRGYvdeaQgvU617e+nHhm33euJVSTjMRdvnA790lu4NgIgCp5tn2bnTIdtEJXJjh94dFdWnhhdDqvISQ/hWxDb0pA=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":12021,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhx68oCRA9TVsSAnZWagAAI2IP/0Ej56w18dDB+XmnS5Su\nouoyehW9EfzPZmODR1zbPPqO08Lgtk3xcyrHZvPZ+N5rab1xjK/BI8UR1ssz\nCDiZn8tHp6i4dIJhxIVJ4h5v+tmLrwvWfMIBY+uKbPcTxKX/7/6maVzVACe8\nLW9mF0qV37NgvfMsohWm2b9DA2nSzfX6lPYlhmIzRHTtTBm+TeemGRvWwehj\n0qyrfbmNePz1sQ/1eHM0XQVcIYg94qiupG7hkvFEPTJ1cjpavcomLSQ/pRZi\nlk2nnpiGhRkWa6u1O/ZQ/2HD4Z9o6OA0TvK81uF2AmJ58fD2Yn7PVJ4CnNav\naaewiK4+lnvKlHUtsJ4ITSik0CZYKE6ENYMF5eUfcdTQAcxHK9+ALqsjxjxW\nlJXJp6ADA1RGxFCH9MHPTfrvH6mKQpsIn+m9u9pkmOaJCiM48yBcUEonD6vK\nLXS4mWeBzFZuXBB1M74tBq/xKd9JD7XsfJUoSLP1T+MU3PM5nUXGxwyThx/4\nyF5yaP63PsPeQkhRqWx+XWbxIqEuum8AVEYADPHMYnATL1e8qw2LSF9slUFk\nFfc3SIDwx0DL+lgqazNqhQCynO+FEt4tvDIksyyCMVTpdJX/rXOZ+TXwpTT5\nMeuE56d2FQRCL1ROyBuT8NjqQgYUDRPGFChzIbfOmI3U1PM5iQXqdL4UYuQC\nd2JF\r\n=o3bQ\r\n-----END PGP SIGNATURE-----\r\n"},"main":"PrefixMap.js","type":"module","gitHead":"3d3b915927cf153b5b48b45559d5e533e2cd11ff","scripts":{"test":"stricter-standard && c8 --reporter=lcov --reporter=text mocha","coverage":"codecov"},"_npmUser":{"name":"bergos","email":"bergi@bergnet.org"},"repository":{"url":"git://github.com/rdfjs-base/prefix-map.git","type":"git"},"_npmVersion":"8.1.2","description":"A Map for RDF/JS prefixes","directories":{},"_nodeVersion":"16.13.1","dependencies":{"readable-stream":"^3.6.0"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^7.10.0","mocha":"^9.1.3","codecov":"^3.8.3","@rdfjs/data-model":"^1.3.4","stricter-standard":"^0.2.0","@rdfjs/environment":"^0.1.1"},"_npmOperationalInternal":{"tmp":"tmp/prefix-map_0.1.0_1640476456826_0.7440861908463736","host":"s3://npm-registry-packages"}},"0.1.1":{"name":"@rdfjs/prefix-map","version":"0.1.1","keywords":["map","prefix","rdf","rdfjs"],"author":{"url":"https://www.bergnet.org/people/bergi/card#me","name":"Thomas Bergwinkl","email":"bergi@axolotlfarm.org"},"license":"MIT","_id":"@rdfjs/prefix-map@0.1.1","maintainers":[{"name":"bergos","email":"bergi@bergnet.org"}],"homepage":"https://github.com/rdfjs-base/prefix-map","bugs":{"url":"https://github.com/rdfjs-base/prefix-map/issues"},"dist":{"shasum":"d0222b6b29aa27ce4f27939784b62ffbef152ad0","tarball":"https://registry.npmjs.org/@rdfjs/prefix-map/-/prefix-map-0.1.1.tgz","fileCount":9,"integrity":"sha512-w9VrJ/YfMyvdcpuKG0XEzgbH6AXtUSugvgL1U1IvbTYdL2rfIifaYkSyp86lEhD2hHeYUYAGZTKkpDErtXCMxQ==","signatures":[{"sig":"MEYCIQCdZciOs6tEFZpivorcZCCioA8vCoyNejauRasAfC/qHAIhANoVjORpYNEKOo4BCFm1LxtAI99MAozRzUcqt8c7nC2k","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13403,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjuvGFACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqHqg/+J8ae7hCfdRrKuJImjbxF5IFOsUlXNyRKZkcX2KUrvOIzM6u5\r\nADJBTM1amzTzfcNh9uhU3hNajM9mgWbZFu62uYXbSOF2gRqFlJ9f53+nQhxD\r\nY0FCDBF8bu9ya2A3+F+6SsDSbFdGVQIC9ceRFFoyEVbxJcFWz0CA0k4bLh66\r\n5D66QottmoHlUkGXvtQVWYGSC86u8L0UzrkCXhb5O9a2x91V1ogM9riLjDue\r\nOKzwI9ctpTtWX1gI5GNgDc4sFbWLIvcGrR0VNnZ/94dRQRjL0HHNGbSI9W2I\r\ntwzBD2ToMDVIRLK2pW4zqcdLfuPN/rhRKCHGyGDUgw2cyxhoZGqM8cLMC2iz\r\nvD6MENYLdbs82BKr4T/5YbPCuab3/1Khw1FLhPBKS6wQoIicDBwVyA126BON\r\n5+pYc0deevqHXN3ctdshqKUuGGZpJ63ywlaNxMlZeqHEtynim6BLMWrQ77r3\r\netwcPPaib02HVKYCTwzr624D7wzPyIyt5vke/v7A6tbjDUqkJ25CkEL5nihM\r\nPZ8DmrpyQn1UCbxxFEmYmGK/QRqUy79doEgA+GqRIAy4SYNwlcaoiQ+tggqx\r\nnj50p1OfVefVqX6lx67xoZ12zwSGSLHn4kxlkxnEaVAiktJk/m0+P8YVsJ0n\r\nSSjI4QzSHwna+j50e+cy6Kukjip1+oF4rhM=\r\n=qUlR\r\n-----END PGP SIGNATURE-----\r\n"},"main":"PrefixMap.js","type":"module","gitHead":"996b19d444e5a44c7ac804928d28e6fe869fc6ff","scripts":{"test":"stricter-standard && c8 --reporter=lcov --reporter=text mocha"},"_npmUser":{"name":"bergos","email":"bergi@bergnet.org"},"repository":{"url":"git+https://github.com/rdfjs-base/prefix-map.git","type":"git"},"_npmVersion":"8.19.2","description":"A Map for RDF/JS prefixes","directories":{},"_nodeVersion":"18.12.1","dependencies":{"readable-stream":"^4.3.0"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^7.12.0","mocha":"^10.2.0","@rdfjs/data-model":"^2.0.1","stricter-standard":"^0.2.0","@rdfjs/environment":"^0.1.1"},"_npmOperationalInternal":{"tmp":"tmp/prefix-map_0.1.1_1673195908821_0.22078798345511674","host":"s3://npm-registry-packages"}},"0.1.2":{"name":"@rdfjs/prefix-map","version":"0.1.2","keywords":["map","prefix","rdf","rdfjs"],"author":{"url":"https://www.bergnet.org/people/bergi/card#me","name":"Thomas Bergwinkl","email":"bergi@axolotlfarm.org"},"license":"MIT","_id":"@rdfjs/prefix-map@0.1.2","maintainers":[{"name":"bergos","email":"bergi@bergnet.org"}],"homepage":"https://github.com/rdfjs-base/prefix-map","bugs":{"url":"https://github.com/rdfjs-base/prefix-map/issues"},"dist":{"shasum":"84f15d8f2b88234711f8c544ae14a56cbb8a6ee9","tarball":"https://registry.npmjs.org/@rdfjs/prefix-map/-/prefix-map-0.1.2.tgz","fileCount":10,"integrity":"sha512-qapFYVPYyYepg0sFy7T512667iZsN9a3RNcyNBTBV+O8wrU3v/URQZOipCTNrEm1BXzZ7KCK1Yi8HrE1y+uRuQ==","signatures":[{"sig":"MEQCIEiJdNCheUkgFLx1yBmAnLWau9BQthcg4J/Cqj8WlW0yAiBXrF+rdzQDb5YYtZqnLKvDyqZDEqZTSdn/q4UUXSmGQA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":13618},"main":"PrefixMap.js","type":"module","gitHead":"f35c979f9255c182a75a93abac899327c065b8f9","scripts":{"test":"stricter-standard && c8 --reporter=lcov --reporter=text mocha"},"_npmUser":{"name":"bergos","email":"bergi@bergnet.org"},"repository":{"url":"git+https://github.com/rdfjs-base/prefix-map.git","type":"git"},"_npmVersion":"10.2.4","description":"A Map for RDF/JS prefixes","directories":{},"_nodeVersion":"20.11.0","dependencies":{"readable-stream":"^4.3.0"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^9.1.0","mocha":"^10.2.0","@rdfjs/data-model":"^2.0.1","stricter-standard":"^0.3.1","@rdfjs/environment":"^1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/prefix-map_0.1.2_1717341057443_0.287983989573501","host":"s3://npm-registry-packages"}}},"time":{"created":"2021-12-25T23:54:16.772Z","modified":"2026-02-11T20:56:39.685Z","0.1.0":"2021-12-25T23:54:16.984Z","0.1.1":"2023-01-08T16:38:28.984Z","0.1.2":"2024-06-02T15:10:57.604Z"},"bugs":{"url":"https://github.com/rdfjs-base/prefix-map/issues"},"author":{"url":"https://www.bergnet.org/people/bergi/card#me","name":"Thomas Bergwinkl","email":"bergi@axolotlfarm.org"},"license":"MIT","homepage":"https://github.com/rdfjs-base/prefix-map","keywords":["map","prefix","rdf","rdfjs"],"repository":{"url":"git+https://github.com/rdfjs-base/prefix-map.git","type":"git"},"description":"A Map for RDF/JS prefixes","maintainers":[{"email":"bergi@bergnet.org","name":"bergos"},{"email":"matthieubosquet@gmail.com","name":"matthieubosquet"}],"readme":"# @rdfjs/prefix-map\n\n[![build status](https://img.shields.io/github/actions/workflow/status/rdfjs-base/prefix-map/test.yaml?branch=master)](https://github.com/rdfjs-base/prefix-map/actions/workflows/test.yaml)\n[![npm version](https://img.shields.io/npm/v/@rdfjs/prefix-map.svg)](https://www.npmjs.com/package/@rdfjs/prefix-map)\n\nA Map for RDF/JS prefixes.\n\nThis package implements the JavaScript Map interface for RDF prefixes.\nKey-Value pairs are stored with the prefix as the key as a string and the namespaces as the value in an RDF/JS NamedNode object. \nThere are some additional convenience methods to handle CURIEs and prefix events of RDF/JS Quad streams.\n\n## Usage\n\nThe package exports the constructor of the PrefixMap.\nNew instances with initial pairs can be created just like JavaScript `Map`s but require an additional `factory` argument:\n\n```javascript\nimport rdf from '@rdfjs/data-model'\nimport PrefixMap from '@rdfjs/prefix-map'\n\n// create a PrefixMap, fill it with some initial values, and hand over the data model factory\nconst prefixes = new PrefixMap([\n  ['rdf', rdf.namedNode('http://www.w3.org/1999/02/22-rdf-syntax-ns#')],\n  ['schema', rdf.namedNode('http://schema.org')]\n], { factory: rdf })\n\n// create two NamedNodes, one with a CURIE and one with a full IRI\nconst personShort = rdf.namedNode('schema:Person')\nconst typeLong = rdf.namedNode('http://www.w3.org/1999/02/22-rdf-syntax-ns#type') \n\n// convert the CURIE to a full IRI and vice versa\nconst personLong = prefixes.resolve(personShort)\nconst typeShort = prefixes.shrink(typeLong)\n\n// write the result to the console\nconsole.log(personLong.value) // -> http://schema.org/Person\nconsole.log(typeShort.value) // -> rdf:type\n```\n","readmeFilename":"README.md"}