Socket
Socket
Sign inDemoInstall

evallog

Package Overview
Dependencies
1
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.0 to 1.0.1

build/evallog.js

13

package.json
{
"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');
```
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc