create-lowdb-sync
Advanced tools
Comparing version 1.0.5 to 1.0.6
{ | ||
"name": "create-lowdb-sync", | ||
"version": "1.0.5", | ||
"version": "1.0.6", | ||
"description": "", | ||
"repository": "jimthedev/create-lowdb-sync", | ||
"main": "dist/main.js", | ||
"main": "src/index.js", | ||
"scripts": { | ||
"dev": "webpack --mode development --target node --module-bind js=babel-loader", | ||
"build": "webpack --mode production --target node --module-bind js=babel-loader", | ||
"test": "echo \"Error: no test specified\" && exit 1" | ||
@@ -19,10 +17,3 @@ }, | ||
"uuid": "^3.2.1" | ||
}, | ||
"devDependencies": { | ||
"babel-core": "^6.26.0", | ||
"babel-loader": "^7.1.4", | ||
"babel-preset-env": "^1.6.1", | ||
"webpack": "^4.1.1", | ||
"webpack-cli": "^2.0.11" | ||
} | ||
} |
// Simulate a db | ||
import low from 'lowdb'; | ||
import fse from 'fs-extra'; | ||
import {v1} from 'uuid'; | ||
const FileSync = require('lowdb/adapters/FileSync') | ||
const low = require('lowdb'); | ||
const fse = require('fs-extra'); | ||
const {v1} = require('uuid'); | ||
const FileSync = require('lowdb/adapters/FileSync'); | ||
// database creator and migrator | ||
export const createDatabase = (name, initialState) => { | ||
const createDatabase = (name, initialState) => { | ||
const uuid = v1(); | ||
@@ -19,2 +19,6 @@ fse.ensureDir(`/tmp/${uuid}`); | ||
return db; | ||
} | ||
module.exports = { | ||
createDatabase | ||
} |
Uses eval
Supply chain riskPackage uses eval() which is a dangerous function. This prevents the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
0
20
2
2
0
168671
4