rdfjs / N3.js

Lightning fast, spec-compatible, streaming RDF for JavaScript
http://rdf.js.org/N3.js/
Other
714 stars 130 forks source link

README error on use of store.add() #361

Closed Jamie-SA closed 12 months ago

Jamie-SA commented 1 year ago

I think the README examples using store.add() might be incorrect when compared with the documentation at https://rdf.js.org/N3.js/docs/N3Store.html.

Current

const store = new N3.Store();
store.add(
  namedNode('http://ex.org/Pluto'),
  namedNode('http://ex.org/type'),
  namedNode('http://ex.org/Dog')
);
store.add(
  namedNode('http://ex.org/Mickey'),
  namedNode('http://ex.org/type'),
  namedNode('http://ex.org/Mouse')
);

Possible correction:

const store = new N3.Store();
store.addQuad(
  namedNode('http://ex.org/Pluto'),
  namedNode('http://ex.org/type'),
  namedNode('http://ex.org/Dog')
);
store.addQuad(
  namedNode('http://ex.org/Mickey'),
  namedNode('http://ex.org/type'),
  namedNode('http://ex.org/Mouse')
);
github-actions[bot] commented 11 months ago

:tada: This issue has been resolved in version 1.17.2 :tada:

The release is available on:

Your semantic-release bot :package::rocket: