loglevel-mixin
Advanced tools
Comparing version 5.0.7 to 6.0.0
{ | ||
"name": "loglevel-mixin", | ||
"version": "5.0.7", | ||
"version": "6.0.0", | ||
"publishConfig": { | ||
@@ -5,0 +5,0 @@ "access": "public" |
@@ -23,28 +23,2 @@ [![npm](https://img.shields.io/npm/v/loglevel-mixin.svg)](https://www.npmjs.com/package/loglevel-mixin) | ||
```javascript | ||
import { defineLogLevelProperties, defineLoggerMethods } from 'loglevel-mixin'; | ||
let someObject = { | ||
log(severity, message) { | ||
console.log(`${severity} ${message}`); | ||
} | ||
}; | ||
defineLoggerMethods(someObject); | ||
defineLogLevelProperties(someObject); | ||
someObject.logLevel = 'error'; | ||
someObject.info( | ||
severity => 'my info message (not reported since logLevel is error)' | ||
); | ||
someObject.logLevel = 'info'; | ||
someObject.info( | ||
severity => 'my info message (reported since logLevel is now info)' | ||
); | ||
``` | ||
## works for ES2015 classes to | ||
<!-- skip-example --> | ||
```javascript | ||
import { LogLevelMixin } from 'loglevel-mixin'; | ||
@@ -51,0 +25,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
16456
189
202