Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/digitalbazaar/rdf-canonize-native
A native implementation of the RDF Dataset Normalization Algorithm for Node.js.
https://github.com/digitalbazaar/rdf-canonize-native
json-ld rdf
Last synced: 2 months ago
JSON representation
A native implementation of the RDF Dataset Normalization Algorithm for Node.js.
- Host: GitHub
- URL: https://github.com/digitalbazaar/rdf-canonize-native
- Owner: digitalbazaar
- License: other
- Created: 2018-08-03T20:13:22.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-03-28T17:56:06.000Z (almost 6 years ago)
- Last Synced: 2024-11-04T07:02:17.203Z (3 months ago)
- Topics: json-ld, rdf
- Language: JavaScript
- Size: 234 KB
- Stars: 6
- Watchers: 12
- Forks: 0
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# rdf-canonize-native
[![Build status](https://img.shields.io/travis/digitalbazaar/rdf-canonize-native.svg)](https://travis-ci.org/digitalbazaar/rdf-canonize-native)
[![Dependency Status](https://img.shields.io/david/digitalbazaar/rdf-canonize-native.svg)](https://david-dm.org/digitalbazaar/rdf-canonize-native)A native implementation of the [RDF Dataset Normalization Algorithm][] for
[rdf-canonize][] and Node.js.Introduction
------------...
Installation
------------Currently this module is intended to be used via [rdf-canonize][] but is not a
direct dependency so must be explicitly installed.### node.js + npm
```
npm install rdf-canonize
npm install rdf-canonize-native
``````js
const canonize = require('rdf-canonize');
```### Browser (AMD) + npm
```
npm install rdf-canonize
```Use your favorite technology to load `node_modules/dist/rdf-canonize.min.js`.
### HTML
Various NPM proxy CDN sites offer direct access to NPM files.
Examples
--------```js
const dataset = {
// ...
};// canonize a data set with a particular algorithm using callback
canonize.canonize(dataset, {algorithm: 'URDNA2015'}, function(err, canonical) {
// ...
});// canonize a data set with a particular algorithm using async/await
const canonical = canonize.canonize(dataset, {algorithm: 'URDNA2015'});
```Related Modules
---------------* [rdf-canonize][]: The JavaScript implementation of the [RDF Dataset
Normalization Algorithm][].
* [jsonld.js][]: An implementation of the [JSON-LD][] specification.Tests
-----This library includes a sample testing utility which may be used to verify
that changes to the processor maintain the correct output.The test suite is included in an external repository:
https://github.com/json-ld/normalization
This should be a sibling directory of the rdf-canonize directory or in a
`test-suites` dir. To clone shallow copies into the `test-suites` dir you can
use the following:npm run fetch-test-suite
Node.js tests can be run with a simple command:
npm test
If you installed the test suites elsewhere, or wish to run other tests, use
the `TEST_DIR` environment var:TEST_DIR="/tmp/tests" npm test
To generate earl reports:
# generate the earl report for node.js
EARL=earl-node.jsonld npm testBenchmark
---------See docs in the [benchmark README](./benchmark/README.md).
Source
------The source code for this library is available at:
https://github.com/digitalbazaar/rdf-canonize-native
Commercial Support
------------------Commercial support for this library is available upon request from
[Digital Bazaar][]: [email protected][Digital Bazaar]: https://digitalbazaar.com/
[JSON-LD]: https://json-ld.org/
[RDF Dataset Normalization Algorithm]: https://json-ld.github.io/normalization/
[jsonld.js]: https://github.com/digitalbazaar/jsonld.js
[rdf-canonize]: https://github.com/digitalbazaar/rdf-canonize