{"_id":"rdf-validation","_rev":"1-482f16f8c4a04e2d7be4cf6eab64c4cb","name":"rdf-validation","description":"Validate RDF/JS objects","dist-tags":{"latest":"0.1.1"},"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","description":"Validate RDF/JS objects","type":"module","main":"index.js","scripts":{"test":"stricter-standard && c8 --reporter=lcov --reporter=text-summary mocha"},"repository":{"type":"git","url":"git+https://github.com/rdf-ext/rdf-validation.git"},"keywords":["datatype","literal","model","rdf","rdfjs","validate","validation","xsd"],"author":{"name":"Thomas Bergwinkl","email":"bergi@axolotlfarm.org","url":"https://www.bergnet.org/people/bergi/card#me"},"license":"MIT","bugs":{"url":"https://github.com/rdf-ext/rdf-validation/issues"},"homepage":"https://github.com/rdf-ext/rdf-validation","dependencies":{"@rdfjs/data-model":"^2.0.1","@rdfjs/namespace":"^2.0.0","@rdfjs/term-map":"^2.0.0","@rdfjs/to-ntriples":"^3.0.1"},"devDependencies":{"c8":"^10.1.2","mocha":"^10.2.0","stricter-standard":"^0.3.0"},"_id":"rdf-validation@0.1.1","gitHead":"6cf69c0baa7559021309660086080a50f663bb8c","_nodeVersion":"20.11.0","_npmVersion":"10.2.4","dist":{"integrity":"sha512-z2RbRcsKOM+CWa7qoI4LWCQQTji64eoBNLvbP3++0ZE4pO4EP1xkV5asSH4TULeLfDEuMhzyDXRnAjA+8R2l4w==","shasum":"46f434962ed7eed42040c3af39432abc8d35d714","tarball":"https://registry.npmjs.org/rdf-validation/-/rdf-validation-0.1.1.tgz","fileCount":37,"unpackedSize":79149,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIEb+TkeTAcyJXzqCsL9wqfzIHdWsAFecapW6xZCU4kD+AiEAzJ1Efw0usRaMGzEx4NWrrI/y48nehBj3rfBT4xaqFpE="}]},"_npmUser":{"name":"bergos","email":"bergi@bergnet.org"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/rdf-validation_0.1.1_1719081926239_0.484051572541389"},"_hasShrinkwrap":false}},"time":{"created":"2024-02-04T21:33:17.571Z","modified":"2024-06-22T18:45:26.562Z","0.1.0":"2024-02-04T21:33:17.756Z","0.1.1":"2024-06-22T18:45:26.393Z"},"maintainers":[{"name":"bergos","email":"bergi@bergnet.org"}],"author":{"name":"Thomas Bergwinkl","email":"bergi@axolotlfarm.org","url":"https://www.bergnet.org/people/bergi/card#me"},"repository":{"type":"git","url":"git+https://github.com/rdf-ext/rdf-validation.git"},"keywords":["datatype","literal","model","rdf","rdfjs","validate","validation","xsd"],"license":"MIT","homepage":"https://github.com/rdf-ext/rdf-validation","bugs":{"url":"https://github.com/rdf-ext/rdf-validation/issues"},"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"}