Socket
Socket
Sign inDemoInstall

debug

Package Overview
Dependencies
1
Maintainers
1
Versions
71
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 2.4.4 to 2.4.5

11

browser.js

@@ -13,5 +13,5 @@ /**

exports.useColors = useColors;
exports.storage = 'undefined' != typeof chrome
&& 'undefined' != typeof chrome.storage
? chrome.storage.local
exports.storage = 'undefined' != typeof window.chrome
&& 'undefined' != typeof window.chrome.storage
? window.chrome.storage.local
: localstorage();

@@ -55,5 +55,5 @@

// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
(navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
(navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
// double check webkit in userAgent just in case we are in a worker
(navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
(navigator && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
}

@@ -153,3 +153,2 @@

function load() {
var r;
try {

@@ -156,0 +155,0 @@ return exports.storage.debug;

2.4.5 / 2016-12-17
==================
* Fix: `navigator` undefined in Rhino (#376, @jochenberger)
* Fix: custom log function (#379, @hsiliev)
* Improvement: bit of cleanup + linting fixes (@thebigredgeek)
* Improvement: rm non-maintainted `dist/` dir (#375, @freewil)
* Docs: simplified language in the opening paragraph. (#373, @yamikuronue)
2.4.4 / 2016-12-14

@@ -3,0 +12,0 @@ ==================

@@ -5,3 +5,3 @@ {

"description": "small debugging utility",
"version": "2.4.4",
"version": "2.4.5",
"keywords": [

@@ -8,0 +8,0 @@ "debug",

@@ -113,3 +113,3 @@

var logFn = enabled.log || exports.log || console.log.bind(console);
var logFn = debug.log || exports.log || console.log.bind(console);
logFn.apply(self, args);

@@ -116,0 +116,0 @@ }

{
"name": "debug",
"version": "2.4.4",
"version": "2.4.5",
"repository": {

@@ -5,0 +5,0 @@ "type": "git",

# debug
[![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug)
tiny node.js debugging utility modelled after node core's debugging technique.
A tiny node.js debugging utility modelled after node core's debugging technique.

@@ -15,3 +15,3 @@

With `debug` you simply invoke the exported function to generate your debug function, passing it a name which will determine if a noop function is returned, or a decorated `console.error`, so all of the `console` [format string goodies](https://developer.chrome.com/devtools/docs/console-api#consolelogobject-object) you're used to work fine. A unique color is selected per-function for visibility.
`debug` exposes a function; simply pass this function the name of your module, and it will return a decorated version of `console.error` for you to pass debug statements to. This will allow you to toggle the debug output for different parts of your module as well as the module as a whole.

@@ -146,4 +146,9 @@ Example _app.js_:

## Browser support
You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
if you don't want to build it yourself.
Debug works in the browser as well, currently persisted by `localStorage`. Consider the situation shown below where you have `worker:a` and `worker:b`, and wish to debug both. You can enable this using `localStorage.debug`:
Debug's enable state is currently persisted by `localStorage`.
Consider the situation shown below where you have `worker:a` and `worker:b`,
and wish to debug both. You can enable this using `localStorage.debug`:

@@ -150,0 +155,0 @@ ```js

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc