Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

amf-shacl-node

Package Overview
Dependencies
Maintainers
3
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amf-shacl-node

SHACL Library

  • 2.0.1-INTERNAL.1
  • false
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.3K
increased by49.14%
Maintainers
3
Weekly downloads
 
Created
Source

SHACL.js Build Status

Usage

Create a new SHACL validator and load shapes and data to trigger the validation. The validation function returns a ValidationReport object that can be used to inspect conformance rand results.

var validator = new SHACLValidator();
validator.validate(data, "text/turtle", shapes, "text/turtle", function (e, report) {
    console.log("Conforms? " + report.conforms());
    if (report.conforms() === false) {
        report.results().forEach(function(result) {
            console.log(" - Severity: " + result.severity() + " for " + result.sourceConstraintComponent());
        });
    }
});

Building for the web

A browser version of the library will be built in the dist directory using the gulp browserify task.

Running the tests

Tests can be run using the test gulp task.

Running the web tests

Tests can be run for the browser version running the test-web gulp task. This task will generate the test cases from the node version and start a server in port 3000. The browser version of the library must have been built before running this task.

Regenerating vocabularies and libraries

The vocabularies for SHACL and DASH are located in the vocabularies directory. After modifying these files, they must be transformed into library code using the generate-vocabularies gulp task. The JS libraries referenced in the DASH vocabulary can be found in the shared directory. They can be bundled into the library build using the generate-libraries gulp command. If they are not bundled, the library will try to de-reference them using HTTP.

FAQs

Package last updated on 01 Feb 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc