Socket
Socket
Sign inDemoInstall

loglevel-plugin-prefix

Package Overview
Dependencies
0
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 0.4.1 to 0.4.2

4

lib/loglevel-plugin-prefix.js

@@ -94,6 +94,6 @@ (function (global, factory) {

var savePrefix = window ? window.prefix : undefined;
var save = window ? window.prefix : undefined;
prefix.noConflict = function () {
if (window && window.prefix === prefix) {
window.prefix = savePrefix;
window.prefix = save;
}

@@ -100,0 +100,0 @@ return prefix;

@@ -24,3 +24,3 @@ {

"license": "MIT",
"version": "0.4.1",
"version": "0.4.2",
"main": "./lib/loglevel-plugin-prefix",

@@ -27,0 +27,0 @@ "babel": {

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

# loglevel-prefix
# loglevel-plugin-prefix
Plugin for [loglevel](https://github.com/pimterry/loglevel) message prefixing

@@ -33,8 +33,6 @@

%t - Timestamp of message.
- %t - timestamp of message
- %l - level of message
- %n - name of logger
%l - Level of message.
%n - Name of logger.
The **timestampFormatter**, **levelFormatter** and **nameFormatter** is a functions for formatting corresponding values

@@ -53,4 +51,5 @@

<script>
prefix.noConflict().apply(log);
log.warn('prefixed message');
var logger = log.noConflict();
prefix.noConflict().apply(logger);
logger.warn('prefixed message');
</script>

@@ -57,0 +56,0 @@ ```

@@ -66,6 +66,6 @@ let isAssigned = false;

const savePrefix = window ? window.prefix : undefined;
const save = window ? window.prefix : undefined;
prefix.noConflict = () => {
if (window && window.prefix === prefix) {
window.prefix = savePrefix;
window.prefix = save;
}

@@ -72,0 +72,0 @@ return prefix;

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc