fsevents 1.2.7 → 1.2.8

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of fsevents might be problematic. Click here for more details.

Files changed (122) hide show
  1. package/.travis.yml +0 -2
  2. package/node_modules/abbrev/package.json +2 -3
  3. package/node_modules/ansi-regex/package.json +1 -1
  4. package/node_modules/aproba/package.json +1 -1
  5. package/node_modules/are-we-there-yet/package.json +1 -1
  6. package/node_modules/balanced-match/package.json +1 -1
  7. package/node_modules/brace-expansion/package.json +1 -1
  8. package/node_modules/chownr/package.json +1 -1
  9. package/node_modules/code-point-at/package.json +1 -1
  10. package/node_modules/concat-map/package.json +1 -1
  11. package/node_modules/console-control-strings/package.json +1 -1
  12. package/node_modules/core-util-is/package.json +1 -1
  13. package/node_modules/debug/CHANGELOG.md +34 -1
  14. package/node_modules/debug/README.md +206 -63
  15. package/node_modules/debug/dist/debug.js +912 -0
  16. package/node_modules/debug/package.json +40 -26
  17. package/node_modules/debug/src/browser.js +185 -106
  18. package/node_modules/debug/src/common.js +266 -0
  19. package/node_modules/debug/src/index.js +4 -4
  20. package/node_modules/debug/src/node.js +174 -165
  21. package/node_modules/deep-extend/package.json +1 -1
  22. package/node_modules/delegates/package.json +1 -1
  23. package/node_modules/detect-libc/package.json +1 -1
  24. package/node_modules/fs-minipass/package.json +1 -1
  25. package/node_modules/fs.realpath/package.json +1 -1
  26. package/node_modules/gauge/package.json +1 -1
  27. package/node_modules/glob/package.json +1 -1
  28. package/node_modules/has-unicode/package.json +1 -1
  29. package/node_modules/iconv-lite/package.json +1 -1
  30. package/node_modules/ignore-walk/package.json +1 -1
  31. package/node_modules/inflight/package.json +1 -1
  32. package/node_modules/inherits/package.json +2 -4
  33. package/node_modules/ini/package.json +1 -1
  34. package/node_modules/is-fullwidth-code-point/package.json +1 -1
  35. package/node_modules/isarray/package.json +1 -1
  36. package/node_modules/minimatch/package.json +1 -1
  37. package/node_modules/minimist/package.json +1 -1
  38. package/node_modules/minipass/package.json +1 -1
  39. package/node_modules/minizlib/package.json +1 -1
  40. package/node_modules/mkdirp/package.json +1 -2
  41. package/node_modules/ms/index.js +28 -18
  42. package/node_modules/ms/package.json +17 -17
  43. package/node_modules/ms/readme.md +17 -8
  44. package/node_modules/needle/.npmignore +6 -0
  45. package/node_modules/needle/README.md +1 -2
  46. package/node_modules/needle/examples/multipart-stream.js +1 -1
  47. package/node_modules/needle/lib/auth.js +1 -1
  48. package/node_modules/needle/lib/multipart.js +1 -1
  49. package/node_modules/needle/lib/needle.js +2 -2
  50. package/node_modules/needle/package-lock.json +395 -0
  51. package/node_modules/needle/package.json +13 -13
  52. package/node_modules/needle/test/basic_auth_spec.js +1 -1
  53. package/node_modules/needle/test/cookies_spec.js +2 -2
  54. package/node_modules/needle/test/keys/ssl.cert +21 -0
  55. package/node_modules/needle/test/keys/ssl.key +27 -0
  56. package/node_modules/needle/test/output_spec.js +1 -1
  57. package/node_modules/needle/test/post_data_spec.js +20 -20
  58. package/node_modules/needle/test/proxy_spec.js +1 -1
  59. package/node_modules/needle/test/utils/test.js +1 -1
  60. package/node_modules/node-pre-gyp/CHANGELOG.md +10 -0
  61. package/node_modules/node-pre-gyp/README.md +41 -6
  62. package/node_modules/node-pre-gyp/lib/build.js +1 -1
  63. package/node_modules/node-pre-gyp/lib/install.js +20 -8
  64. package/node_modules/node-pre-gyp/lib/node-pre-gyp.js +1 -1
  65. package/node_modules/node-pre-gyp/lib/pre-binding.js +5 -5
  66. package/node_modules/node-pre-gyp/lib/rebuild.js +1 -1
  67. package/node_modules/node-pre-gyp/lib/reinstall.js +1 -1
  68. package/node_modules/node-pre-gyp/lib/util/abi_crosswalk.json +48 -0
  69. package/node_modules/node-pre-gyp/lib/util/handle_gyp_opts.js +5 -2
  70. package/node_modules/node-pre-gyp/lib/util/napi.js +70 -22
  71. package/node_modules/node-pre-gyp/lib/util/versioning.js +7 -6
  72. package/node_modules/node-pre-gyp/package.json +13 -12
  73. package/node_modules/nopt/package.json +1 -1
  74. package/node_modules/npm-bundled/index.js +13 -1
  75. package/node_modules/npm-bundled/package.json +6 -6
  76. package/node_modules/npm-packlist/index.js +29 -8
  77. package/node_modules/npm-packlist/package.json +6 -6
  78. package/node_modules/npmlog/package.json +1 -1
  79. package/node_modules/number-is-nan/package.json +1 -1
  80. package/node_modules/object-assign/package.json +1 -1
  81. package/node_modules/once/package.json +1 -1
  82. package/node_modules/os-homedir/package.json +1 -1
  83. package/node_modules/os-tmpdir/package.json +1 -1
  84. package/node_modules/osenv/package.json +1 -1
  85. package/node_modules/path-is-absolute/package.json +1 -1
  86. package/node_modules/process-nextick-args/package.json +1 -1
  87. package/node_modules/rc/node_modules/minimist/package.json +1 -1
  88. package/node_modules/rc/package.json +1 -1
  89. package/node_modules/readable-stream/package.json +1 -1
  90. package/node_modules/rimraf/package.json +1 -1
  91. package/node_modules/safe-buffer/package.json +1 -1
  92. package/node_modules/safer-buffer/package.json +1 -1
  93. package/node_modules/sax/package.json +1 -1
  94. package/node_modules/semver/CHANGELOG.md +39 -0
  95. package/node_modules/semver/README.md +14 -2
  96. package/node_modules/semver/bin/semver +84 -77
  97. package/node_modules/semver/package.json +14 -8
  98. package/node_modules/semver/semver.js +906 -775
  99. package/node_modules/set-blocking/package.json +1 -1
  100. package/node_modules/signal-exit/package.json +1 -1
  101. package/node_modules/string-width/package.json +1 -1
  102. package/node_modules/string_decoder/package.json +1 -1
  103. package/node_modules/strip-ansi/package.json +1 -1
  104. package/node_modules/strip-json-comments/package.json +1 -1
  105. package/node_modules/tar/package.json +1 -1
  106. package/node_modules/util-deprecate/package.json +1 -1
  107. package/node_modules/wide-align/package.json +1 -1
  108. package/node_modules/wrappy/package.json +1 -1
  109. package/node_modules/yallist/package.json +1 -1
  110. package/package.json +5 -8
  111. package/node_modules/debug/.coveralls.yml +0 -1
  112. package/node_modules/debug/.eslintrc +0 -11
  113. package/node_modules/debug/.npmignore +0 -9
  114. package/node_modules/debug/.travis.yml +0 -14
  115. package/node_modules/debug/Makefile +0 -50
  116. package/node_modules/debug/component.json +0 -19
  117. package/node_modules/debug/karma.conf.js +0 -70
  118. package/node_modules/debug/node.js +0 -1
  119. package/node_modules/debug/src/debug.js +0 -202
  120. package/node_modules/debug/src/inspector-log.js +0 -15
  121. package/node_modules/needle/note.xml +0 -7
  122. package/node_modules/needle/note.xml.1 +0 -7
package/.travis.yml CHANGED
@@ -11,8 +11,6 @@ env:
11
11
  - NODE_VERSION="v8"
12
12
  - NODE_VERSION="v7"
13
13
  - NODE_VERSION="v6"
14
- - NODE_VERSION="v5"
15
- - NODE_VERSION="v4"
16
14
 
17
15
  before_install:
18
16
 
@@ -16,13 +16,12 @@
16
16
  "fetchSpec": "1"
17
17
  },
18
18
  "_requiredBy": [
19
- "/nopt",
20
- "/tap/nopt"
19
+ "/nopt"
21
20
  ],
22
21
  "_resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz",
23
22
  "_shasum": "f8f2c887ad10bf67f634f005b6987fed3179aac8",
24
23
  "_spec": "abbrev@1",
25
- "_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/nopt",
24
+ "_where": "/Users/pipobscure/fsevents/node_modules/nopt",
26
25
  "author": {
27
26
  "name": "Isaac Z. Schlueter",
28
27
  "email": "i@izs.me"
@@ -21,7 +21,7 @@
21
21
  "_resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz",
22
22
  "_shasum": "c3b33ab5ee360d86e0e628f0468ae7ef27d654df",
23
23
  "_spec": "ansi-regex@^2.0.0",
24
- "_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/strip-ansi",
24
+ "_where": "/Users/pipobscure/fsevents/node_modules/strip-ansi",
25
25
  "author": {
26
26
  "name": "Sindre Sorhus",
27
27
  "email": "sindresorhus@gmail.com",
@@ -21,7 +21,7 @@
21
21
  "_resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz",
22
22
  "_shasum": "6802e6264efd18c790a1b0d517f0f2627bf2c94a",
23
23
  "_spec": "aproba@^1.0.3",
24
- "_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/gauge",
24
+ "_where": "/Users/pipobscure/fsevents/node_modules/gauge",
25
25
  "author": {
26
26
  "name": "Rebecca Turner",
27
27
  "email": "me@re-becca.org"
@@ -21,7 +21,7 @@
21
21
  "_resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-1.1.5.tgz",
22
22
  "_shasum": "4b35c2944f062a8bfcda66410760350fe9ddfc21",
23
23
  "_spec": "are-we-there-yet@~1.1.2",
24
- "_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/npmlog",
24
+ "_where": "/Users/pipobscure/fsevents/node_modules/npmlog",
25
25
  "author": {
26
26
  "name": "Rebecca Turner",
27
27
  "url": "http://re-becca.org"
@@ -21,7 +21,7 @@
21
21
  "_resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
22
22
  "_shasum": "89b4d199ab2bee49de164ea02b89ce462d71b767",
23
23
  "_spec": "balanced-match@^1.0.0",
24
- "_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/brace-expansion",
24
+ "_where": "/Users/pipobscure/fsevents/node_modules/brace-expansion",
25
25
  "author": {
26
26
  "name": "Julian Gruber",
27
27
  "email": "mail@juliangruber.com",
@@ -21,7 +21,7 @@
21
21
  "_resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
22
22
  "_shasum": "3c7fcbf529d87226f3d2f52b966ff5271eb441dd",
23
23
  "_spec": "brace-expansion@^1.1.7",
24
- "_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/minimatch",
24
+ "_where": "/Users/pipobscure/fsevents/node_modules/minimatch",
25
25
  "author": {
26
26
  "name": "Julian Gruber",
27
27
  "email": "mail@juliangruber.com",
@@ -21,7 +21,7 @@
21
21
  "_resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.1.tgz",
22
22
  "_shasum": "54726b8b8fff4df053c42187e801fb4412df1494",
23
23
  "_spec": "chownr@^1.1.1",
24
- "_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/tar",
24
+ "_where": "/Users/pipobscure/fsevents/node_modules/tar",
25
25
  "author": {
26
26
  "name": "Isaac Z. Schlueter",
27
27
  "email": "i@izs.me",
@@ -21,7 +21,7 @@
21
21
  "_resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz",
22
22
  "_shasum": "0d070b4d043a5bea33a2f1a40e2edb3d9a4ccf77",
23
23
  "_spec": "code-point-at@^1.0.0",
24
- "_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/string-width",
24
+ "_where": "/Users/pipobscure/fsevents/node_modules/string-width",
25
25
  "author": {
26
26
  "name": "Sindre Sorhus",
27
27
  "email": "sindresorhus@gmail.com",
@@ -21,7 +21,7 @@
21
21
  "_resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
22
22
  "_shasum": "d8a96bd77fd68df7793a73036a3ba0d5405d477b",
23
23
  "_spec": "concat-map@0.0.1",
24
- "_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/brace-expansion",
24
+ "_where": "/Users/pipobscure/fsevents/node_modules/brace-expansion",
25
25
  "author": {
26
26
  "name": "James Halliday",
27
27
  "email": "mail@substack.net",
@@ -22,7 +22,7 @@
22
22
  "_resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz",
23
23
  "_shasum": "3d7cf4464db6446ea644bf4b39507f9851008e8e",
24
24
  "_spec": "console-control-strings@~1.1.0",
25
- "_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/npmlog",
25
+ "_where": "/Users/pipobscure/fsevents/node_modules/npmlog",
26
26
  "author": {
27
27
  "name": "Rebecca Turner",
28
28
  "email": "me@re-becca.org",
@@ -21,7 +21,7 @@
21
21
  "_resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz",
22
22
  "_shasum": "b5fd54220aa2bc5ab57aab7140c940754503c1a7",
23
23
  "_spec": "core-util-is@~1.0.0",
24
- "_where": "/Users/pdunkel1/Office/fsevents/fsevents/node_modules/readable-stream",
24
+ "_where": "/Users/pipobscure/fsevents/node_modules/readable-stream",
25
25
  "author": {
26
26
  "name": "Isaac Z. Schlueter",
27
27
  "email": "i@izs.me",
@@ -1,4 +1,37 @@
1
1
 
2
+ 3.1.0 / 2017-09-26
3
+ ==================
4
+
5
+ * Add `DEBUG_HIDE_DATE` env var (#486)
6
+ * Remove ReDoS regexp in %o formatter (#504)
7
+ * Remove "component" from package.json
8
+ * Remove `component.json`
9
+ * Ignore package-lock.json
10
+ * Examples: fix colors printout
11
+ * Fix: browser detection
12
+ * Fix: spelling mistake (#496, @EdwardBetts)
13
+
14
+ 3.0.1 / 2017-08-24
15
+ ==================
16
+
17
+ * Fix: Disable colors in Edge and Internet Explorer (#489)
18
+
19
+ 3.0.0 / 2017-08-08
20
+ ==================
21
+
22
+ * Breaking: Remove DEBUG_FD (#406)
23
+ * Breaking: Use `Date#toISOString()` instead to `Date#toUTCString()` when output is not a TTY (#418)
24
+ * Breaking: Make millisecond timer namespace specific and allow 'always enabled' output (#408)
25
+ * Addition: document `enabled` flag (#465)
26
+ * Addition: add 256 colors mode (#481)
27
+ * Addition: `enabled()` updates existing debug instances, add `destroy()` function (#440)
28
+ * Update: component: update "ms" to v2.0.0
29
+ * Update: separate the Node and Browser tests in Travis-CI
30
+ * Update: refactor Readme, fixed documentation, added "Namespace Colors" section, redid screenshots
31
+ * Update: separate Node.js and web browser examples for organization
32
+ * Update: update "browserify" to v14.4.0
33
+ * Fix: fix Readme typo (#473)
34
+
2
35
  2.6.9 / 2017-09-22
3
36
  ==================
4
37
 
@@ -27,7 +60,7 @@
27
60
  2.6.4 / 2017-04-20
28
61
  ==================
29
62
 
30
- * Fix: bug that would occure if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo)
63
+ * Fix: bug that would occur if process.env.DEBUG is a non-string value. (#444, @LucianBuzzo)
31
64
  * Chore: ignore bower.json in npm installations. (#437, @joaovieira)
32
65
  * Misc: update "ms" to v0.7.3 (@tootallnate)
33
66
 
@@ -1,12 +1,11 @@
1
1
  # debug
2
- [![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers)
2
+ [![Build Status](https://travis-ci.org/visionmedia/debug.svg?branch=master)](https://travis-ci.org/visionmedia/debug) [![Coverage Status](https://coveralls.io/repos/github/visionmedia/debug/badge.svg?branch=master)](https://coveralls.io/github/visionmedia/debug?branch=master) [![Slack](https://visionmedia-community-slackin.now.sh/badge.svg)](https://visionmedia-community-slackin.now.sh/) [![OpenCollective](https://opencollective.com/debug/backers/badge.svg)](#backers)
3
3
  [![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors)
4
4
 
5
+ <img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
5
6
 
6
-
7
- A tiny node.js debugging utility modelled after node core's debugging technique.
8
-
9
- **Discussion around the V3 API is under way [here](https://github.com/visionmedia/debug/issues/370)**
7
+ A tiny JavaScript debugging utility modelled after Node.js core's debugging
8
+ technique. Works in Node.js and web browsers.
10
9
 
11
10
  ## Installation
12
11
 
@@ -18,7 +17,7 @@ $ npm install debug
18
17
 
19
18
  `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.
20
19
 
21
- Example _app.js_:
20
+ Example [_app.js_](./examples/node/app.js):
22
21
 
23
22
  ```js
24
23
  var debug = require('debug')('http')
@@ -27,7 +26,7 @@ var debug = require('debug')('http')
27
26
 
28
27
  // fake app
29
28
 
30
- debug('booting %s', name);
29
+ debug('booting %o', name);
31
30
 
32
31
  http.createServer(function(req, res){
33
32
  debug(req.method + ' ' + req.url);
@@ -41,81 +40,148 @@ http.createServer(function(req, res){
41
40
  require('./worker');
42
41
  ```
43
42
 
44
- Example _worker.js_:
43
+ Example [_worker.js_](./examples/node/worker.js):
45
44
 
46
45
  ```js
47
- var debug = require('debug')('worker');
46
+ var a = require('debug')('worker:a')
47
+ , b = require('debug')('worker:b');
48
48
 
49
- setInterval(function(){
50
- debug('doing some work');
51
- }, 1000);
49
+ function work() {
50
+ a('doing lots of uninteresting work');
51
+ setTimeout(work, Math.random() * 1000);
52
+ }
53
+
54
+ work();
55
+
56
+ function workb() {
57
+ b('doing some work');
58
+ setTimeout(workb, Math.random() * 2000);
59
+ }
60
+
61
+ workb();
52
62
  ```
53
63
 
54
- The __DEBUG__ environment variable is then used to enable these based on space or comma-delimited names. Here are some examples:
64
+ The `DEBUG` environment variable is then used to enable these based on space or
65
+ comma-delimited names.
55
66
 
56
- ![debug http and worker](http://f.cl.ly/items/18471z1H402O24072r1J/Screenshot.png)
67
+ Here are some examples:
57
68
 
58
- ![debug worker](http://f.cl.ly/items/1X413v1a3M0d3C2c1E0i/Screenshot.png)
69
+ <img width="647" alt="screen shot 2017-08-08 at 12 53 04 pm" src="https://user-images.githubusercontent.com/71256/29091703-a6302cdc-7c38-11e7-8304-7c0b3bc600cd.png">
70
+ <img width="647" alt="screen shot 2017-08-08 at 12 53 38 pm" src="https://user-images.githubusercontent.com/71256/29091700-a62a6888-7c38-11e7-800b-db911291ca2b.png">
71
+ <img width="647" alt="screen shot 2017-08-08 at 12 53 25 pm" src="https://user-images.githubusercontent.com/71256/29091701-a62ea114-7c38-11e7-826a-2692bedca740.png">
59
72
 
60
- #### Windows note
73
+ #### Windows command prompt notes
61
74
 
62
- On Windows the environment variable is set using the `set` command.
75
+ ##### CMD
63
76
 
64
- ```cmd
65
- set DEBUG=*,-not_this
66
- ```
77
+ On Windows the environment variable is set using the `set` command.
67
78
 
68
- Note that PowerShell uses different syntax to set environment variables.
79
+ ```cmd
80
+ set DEBUG=*,-not_this
81
+ ```
82
+
83
+ Example:
84
+
85
+ ```cmd
86
+ set DEBUG=* & node app.js
87
+ ```
88
+
89
+ ##### PowerShell (VS Code default)
69
90
 
70
- ```cmd
71
- $env:DEBUG = "*,-not_this"
72
- ```
91
+ PowerShell uses different syntax to set environment variables.
92
+
93
+ ```cmd
94
+ $env:DEBUG = "*,-not_this"
95
+ ```
96
+
97
+ Example:
98
+
99
+ ```cmd
100
+ $env:DEBUG='app';node app.js
101
+ ```
73
102
 
74
103
  Then, run the program to be debugged as usual.
75
104
 
105
+ npm script example:
106
+ ```js
107
+ "windowsDebug": "@powershell -Command $env:DEBUG='*';node app.js",
108
+ ```
109
+
110
+ ## Namespace Colors
111
+
112
+ Every debug instance has a color generated for it based on its namespace name.
113
+ This helps when visually parsing the debug output to identify which debug instance
114
+ a debug line belongs to.
115
+
116
+ #### Node.js
117
+
118
+ In Node.js, colors are enabled when stderr is a TTY. You also _should_ install
119
+ the [`supports-color`](https://npmjs.org/supports-color) module alongside debug,
120
+ otherwise debug will only use a small handful of basic colors.
121
+
122
+ <img width="521" src="https://user-images.githubusercontent.com/71256/29092181-47f6a9e6-7c3a-11e7-9a14-1928d8a711cd.png">
123
+
124
+ #### Web Browser
125
+
126
+ Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
127
+ option. These are WebKit web inspectors, Firefox ([since version
128
+ 31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
129
+ and the Firebug plugin for Firefox (any version).
130
+
131
+ <img width="524" src="https://user-images.githubusercontent.com/71256/29092033-b65f9f2e-7c39-11e7-8e32-f6f0d8e865c1.png">
132
+
133
+
76
134
  ## Millisecond diff
77
135
 
78
- When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
136
+ When actively developing an application it can be useful to see when the time spent between one `debug()` call and the next. Suppose for example you invoke `debug()` before requesting a resource, and after as well, the "+NNNms" will show you how much time was spent between calls.
137
+
138
+ <img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
79
139
 
80
- ![](http://f.cl.ly/items/2i3h1d3t121M2Z1A3Q0N/Screenshot.png)
140
+ When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below:
81
141
 
82
- When stdout is not a TTY, `Date#toUTCString()` is used, making it more useful for logging the debug information as shown below:
142
+ <img width="647" src="https://user-images.githubusercontent.com/71256/29091956-6bd78372-7c39-11e7-8c55-c948396d6edd.png">
83
143
 
84
- ![](http://f.cl.ly/items/112H3i0e0o0P0a2Q2r11/Screenshot.png)
85
144
 
86
145
  ## Conventions
87
146
 
88
- If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser".
147
+ If you're using this in one or more of your libraries, you _should_ use the name of your library so that developers may toggle debugging as desired without guessing names. If you have more than one debuggers you _should_ prefix them with your library name and use ":" to separate features. For example "bodyParser" from Connect would then be "connect:bodyParser". If you append a "*" to the end of your name, it will always be enabled regardless of the setting of the DEBUG environment variable. You can then use it for normal output as well as debug output.
89
148
 
90
149
  ## Wildcards
91
150
 
92
- The `*` character may be used as a wildcard. Suppose for example your library has debuggers named "connect:bodyParser", "connect:compress", "connect:session", instead of listing all three with `DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
151
+ The `*` character may be used as a wildcard. Suppose for example your library has
152
+ debuggers named "connect:bodyParser", "connect:compress", "connect:session",
153
+ instead of listing all three with
154
+ `DEBUG=connect:bodyParser,connect:compress,connect:session`, you may simply do
155
+ `DEBUG=connect:*`, or to run everything using this module simply use `DEBUG=*`.
93
156
 
94
- You can also exclude specific debuggers by prefixing them with a "-" character. For example, `DEBUG=*,-connect:*` would include all debuggers except those starting with "connect:".
157
+ You can also exclude specific debuggers by prefixing them with a "-" character.
158
+ For example, `DEBUG=*,-connect:*` would include all debuggers except those
159
+ starting with "connect:".
95
160
 
96
161
  ## Environment Variables
97
162
 
98
- When running through Node.js, you can set a few environment variables that will
99
- change the behavior of the debug logging:
163
+ When running through Node.js, you can set a few environment variables that will
164
+ change the behavior of the debug logging:
100
165
 
101
166
  | Name | Purpose |
102
167
  |-----------|-------------------------------------------------|
103
168
  | `DEBUG` | Enables/disables specific debugging namespaces. |
169
+ | `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). |
104
170
  | `DEBUG_COLORS`| Whether or not to use colors in the debug output. |
105
- | `DEBUG_DEPTH` | Object inspection depth. |
171
+ | `DEBUG_DEPTH` | Object inspection depth. |
106
172
  | `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. |
107
173
 
108
174
 
109
- __Note:__ The environment variables beginning with `DEBUG_` end up being
110
- converted into an Options object that gets used with `%o`/`%O` formatters.
111
- See the Node.js documentation for
112
- [`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
113
- for the complete list.
175
+ __Note:__ The environment variables beginning with `DEBUG_` end up being
176
+ converted into an Options object that gets used with `%o`/`%O` formatters.
177
+ See the Node.js documentation for
178
+ [`util.inspect()`](https://nodejs.org/api/util.html#util_util_inspect_object_options)
179
+ for the complete list.
114
180
 
115
181
  ## Formatters
116
182
 
117
-
118
- Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting. Below are the officially supported formatters:
183
+ Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting.
184
+ Below are the officially supported formatters:
119
185
 
120
186
  | Formatter | Representation |
121
187
  |-----------|----------------|
@@ -126,9 +192,12 @@ Then, run the program to be debugged as usual.
126
192
  | `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. |
127
193
  | `%%` | Single percent sign ('%'). This does not consume an argument. |
128
194
 
195
+
129
196
  ### Custom formatters
130
197
 
131
- You can add custom formatters by extending the `debug.formatters` object. For example, if you wanted to add support for rendering a Buffer as hex with `%h`, you could do something like:
198
+ You can add custom formatters by extending the `debug.formatters` object.
199
+ For example, if you wanted to add support for rendering a Buffer as hex with
200
+ `%h`, you could do something like:
132
201
 
133
202
  ```js
134
203
  const createDebug = require('debug')
@@ -142,14 +211,16 @@ debug('this is hex: %h', new Buffer('hello world'))
142
211
  // foo this is hex: 68656c6c6f20776f726c6421 +0ms
143
212
  ```
144
213
 
145
- ## Browser support
146
- You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
147
- or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
148
- if you don't want to build it yourself.
149
214
 
150
- Debug's enable state is currently persisted by `localStorage`.
151
- Consider the situation shown below where you have `worker:a` and `worker:b`,
152
- and wish to debug both. You can enable this using `localStorage.debug`:
215
+ ## Browser Support
216
+
217
+ You can build a browser-ready script using [browserify](https://github.com/substack/node-browserify),
218
+ or just use the [browserify-as-a-service](https://wzrd.in/) [build](https://wzrd.in/standalone/debug@latest),
219
+ if you don't want to build it yourself.
220
+
221
+ Debug's enable state is currently persisted by `localStorage`.
222
+ Consider the situation shown below where you have `worker:a` and `worker:b`,
223
+ and wish to debug both. You can enable this using `localStorage.debug`:
153
224
 
154
225
  ```js
155
226
  localStorage.debug = 'worker:*'
@@ -170,23 +241,12 @@ setInterval(function(){
170
241
  }, 1200);
171
242
  ```
172
243
 
173
- #### Web Inspector Colors
174
-
175
- Colors are also enabled on "Web Inspectors" that understand the `%c` formatting
176
- option. These are WebKit web inspectors, Firefox ([since version
177
- 31](https://hacks.mozilla.org/2014/05/editable-box-model-multiple-selection-sublime-text-keys-much-more-firefox-developer-tools-episode-31/))
178
- and the Firebug plugin for Firefox (any version).
179
-
180
- Colored output looks something like:
181
-
182
- ![](https://cloud.githubusercontent.com/assets/71256/3139768/b98c5fd8-e8ef-11e3-862a-f7253b6f47c6.png)
183
-
184
244
 
185
245
  ## Output streams
186
246
 
187
247
  By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:
188
248
 
189
- Example _stdout.js_:
249
+ Example [_stdout.js_](./examples/node/stdout.js):
190
250
 
191
251
  ```js
192
252
  var debug = require('debug');
@@ -208,13 +268,96 @@ error('now goes to stdout via console.info');
208
268
  log('still goes to stdout, but via console.info now');
209
269
  ```
210
270
 
271
+ ## Extend
272
+ You can simply extend debugger
273
+ ```js
274
+ const log = require('debug')('auth');
275
+
276
+ //creates new debug instance with extended namespace
277
+ const logSign = log.extend('sign');
278
+ const logLogin = log.extend('login');
279
+
280
+ log('hello'); // auth hello
281
+ logSign('hello'); //auth:sign hello
282
+ logLogin('hello'); //auth:login hello
283
+ ```
284
+
285
+ ## Set dynamically
286
+
287
+ You can also enable debug dynamically by calling the `enable()` method :
288
+
289
+ ```js
290
+ let debug = require('debug');
291
+
292
+ console.log(1, debug.enabled('test'));
293
+
294
+ debug.enable('test');
295
+ console.log(2, debug.enabled('test'));
296
+
297
+ debug.disable();
298
+ console.log(3, debug.enabled('test'));
299
+
300
+ ```
301
+
302
+ print :
303
+ ```
304
+ 1 false
305
+ 2 true
306
+ 3 false
307
+ ```
308
+
309
+ Usage :
310
+ `enable(namespaces)`
311
+ `namespaces` can include modes separated by a colon and wildcards.
312
+
313
+ Note that calling `enable()` completely overrides previously set DEBUG variable :
314
+
315
+ ```
316
+ $ DEBUG=foo node -e 'var dbg = require("debug"); dbg.enable("bar"); console.log(dbg.enabled("foo"))'
317
+ => false
318
+ ```
319
+
320
+ `disable()`
321
+
322
+ Will disable all namespaces. The functions returns the namespaces currently
323
+ enabled (and skipped). This can be useful if you want to disable debugging
324
+ temporarily without knowing what was enabled to begin with.
325
+
326
+ For example:
327
+
328
+ ```js
329
+ let debug = require('debug');
330
+ debug.enable('foo:*,-foo:bar');
331
+ let namespaces = debug.disable();
332
+ debug.enable(namespaces);
333
+ ```
334
+
335
+ Note: There is no guarantee that the string will be identical to the initial
336
+ enable string, but semantically they will be identical.
337
+
338
+ ## Checking whether a debug target is enabled
339
+
340
+ After you've created a debug instance, you can determine whether or not it is
341
+ enabled by checking the `enabled` property:
342
+
343
+ ```javascript
344
+ const debug = require('debug')('http');
345
+
346
+ if (debug.enabled) {
347
+ // do stuff...
348
+ }
349
+ ```
350
+
351
+ You can also manually toggle this property to force the debug instance to be
352
+ enabled or disabled.
353
+
211
354
 
212
355
  ## Authors
213
356
 
214
357
  - TJ Holowaychuk
215
358
  - Nathan Rajlich
216
359
  - Andrew Rhyne
217
-
360
+
218
361
  ## Backers
219
362
 
220
363
  Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)]
@@ -290,7 +433,7 @@ Become a sponsor and get your logo on our README on Github with a link to your s
290
433
 
291
434
  (The MIT License)
292
435
 
293
- Copyright (c) 2014-2016 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
436
+ Copyright (c) 2014-2017 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
294
437
 
295
438
  Permission is hereby granted, free of charge, to any person obtaining
296
439
  a copy of this software and associated documentation files (the