1.0.1 • Published 7 years ago

ldstars v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

ld-stars

CircleCI

Rate (as in five stars linked data) a schema.org document in JSON-LD.


Background

Developed by Tim Berners-Lee, the purpose of the 5-star rating system is to encourage adoption of best linked open data practices. Here are the requirements, taken from his original proposal:

★ Available on the web (whatever format) but with an open licence, to be Open Data

★★ Available as machine-readable structured data (e.g. excel instead of image scan of a table)

★★★ as (2) plus non-proprietary format (e.g. CSV instead of excel)

★★★★ All the above plus, Use open standards from W3C (RDF and SPARQL) to identify things, so that people can point at your stuff

★★★★★ All the above, plus: Link your data to other people’s data to provide context

API

import * as ldstars from 'ldstars';

ldstars.rate(doc , opts)

Rates a schema.org CreativeWork JSON-LD document.

opts include string: true.

returns a rating object.

{
  ol: true,
  of: true,
  re: true,
  uri: true,
  ld: true
}
  • ol: open license
  • of: open format
  • re: machine readable
  • uri: uniform resource identifiers
  • ld: linked data

ldstars.toString(rating)

Converts a rating object to a string:

ldstars.toString({ ol: false, of: false, re: true, uri:false, ld: true })

returns 're-ld'.

1.0.1

7 years ago

1.0.0

7 years ago

0.8.4

8 years ago

0.8.3

8 years ago

0.8.2

8 years ago

0.8.1

8 years ago

0.8.0

8 years ago

0.7.0

9 years ago

0.6.1

9 years ago

0.6.0

10 years ago

0.4.0

10 years ago

0.3.4

10 years ago

0.3.3

10 years ago

0.3.2

10 years ago

0.3.1

10 years ago

0.3.0

10 years ago

0.2.1

10 years ago

0.2.0

10 years ago

0.1.0

10 years ago

0.0.1

10 years ago

0.0.0

10 years ago