Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

anylogger

Package Overview
Dependencies
Maintainers
1
Versions
40
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

anylogger - npm Package Compare versions

Comparing version 0.15.0 to 0.16.0

4

anylogger.js

@@ -30,3 +30,3 @@ /**

// return the existing logger, or create a new one. if no name was given, return all loggers
return n ? m[n] || (m[n] = a.new(n,c)) : m
return n ? m[n] || (m[n] = a.ext(a.new(n,c))) : m
}

@@ -71,3 +71,3 @@

// the logging methods will be added by anylogger.ext
return a.ext(r.name ? r : Object.defineProperty(r, 'name', {get:function(){return n}}))
return r.name ? r : Object.defineProperty(r, 'name', {get:function(){return n}})
}

@@ -74,0 +74,0 @@

@@ -1,1 +0,1 @@

!function(){var m=Object.create(null),a=function(n,e){return n?m[n]||(m[n]=a.new(n,e)):m};a.levels={error:1,warn:2,info:3,log:4,debug:5,trace:6},a.new=function(n,c,r){return eval("r={'"+n+"':function(){a.log(n,[].slice.call(arguments))}}[n]"),a.ext(r.name?r:Object.defineProperty(r,"name",{get:function(){return n}}))},a.log=function(n,e){m[n][1<e.length&&a.levels[e[0]]?e.shift():"log"].apply(m[n],e)},a.ext=function(n,e){for(v in e="undefined"!=typeof console&&console,a.levels)n[v]=e&&(e[v]||e.log)||function(){};return n},this.anylogger=a}();
!function(){var m=Object.create(null),a=function(n,e){return n?m[n]||(m[n]=a.ext(a.new(n,e))):m};a.levels={error:1,warn:2,info:3,log:4,debug:5,trace:6},a.new=function(n,c,r){return eval("r={'"+n+"':function(){a.log(n,[].slice.call(arguments))}}[n]"),r.name?r:Object.defineProperty(r,"name",{get:function(){return n}})},a.log=function(n,e){m[n][1<e.length&&a.levels[e[0]]?e.shift():"log"].apply(m[n],e)},a.ext=function(n,e){for(v in e="undefined"!=typeof console&&console,a.levels)n[v]=e&&(e[v]||e.log)||function(){};return n},this.anylogger=a}();
{
"name": "anylogger",
"version": "0.15.0",
"version": "0.16.0",
"description": "Get a logger. Any logger.",

@@ -5,0 +5,0 @@ "main": "anylogger.js",

@@ -1,2 +0,2 @@

# anylogger <sub><sup>0.15.0</sup></sub>
# anylogger <sub><sup>0.16.0</sup></sub>
### Get a logger. Any logger.

@@ -47,3 +47,3 @@

A tiny ~[346](#gzip-size) bytes logging facade that you can include in your
A tiny ~[350](#gzip-size) bytes logging facade that you can include in your
library to have logging 'just work', while at the same time allowing

@@ -55,3 +55,3 @@ application developers to plug in any logging framework they choose.

or just abandoning logging altogether, choose `anylogger` and for just
~[346](#gzip-size) bytes shared between all libraries doing this, we can
~[350](#gzip-size) bytes shared between all libraries doing this, we can
plug in any framework of our choice and all libraries will automatically

@@ -69,6 +69,6 @@ start to use that framework. Wouldn't it be much better and easier?

* [anylogger.js](https://unpkg.com/anylogger@0.15.0/anylogger.js)
* [anylogger.js](https://unpkg.com/anylogger@0.16.0/anylogger.js)
(fully commented source ~5kB)
* [anylogger.min.js](https://unpkg.com/anylogger@0.15.0/anylogger.min.js)
(minified 546 bytes, gzipped ~[346](#gzip-size) bytes)
* [anylogger.min.js](https://unpkg.com/anylogger@0.16.0/anylogger.min.js)
(minified 546 bytes, gzipped ~[350](#gzip-size) bytes)

@@ -80,3 +80,3 @@

```html
<script src="https://unpkg.com/anylogger@0.15.0/anylogger.min.js"></script>
<script src="https://unpkg.com/anylogger@0.16.0/anylogger.min.js"></script>
<script>(function(){ // IIFE

@@ -109,3 +109,3 @@ var log = anylogger('index.html')

"peerDependencies": {
"anylogger": "^0.15.0"
"anylogger": "^0.16.0"
}

@@ -441,3 +441,3 @@ }

Please have a look at the
[source](https://unpkg.com/anylogger@0.15.0/anylogger.js)
[source](https://unpkg.com/anylogger@0.16.0/anylogger.js)
it should make it more clear how to write an adapter. Also consider studying

@@ -444,0 +444,0 @@ the [available adapters](https://www.npmjs.com/search?q=keywords:anylogger)

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc