+9
-5
@@ -97,10 +97,14 @@ /** | ||
| /** | ||
| * `anylogger.log([level='log',] ...args)` | ||
| * `anylogger.log(name, args)` | ||
| * | ||
| * Default log function used by `anylogger.new`. | ||
| * The log function used by `anylogger.new`. | ||
| * | ||
| * You can override this method to change invocation behavior. | ||
| * This method inspects the first argument to determine the log level to | ||
| * log at (defaults to 'log') and then calls the correct method on the | ||
| * logger function with the remaining arguments. | ||
| * | ||
| * @param name {String} The name of the logger to use | ||
| * @param args {Array} The log arguments | ||
| * | ||
| * This method inspects the first argument in `args` to determine the log | ||
| * level to log at (defaults to 'log') and then calls the correct method | ||
| * on the logger function with the remaining arguments. | ||
| */ | ||
@@ -107,0 +111,0 @@ a.log = function(n,x) { |
+1
-1
| { | ||
| "name": "anylogger", | ||
| "version": "0.9.0", | ||
| "version": "0.10.0", | ||
| "description": "Get a logger. Any logger.", | ||
@@ -5,0 +5,0 @@ "main": "anylogger.js", |
+17
-17
@@ -1,2 +0,2 @@ | ||
| # anylogger <sub><sup>0.9.0</sup></sub> | ||
| # anylogger <sub><sup>0.10.0</sup></sub> | ||
| ### Get a logger. Any logger. | ||
@@ -67,5 +67,5 @@ | ||
| * [anylogger.js](https://unpkg.com/anylogger@0.9.0/anylogger.js) | ||
| * [anylogger.js](https://unpkg.com/anylogger@0.10.0/anylogger.js) | ||
| (fully commented source ~5kB) | ||
| * [anylogger.min.js](https://unpkg.com/anylogger@0.9.0/anylogger.min.js) | ||
| * [anylogger.min.js](https://unpkg.com/anylogger@0.10.0/anylogger.min.js) | ||
| (minified 592 bytes, gzipped ~[360](#gzip-size) bytes) | ||
@@ -78,3 +78,3 @@ | ||
| ```html | ||
| <script src="https://unpkg.com/anylogger@0.9.0/anylogger.min.js"></script> | ||
| <script src="https://unpkg.com/anylogger@0.10.0/anylogger.min.js"></script> | ||
| <script>(function(){ // IIFE | ||
@@ -107,3 +107,3 @@ var log = anylogger('index.html') | ||
| "peerDependencies": { | ||
| "anylogger": "^0.9.0" | ||
| "anylogger": "^0.10.0" | ||
| } | ||
@@ -157,3 +157,3 @@ } | ||
| ```js | ||
| var log = require('anylogger)('my-library'); | ||
| var log = require('anylogger')('my-library') | ||
| ``` | ||
@@ -164,4 +164,4 @@ | ||
| ```js | ||
| import anylogger from 'anylogger'; | ||
| const log = anylogger('my-library'); | ||
| import anylogger from 'anylogger' | ||
| const log = anylogger('my-library') | ||
| ``` | ||
@@ -215,3 +215,3 @@ | ||
| ```js | ||
| var log = require('anylogger)('my-module'); | ||
| var log = require('anylogger')('my-module') | ||
| ``` | ||
@@ -222,4 +222,4 @@ | ||
| ```js | ||
| import anylogger from 'anylogger'; | ||
| const log = anylogger('my-module'); | ||
| import anylogger from 'anylogger' | ||
| const log = anylogger('my-module') | ||
| ``` | ||
@@ -233,8 +233,8 @@ | ||
| ```js | ||
| var log = require('anylogger')('my-module'); | ||
| var log = require('anylogger')('my-module') | ||
| log('A debug message'); | ||
| log('warn', 'A warning message'); | ||
| log.info(log.name + ' starting...'); | ||
| log.error('Something went wrong', new Error('Oh no!')); | ||
| log('A debug message') | ||
| log('warn', 'A warning message') | ||
| log.info(log.name + ' starting...') | ||
| log.error('Something went wrong', new Error('Oh no!')) | ||
| ``` | ||
@@ -461,3 +461,3 @@ | ||
| Please have a look at the | ||
| [source](https://unpkg.com/anylogger@0.9.0/anylogger.js) | ||
| [source](https://unpkg.com/anylogger@0.10.0/anylogger.js) | ||
| it should make it more clear how to write an adapter. Also consider studying | ||
@@ -464,0 +464,0 @@ the [available adapters](https://www.npmjs.com/search?q=keywords:anylogger) |
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent 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
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent 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
29779
0.36%281
1.44%