N3.js
N3.js copied to clipboard
feature/add handle quads
Supercedes #319
Given #330, maybe this could become:
const writer3 = new N3.Writer({ syntax: 'flexible' }); // Also output quads that cannot be expressed in the chosen syntax (default)
const writer4 = new N3.Writer({ syntax: 'drop' }); // Drop components or quads that cannot be expressed in the chosen syntax
const writer5 = new N3.Writer({ graphs: 'strict' }); // Throws an error when a quad cannot be expressed in the chosen syntax
Should we add proper validation to writer at the same time (e.g. for the cases in #330)?
Yes, that's the direction. But we don't need to have that right now; i.e., this can be the meaning of the strict
option, and not validating everything can be a bug until fixed.