rdflib.js
rdflib.js copied to clipboard
Fix circular dependency & expose a basic namespace map
The function was using a non-existent variable ns assuming it's available globally (which it might not).
This was taken from the map from link, but adapted and extended with some of the larger vocabs from lov. Notice that map has been frozen to prevent (accidental) change in behaviour by external sources, which is omitted in this commit.
I was wondering whether the following addition would be useful as well;
toJS () {
return Node.toJS(this)
}
Oh, I've caused a circular dependency
LGTM, can you resolve the conflict?
The conflict has been resolved, I've also added the LDP namespace which was missing
The problem of Node#toJS was fixed in https://github.com/linkeddata/rdflib.js/commit/62da35e6b2518c345b580cc517d77ef89f26ce8b, though that created a circular dependency by a top-level import of ns in Node which is still fixed in this commit, so I've renamed the PR to reflect the changes better
@megoth can you review this PR?