rdflib.js icon indicating copy to clipboard operation
rdflib.js copied to clipboard

Fix circular dependency & expose a basic namespace map

Open rescribet opened this issue 7 years ago • 4 comments

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)
}

rescribet avatar Jul 11 '18 15:07 rescribet

Oh, I've caused a circular dependency

rescribet avatar Jul 11 '18 16:07 rescribet

LGTM, can you resolve the conflict?

michielbdejong avatar Jul 24 '19 08:07 michielbdejong

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

rescribet avatar Jul 30 '19 08:07 rescribet

@megoth can you review this PR?

michielbdejong avatar Jul 30 '19 11:07 michielbdejong