rdflib.js
rdflib.js copied to clipboard
Signature of all things which take S, P O, G should be consistent
At the moment you can write
store.add(me, ns.foaf('age'), 6, me.doc())
where the 6 is converted automatically to a literal but you can't do
let st = store.st(me, ns.foaf('age'), 6, me.doc())
store.add(st)
as the new statement code doesn't do the same liberal type coercion. In an ideal world, developers should know that they can use the same shortcuts (like string, Date, number, etc) with any function or method which takes subject, predicate, object, graph or for that matter subject, predicate, object .
This probably means bother using common functions to convert and using the same names of types.
This includes st, add, match, and probably others.
Would also fix https://github.com/linkeddata/rdflib.js/issues/416