evallog
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "evallog", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "JS library for simple logging expressions", | ||
@@ -18,3 +18,9 @@ "main": "build/index.js", | ||
}, | ||
"keywords": ["inspect", "dump", "eval", "log", "debug"], | ||
"keywords": [ | ||
"inspect", | ||
"dump", | ||
"eval", | ||
"log", | ||
"debug" | ||
], | ||
"author": "oprogramador", | ||
@@ -41,3 +47,6 @@ "license": "MIT", | ||
"sinon-chai": "^2.9.0" | ||
}, | ||
"dependencies": { | ||
"lodash": "^4.17.4" | ||
} | ||
} |
@@ -9,1 +9,34 @@ # node-evallog | ||
) | ||
## How to install? | ||
```npm install -g evallog``` | ||
## usage | ||
This library evaluates passed arguments and logs them. | ||
### using default logger (console.log) | ||
``` | ||
const x = { | ||
aVeryLongPropertyName: true, | ||
anotherVeryLongPropertyName: false, | ||
}; | ||
require('evallog')('x.aVeryLongPropertyName', 'x.anotherVeryLongPropertyName', 'x.aVeryLongPropertyName && x.anotherVeryLongPropertyName'); | ||
``` | ||
Output: | ||
``` | ||
``` | ||
### using custom logger | ||
``` | ||
const x = { | ||
aVeryLongPropertyName: true, | ||
anotherVeryLongPropertyName: false, | ||
}; | ||
function myLogger() { | ||
} | ||
require('evallog')(myLogger, 'x.aVeryLongPropertyName', 'x.anotherVeryLongPropertyName', 'x.aVeryLongPropertyName && x.anotherVeryLongPropertyName'); | ||
``` |
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
Empty package
Supply chain riskPackage does not contain any code. It may be removed, is name squatting, or the result of a faulty package publish.
Found 1 instance in 1 package
3627
5
22
42
1
+ Addedlodash@^4.17.4
+ Addedlodash@4.17.21(transitive)