We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1472759 commit 189d228Copy full SHA for 189d228
1 file changed
index.js
@@ -215,6 +215,17 @@ function levelgraphJSONLD(db, jsonldOpts) {
215
graphdb.jsonld.del = function(obj, options, callback) {
216
var blanks = {};
217
218
+ if (typeof obj === 'string') {
219
+ try {
220
+ obj = JSON.parse(obj);
221
+ } catch (e) {
222
+ // Handle case where we're trying to delete by passing an IRI
223
+ if (!N3Util.isIRI(obj)) {
224
+ throw e
225
+ }
226
227
228
+
229
if (typeof options === 'function') {
230
callback = options;
231
options = {};
0 commit comments