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

bows

Package Overview
Dependencies
Maintainers
1
Versions
34
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bows - npm Package Compare versions

Comparing version 1.1.2 to 1.2.0

package.sublime-workspace

22

bows.js

@@ -55,2 +55,3 @@ (function() {

var logArgs = [logger, msg];
if (colorsSupported) {

@@ -64,14 +65,15 @@ if(!moduleColorsMap[str]){

logfn = bind.call(logger.log, logger, msg, colorString);
logLevels.forEach(function (f) {
logfn[f] = bind.call(logger[f] || logfn, logger, msg, colorString);
});
} else {
logfn = bind.call(logger.log, logger, msg);
logLevels.forEach(function (f) {
logfn[f] = bind.call(logger[f] || logfn, logger, msg);
});
logArgs.push(colorString);
}
if(arguments.length>1){
var args = Array.prototype.slice.call(arguments, 1);
logArgs = logArgs.concat(args);
}
logfn = bind.apply(logger.log, logArgs);
logLevels.forEach(function (f) {
logfn[f] = bind.call(logger[f] || logfn, logArgs);
});
return logfn;

@@ -78,0 +80,0 @@ };

{
"name": "bows",
"version": "1.1.2",
"version": "1.2.0",
"description": "Rainbowed console logs for chrome, opera and firefox in development.",

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

@@ -45,2 +45,11 @@ # Bows

- Typically each seperate module/view/etc in your app would create it's own logger. It will be assigned it's own color to make it easy to spot logs from different modules.
- You can pass additional arguments to `bows` which will be automatically prepended to each message, e.g.:
```js
var log = bows("My App", "[ChuckNorris]");
log("Kicks ass!");
//outputs:
//My App | [ChuckNorris] Kicks ass!
```
- Logging is disabled by default. To enable logging, set `localStorage.debug = true` in your console and refresh the page.

@@ -47,0 +56,0 @@ - You can leave the code in in production, and log() will just safely no-op unless localStorage.debug is set.

@@ -10,2 +10,3 @@ var runTestPage = require('./helpers/runTestPage');

'test/padLength.html',
'test/args.html'
];

@@ -12,0 +13,0 @@

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