Skip to content
This repository has been archived by the owner on Feb 6, 2018. It is now read-only.

nhurden/ember-jsonld

Repository files navigation

ember-jsonld

An Ember-friendly jsonld.js wrapper.

Installation

ember install ember-jsonld

Usage

import { expand, compact, flatten, frame, toRDF, normalize } from 'ember-jsonld';

expand(json).then(function(expanded) {
  // expansion success
}).catch(function(error) {
  // expansion failure
}).finally(function() {
  // expansion success or failure
});

var hash = Ember.RSVP.hash({
  expanded: expand(json),
  compacted: compact(json, context),
  flattened: flatten(json),
  framed: frame(json, frame),
  nquads: toRDF(json, {format: 'application/nquads'}),
  normalized: normalize(json, {format: 'application/nquads'})
});

Contributing

Installing dependencies and running tests:

npm install && npm test

About

An Ember-friendly jsonld.js wrapper.

Resources

License

Stars

Watchers

Forks

Packages

No packages published