@graphy/content.nq.read
Advanced tools
Comparing version 3.0.5 to 3.0.6
49
main.js
@@ -398,4 +398,16 @@ | ||
// string | ||
if('string' === typeof z_arg_0) { | ||
g_config.input = {string:z_arg_0}; | ||
} | ||
// null | ||
else if(null === z_arg_0) { | ||
g_config.input = null; | ||
} | ||
// node stream | ||
else if('function' === typeof z_arg_0.setEncoding) { | ||
g_config.input = {stream:z_arg_0}; | ||
} | ||
// config struct | ||
if(z_arg_0 && 'object' === typeof z_arg_0 && '[object Object]' === FN_TO_STRING_OBJECT.call(z_arg_0)) { | ||
else if(z_arg_0 && 'object' === typeof z_arg_0 && '[object Object]' === FN_TO_STRING_OBJECT.call(z_arg_0)) { | ||
g_config = z_arg_0; | ||
@@ -408,30 +420,15 @@ | ||
} | ||
// input arg | ||
// unknown | ||
else { | ||
// string | ||
if('string' === typeof z_arg_0) { | ||
g_config.input = {string:z_arg_0}; | ||
} | ||
// node stream | ||
else if('function' === typeof z_arg_0.setEncoding) { | ||
g_config.input = {stream:z_arg_0}; | ||
} | ||
// null | ||
else if(null === z_arg_0) { | ||
g_config.input = null; | ||
} | ||
// unknown | ||
else { | ||
throw new TypeError(`unexpected input type: ${z_arg_0}`); | ||
} | ||
throw new TypeError(`unexpected input type: ${z_arg_0}`); | ||
} | ||
// more args | ||
if(a_args.length > 1) { | ||
// copy onto struct | ||
Object.assign(g_config, a_args[1]); | ||
// more args | ||
if(a_args.length > 1) { | ||
// copy onto struct | ||
Object.assign(g_config, a_args[1]); | ||
// more args | ||
if(a_args.length > 2) { | ||
throw new TypeError(`unexpected argument(s) after input and config struct: ${a_args.slice(2)}`); | ||
} | ||
if(a_args.length > 2) { | ||
throw new TypeError(`unexpected argument(s) after input and config struct: ${a_args.slice(2)}`); | ||
} | ||
@@ -438,0 +435,0 @@ } |
{ | ||
"name": "@graphy/content.nq.read", | ||
"version": "3.0.5", | ||
"version": "3.0.6", | ||
"description": "Single-threaded RDF N-Quads content reader", | ||
@@ -26,6 +26,6 @@ "keywords": [ | ||
"dependencies": { | ||
"@graphy/core.data.factory": "^3.0.5", | ||
"@graphy/core.iso.stream": "^3.0.5", | ||
"@graphy/core.data.factory": "^3.0.6", | ||
"@graphy/core.iso.stream": "^3.0.6", | ||
"uri-js": "^4.2.2" | ||
} | ||
} |
13937
357