Comparing version 1.0.7 to 1.0.8
@@ -74,3 +74,3 @@ /** | ||
// support legacy browsers using unsafe-eval | ||
try {result = new Function('a', 'n', "return {'" + name + "':function(){a.log(n,[].slice.call(arguments))}}[n]")(anylogger, name);} | ||
try {result = new Function('a', 'n', "return {'" + name + "':function(){a.log(n,[].slice.call(arguments))}}[n]")(anylogger, name);} | ||
// fallback to method that works only on modern browsers | ||
@@ -120,8 +120,7 @@ catch(e){result = {[name]:function(){anylogger.log(name, [].slice.call(arguments));}}[name];} | ||
anylogger.ext = function(logger) { | ||
// var out = typeof console != 'undefined' && console; | ||
logger.enabledFor = function(){}; | ||
for (var method in anylogger.levels) {logger[method] = function(){};} | ||
return logger; | ||
return logger | ||
}; | ||
module.exports = anylogger; |
@@ -76,3 +76,3 @@ var anylogger = (function () { | ||
// support legacy browsers using unsafe-eval | ||
try {result = new Function('a', 'n', "return {'" + name + "':function(){a.log(n,[].slice.call(arguments))}}[n]")(anylogger, name);} | ||
try {result = new Function('a', 'n', "return {'" + name + "':function(){a.log(n,[].slice.call(arguments))}}[n]")(anylogger, name);} | ||
// fallback to method that works only on modern browsers | ||
@@ -122,6 +122,5 @@ catch(e){result = {[name]:function(){anylogger.log(name, [].slice.call(arguments));}}[name];} | ||
anylogger.ext = function(logger) { | ||
// var out = typeof console != 'undefined' && console; | ||
logger.enabledFor = function(){}; | ||
for (var method in anylogger.levels) {logger[method] = function(){};} | ||
return logger; | ||
return logger | ||
}; | ||
@@ -128,0 +127,0 @@ |
@@ -74,3 +74,3 @@ /** | ||
// support legacy browsers using unsafe-eval | ||
try {result = new Function('a', 'n', "return {'" + name + "':function(){a.log(n,[].slice.call(arguments))}}[n]")(anylogger, name)} | ||
try {result = new Function('a', 'n', "return {'" + name + "':function(){a.log(n,[].slice.call(arguments))}}[n]")(anylogger, name)} | ||
// fallback to method that works only on modern browsers | ||
@@ -120,17 +120,7 @@ catch(e){result = {[name]:function(){anylogger.log(name, [].slice.call(arguments))}}[name]} | ||
anylogger.ext = function(logger) { | ||
// var out = typeof console != 'undefined' && console; | ||
logger.enabledFor = function(){} | ||
for (var method in anylogger.levels) {logger[method] = function(){}} | ||
return logger; | ||
return logger | ||
} | ||
// anylogger.ext = function(logger) { | ||
// var out = typeof console != 'undefined' && console; | ||
// logger.enabledFor = function(){return !0}; | ||
// for (var method in anylogger.levels) { | ||
// logger[method] = out && (out[method] || out.log) || function(){} | ||
// } | ||
// return logger; | ||
// } | ||
export default anylogger |
{ | ||
"name": "anylogger", | ||
"version": "1.0.7", | ||
"version": "1.0.8", | ||
"description": "Get a logger. Any logger.", | ||
@@ -11,2 +11,3 @@ "src": "./anylogger.js", | ||
"spec": "./anylogger.spec.js", | ||
"unpkg": "./anylogger.min.js", | ||
"files": [ | ||
@@ -13,0 +14,0 @@ "anylogger.js", |
@@ -1,2 +0,2 @@ | ||
# anylogger <sub><sup>1.0.7</sup></sub> | ||
# anylogger <sub><sup>1.0.8</sup></sub> | ||
### Get a logger. Any logger. | ||
@@ -121,5 +121,5 @@ | ||
* [anylogger.js](https://unpkg.com/anylogger@1.0.7/anylogger.js) | ||
* [anylogger.js](https://unpkg.com/anylogger@1.0.8/anylogger.js) | ||
(fully commented source ~5kB) | ||
* [anylogger.min.js](https://unpkg.com/anylogger@1.0.7/anylogger.min.js) | ||
* [anylogger.min.js](https://unpkg.com/anylogger@1.0.8/anylogger.min.js) | ||
(minified 639 bytes, gzipped ~[370](#gzip-size) bytes) | ||
@@ -132,3 +132,3 @@ | ||
```html | ||
<script src="https://unpkg.com/anylogger@1.0.7/anylogger.min.js"></script> | ||
<script src="https://unpkg.com/anylogger@1.0.8/"></script> | ||
<script>(function(){ // IIFE | ||
@@ -581,3 +581,3 @@ var log = anylogger('index.html') | ||
Please have a look at the | ||
[source](https://unpkg.com/anylogger@1.0.7/anylogger.js) | ||
[source](https://unpkg.com/anylogger@1.0.8/anylogger.js) | ||
it should make it more clear how to write an adapter. Also consider studying | ||
@@ -584,0 +584,0 @@ the [available adapters](https://www.npmjs.com/search?q=keywords:anylogger) |
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
46084
571