molly-db 1.0.20 → 1.0.21
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/module/_init_.js +2 -2
- package/package.json +1 -1
package/module/_init_.js
CHANGED
@@ -5,7 +5,7 @@ function fillDB( _db, _table, _path ){
|
|
5
5
|
let _itr = undefined;
|
6
6
|
|
7
7
|
if( (/^http/).test(_path) ){ try{
|
8
|
-
const stream = await fetch
|
8
|
+
const stream = await fetch(_path,{responseType:'stream'});
|
9
9
|
_itr = readline.createInterface({ input: stream })
|
10
10
|
} catch(e) { console.log(`error reading ${_path}`); return response(); }}
|
11
11
|
|
@@ -31,7 +31,7 @@ function fillDB( _db, _table, _path ){
|
|
31
31
|
const path = `${query.path}/_init_.json`;
|
32
32
|
|
33
33
|
if( (/^http/).test(query.path) ){
|
34
|
-
const stream = await fetch
|
34
|
+
const stream = await fetch(path);
|
35
35
|
db._init_ = stream.data;
|
36
36
|
} else{
|
37
37
|
db._buff_ = fs.readFileSync( path );
|