{"_id":"rdf-validation","_rev":"3-f3da57db5d37056fcb9e69a99dfdd17f","name":"rdf-validation","dist-tags":{"latest":"0.1.2"},"versions":{"0.1.0":{"name":"rdf-validation","version":"0.1.0","keywords":["datatype","literal","model","rdf","rdfjs","validate","validation","xsd"],"author":{"url":"https://www.bergnet.org/people/bergi/card#me","name":"Thomas Bergwinkl","email":"bergi@axolotlfarm.org"},"license":"MIT","_id":"rdf-validation@0.1.0","maintainers":[{"name":"bergos","email":"bergi@bergnet.org"}],"homepage":"https://github.com/rdf-ext/rdf-validation","bugs":{"url":"https://github.com/rdf-ext/rdf-validation/issues"},"dist":{"shasum":"3920a557bc0fc9d2985099f0929b1def160b68c4","tarball":"https://registry.npmjs.org/rdf-validation/-/rdf-validation-0.1.0.tgz","fileCount":36,"integrity":"sha512-snnDIBD7ljmyuI95wSCvQCdZpJk9FCVEALG2eU6uCbo1JgbaM1WaV2sAGaa7OFs3fJ14ZAQm4j2sDi7aoqlTsQ==","signatures":[{"sig":"MEYCIQCLXdLNZhjeGwkVZN5+MqI3W4U8ewZluL0oYRbdhbWCEAIhANgCdOyyw1wgtnBCnEWtHl/TjhtomoZXTGTD70ucYrbC","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":78910},"main":"index.js","type":"module","gitHead":"fa8abe4e39c0f6365e518fa1261f6f3debfec211","scripts":{"test":"stricter-standard && c8 --reporter=lcov --reporter=text-summary mocha"},"_npmUser":{"name":"bergos","email":"bergi@bergnet.org"},"repository":{"url":"git+https://github.com/rdf-ext/rdf-validation.git","type":"git"},"_npmVersion":"10.2.4","description":"Validate RDF/JS objects","directories":{},"_nodeVersion":"20.11.0","dependencies":{"@rdfjs/term-map":"^2.0.0","@rdfjs/namespace":"^2.0.0","@rdfjs/data-model":"^2.0.1","@rdfjs/to-ntriples":"^2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^9.0.0","mocha":"^10.2.0","stricter-standard":"^0.3.0"},"_npmOperationalInternal":{"tmp":"tmp/rdf-validation_0.1.0_1707082397572_0.6172619114785531","host":"s3://npm-registry-packages"}},"0.1.1":{"name":"rdf-validation","version":"0.1.1","keywords":["datatype","literal","model","rdf","rdfjs","validate","validation","xsd"],"author":{"url":"https://www.bergnet.org/people/bergi/card#me","name":"Thomas Bergwinkl","email":"bergi@axolotlfarm.org"},"license":"MIT","_id":"rdf-validation@0.1.1","homepage":"https://github.com/rdf-ext/rdf-validation","bugs":{"url":"https://github.com/rdf-ext/rdf-validation/issues"},"dist":{"shasum":"46f434962ed7eed42040c3af39432abc8d35d714","tarball":"https://registry.npmjs.org/rdf-validation/-/rdf-validation-0.1.1.tgz","fileCount":37,"integrity":"sha512-z2RbRcsKOM+CWa7qoI4LWCQQTji64eoBNLvbP3++0ZE4pO4EP1xkV5asSH4TULeLfDEuMhzyDXRnAjA+8R2l4w==","signatures":[{"sig":"MEUCIEb+TkeTAcyJXzqCsL9wqfzIHdWsAFecapW6xZCU4kD+AiEAzJ1Efw0usRaMGzEx4NWrrI/y48nehBj3rfBT4xaqFpE=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":79149},"main":"index.js","type":"module","gitHead":"6cf69c0baa7559021309660086080a50f663bb8c","scripts":{"test":"stricter-standard && c8 --reporter=lcov --reporter=text-summary mocha"},"_npmUser":{"name":"bergos","email":"bergi@bergnet.org"},"repository":{"url":"git+https://github.com/rdf-ext/rdf-validation.git","type":"git"},"_npmVersion":"10.2.4","description":"Validate RDF/JS objects","directories":{},"_nodeVersion":"20.11.0","dependencies":{"@rdfjs/term-map":"^2.0.0","@rdfjs/namespace":"^2.0.0","@rdfjs/data-model":"^2.0.1","@rdfjs/to-ntriples":"^3.0.1"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^10.1.2","mocha":"^10.2.0","stricter-standard":"^0.3.0"},"_npmOperationalInternal":{"tmp":"tmp/rdf-validation_0.1.1_1719081926239_0.484051572541389","host":"s3://npm-registry-packages"}},"0.1.2":{"_id":"rdf-validation@0.1.2","bugs":{"url":"https://github.com/rdf-ext/rdf-validation/issues"},"dist":{"shasum":"869176f116fd12060a014608819646a504ad3002","tarball":"https://registry.npmjs.org/rdf-validation/-/rdf-validation-0.1.2.tgz","fileCount":37,"integrity":"sha512-K4Hl5UqqE/B5ODmujnz+oP2t3ptOSG3zvzPB3FlGw/yaT1iC4KEQxfMsq1UabyaGrh46LbRqAQiN7PnM/Ftx6g==","signatures":[{"sig":"MEUCIHkewK+31piHcCN3JMQn71zeXynGcRyg9dVgQ1TaWzwlAiEArkXgqsYP7cFrLbh3511jf+ECu7JWCM8yNLuyLujdrNk=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCFsjajobIQyAMkJYwZumLHGQX/IAYcLqcsbmveOZvogAIgf6N1B6cwtduHgudrJfZ1sVuk8Ku31TIb+Xdr03+ALtI="}],"unpackedSize":80358},"main":"index.js","name":"rdf-validation","type":"module","author":{"url":"https://www.bergnet.org/people/bergi/card#me","name":"Thomas Bergwinkl","email":"bergi@axolotlfarm.org"},"gitHead":"d9b20031ecbadb0e3e96a5e786aa7072c94fcf00","license":"MIT","scripts":{"test":"stricter-standard && c8 --reporter=lcov --reporter=text-summary mocha"},"version":"0.1.2","_npmUser":{"name":"bergos","email":"bergi@bergnet.org"},"homepage":"https://github.com/rdf-ext/rdf-validation","keywords":["datatype","literal","model","rdf","rdfjs","validate","validation","xsd"],"repository":{"url":"git+https://github.com/rdf-ext/rdf-validation.git","type":"git"},"_npmVersion":"11.16.0","description":"Validate RDF/JS objects","directories":{},"maintainers":[{"name":"bergos","email":"bergi@bergnet.org"}],"_nodeVersion":"24.18.0","dependencies":{"@rdfjs/term-map":"^2.0.0","@rdfjs/namespace":"^2.0.0","@rdfjs/data-model":"^2.0.1","@rdfjs/to-ntriples":"^3.0.1"},"_hasShrinkwrap":false,"devDependencies":{"c8":"^12.0.0","mocha":"^12.0.0","stricter-standard":"^0.3.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/rdf-validation_0.1.2_1791738061174_0.7071545935817818"}}},"time":{"created":"2024-02-04T21:33:17.571Z","modified":"2026-10-11T17:01:01.444Z","0.1.0":"2024-02-04T21:33:17.756Z","0.1.1":"2024-06-22T18:45:26.393Z","0.1.2":"2026-10-11T17:01:01.280Z"},"bugs":{"url":"https://github.com/rdf-ext/rdf-validation/issues"},"author":{"url":"https://www.bergnet.org/people/bergi/card#me","name":"Thomas Bergwinkl","email":"bergi@axolotlfarm.org"},"license":"MIT","homepage":"https://github.com/rdf-ext/rdf-validation","keywords":["datatype","literal","model","rdf","rdfjs","validate","validation","xsd"],"repository":{"url":"git+https://github.com/rdf-ext/rdf-validation.git","type":"git"},"description":"Validate RDF/JS objects","maintainers":[{"name":"bergos","email":"bergi@bergnet.org"}],"readme":"# rdf-validation\n\n[![build status](https://img.shields.io/github/actions/workflow/status/rdf-ext/rdf-validation/test.yaml?branch=master)](https://github.com/rdf-ext/rdf-validation/actions/workflows/test.yaml)\n[![npm version](https://img.shields.io/npm/v/rdf-validation.svg)](https://www.npmjs.com/package/rdf-validation)\n\n`rdf-validation` is a modular library to validate RDF data provided as RDF/JS objects.\nDifferent modules can be combined to tailor a validation according to personal needs.\n\n## Install\n\n```bash\nnpm install --save rdf-validation\n```\n\n## Usage\n\nThe package exports multiple validations.\nAll validations are classes, and it requires creating instances for them.\nA validation object has a `.validate()` and a `.validateSimple()` method.\n`.validate()` returns a `Report` with results for different checks and includes a message.\n`.validateSimple()` is an optimized method that returns only `true` if the given object is valid and `false` in case it is not.\n\n### Example\n\nSee the following example on how to check if quads match the RDF Model and literal values are valid according to the XSD specification:\n\n\n```js\nimport rdf from 'rdf-ext'\nimport { RdfModelValidation, XsdValidation } from '../index.js'\n\nconst rdfModelValidation = new RdfModelValidation({ factory: rdf })\nconst xsdValidation = new XsdValidation({ factory: rdf })\n\nconst quad = rdf.quad(\n  rdf.literal('resource'),\n  rdf.namedNode('https://example.org/date'),\n  rdf.literal('1.1.2001', rdf.namedNode('http://www.w3.org/2001/XMLSchema#date'))\n)\n\nconst rdfReport = rdfModelValidation.validate(quad)\nconsole.log(`conforms: ${rdfReport.conforms}`)\nconsole.log(`message: ${rdfReport.results[0].message[0]}`)\nconsole.log(`validateSimple: ${rdfModelValidation.validateSimple(quad)}`)\n\nconst xsdReport = xsdValidation.validate(quad.object)\nconsole.log(`conforms: ${xsdReport.conforms}`)\nconsole.log(`message: ${xsdReport.results[0].message[0]}`)\nconsole.log(`validateSimple: ${xsdValidation.validateSimple(quad.object)}`)\n```\n\nSee the `examples` folder for more examples.\n","readmeFilename":"README.md"}