Skip to content

Commit

Permalink
eval = false, update package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
easbittm committed Oct 19, 2021
1 parent c7f95ae commit cab1238
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions lib/CodeInterpreter.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ export default class CodeInterpreter {
}
this.#validator = new NodeVM({
sandbox: this.#context,
eval: false,
}).run(scripts[this.#code].vm);
}
parse() {
Expand Down Expand Up @@ -71,6 +72,7 @@ export default class CodeInterpreter {
stream = Readable.from(recordset).pipe(new Transform({
readableObjectMode: true,
writableObjectMode: true,
autoDestroy: true,
transform(row, encoding, cb) {
query.interpreterRows++;
if(validator(row) === true)
Expand Down Expand Up @@ -117,6 +119,7 @@ export default class CodeInterpreter {
new Transform({
readableObjectMode: true,
writableObjectMode: true,
autoDestroy: true,
transform(id, encoding, cb) {
let val = db.get(dbKey(id));
if(result.query.interpreterNeeded) {
Expand Down
5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "filterdb",
"version": "0.1.0",
"description": "",
"description": "filterdb is an fully extendable no-SQL database completly written in node.js. Data could be accessed with JS-Array like find/filter Syntax. So there is no need to learn a new QueryLanguage.",
"type": "module",
"main": "lib/Database.js",
"scripts": {
Expand All @@ -13,7 +13,8 @@
"type": "git",
"url": "git+https://github.com/sbittmann/filterdb.git"
},
"author": "",
"author": "sbittmann",
"keywords": ["stream", "database", "db", "store", "storage", "json"],
"license": "MIT",
"bugs": {
"url": "https://github.com/sbittmann/filterdb/issues"
Expand Down

0 comments on commit cab1238

Please sign in to comment.