immosquare-cleaner 0.1.34 → 0.1.35

Sign up to get free protection for your applications and to get access to all the features.
Files changed (191) hide show
  1. checksums.yaml +4 -4
  2. data/lib/immosquare-cleaner/version.rb +1 -1
  3. data/lib/immosquare-cleaner.rb +2 -2
  4. data/linters/eslint.config.mjs +30 -0
  5. data/linters/rubocop-3.2.2.yml +2 -0
  6. data/node_modules/function-bind/README.md +27 -25
  7. data/node_modules/function-bind/implementation.js +12 -44
  8. data/node_modules/function-bind/package.json +14 -38
  9. data/node_modules/is-core-module/CHANGELOG.md +0 -7
  10. data/node_modules/is-core-module/index.js +2 -2
  11. data/node_modules/is-core-module/package.json +4 -4
  12. data/package.json +2 -4
  13. metadata +3 -180
  14. data/linters/eslintrc.json +0 -57
  15. data/node_modules/.bin/rimraf +0 -1
  16. data/node_modules/eslint-config-airbnb-base/CHANGELOG.md +0 -374
  17. data/node_modules/eslint-config-airbnb-base/LICENSE.md +0 -21
  18. data/node_modules/eslint-config-airbnb-base/README.md +0 -112
  19. data/node_modules/eslint-config-airbnb-base/index.js +0 -17
  20. data/node_modules/eslint-config-airbnb-base/legacy.js +0 -34
  21. data/node_modules/eslint-config-airbnb-base/node_modules/semver/LICENSE +0 -15
  22. data/node_modules/eslint-config-airbnb-base/node_modules/semver/README.md +0 -443
  23. data/node_modules/eslint-config-airbnb-base/node_modules/semver/bin/semver.js +0 -174
  24. data/node_modules/eslint-config-airbnb-base/node_modules/semver/package.json +0 -38
  25. data/node_modules/eslint-config-airbnb-base/node_modules/semver/range.bnf +0 -16
  26. data/node_modules/eslint-config-airbnb-base/node_modules/semver/semver.js +0 -1643
  27. data/node_modules/eslint-config-airbnb-base/package.json +0 -95
  28. data/node_modules/eslint-config-airbnb-base/rules/best-practices.js +0 -408
  29. data/node_modules/eslint-config-airbnb-base/rules/errors.js +0 -179
  30. data/node_modules/eslint-config-airbnb-base/rules/es6.js +0 -185
  31. data/node_modules/eslint-config-airbnb-base/rules/imports.js +0 -273
  32. data/node_modules/eslint-config-airbnb-base/rules/node.js +0 -43
  33. data/node_modules/eslint-config-airbnb-base/rules/strict.js +0 -6
  34. data/node_modules/eslint-config-airbnb-base/rules/style.js +0 -529
  35. data/node_modules/eslint-config-airbnb-base/rules/variables.js +0 -56
  36. data/node_modules/eslint-config-airbnb-base/test/requires.js +0 -13
  37. data/node_modules/eslint-config-airbnb-base/test/test-base.js +0 -32
  38. data/node_modules/eslint-config-airbnb-base/whitespace-async.js +0 -96
  39. data/node_modules/eslint-config-airbnb-base/whitespace.js +0 -102
  40. data/node_modules/eslint-plugin-import/CHANGELOG.md +0 -1925
  41. data/node_modules/eslint-plugin-import/CONTRIBUTING.md +0 -84
  42. data/node_modules/eslint-plugin-import/LICENSE +0 -22
  43. data/node_modules/eslint-plugin-import/README.md +0 -500
  44. data/node_modules/eslint-plugin-import/RELEASE.md +0 -54
  45. data/node_modules/eslint-plugin-import/SECURITY.md +0 -11
  46. data/node_modules/eslint-plugin-import/config/electron.js +0 -8
  47. data/node_modules/eslint-plugin-import/config/errors.js +0 -14
  48. data/node_modules/eslint-plugin-import/config/react-native.js +0 -13
  49. data/node_modules/eslint-plugin-import/config/react.js +0 -18
  50. data/node_modules/eslint-plugin-import/config/recommended.js +0 -28
  51. data/node_modules/eslint-plugin-import/config/stage-0.js +0 -12
  52. data/node_modules/eslint-plugin-import/config/typescript.js +0 -34
  53. data/node_modules/eslint-plugin-import/config/warnings.js +0 -12
  54. data/node_modules/eslint-plugin-import/docs/rules/consistent-type-specifier-style.md +0 -91
  55. data/node_modules/eslint-plugin-import/docs/rules/default.md +0 -72
  56. data/node_modules/eslint-plugin-import/docs/rules/dynamic-import-chunkname.md +0 -92
  57. data/node_modules/eslint-plugin-import/docs/rules/export.md +0 -37
  58. data/node_modules/eslint-plugin-import/docs/rules/exports-last.md +0 -51
  59. data/node_modules/eslint-plugin-import/docs/rules/extensions.md +0 -174
  60. data/node_modules/eslint-plugin-import/docs/rules/first.md +0 -75
  61. data/node_modules/eslint-plugin-import/docs/rules/group-exports.md +0 -118
  62. data/node_modules/eslint-plugin-import/docs/rules/imports-first.md +0 -9
  63. data/node_modules/eslint-plugin-import/docs/rules/max-dependencies.md +0 -70
  64. data/node_modules/eslint-plugin-import/docs/rules/named.md +0 -102
  65. data/node_modules/eslint-plugin-import/docs/rules/namespace.md +0 -106
  66. data/node_modules/eslint-plugin-import/docs/rules/newline-after-import.md +0 -167
  67. data/node_modules/eslint-plugin-import/docs/rules/no-absolute-path.md +0 -54
  68. data/node_modules/eslint-plugin-import/docs/rules/no-amd.md +0 -37
  69. data/node_modules/eslint-plugin-import/docs/rules/no-anonymous-default-export.md +0 -83
  70. data/node_modules/eslint-plugin-import/docs/rules/no-commonjs.md +0 -96
  71. data/node_modules/eslint-plugin-import/docs/rules/no-cycle.md +0 -111
  72. data/node_modules/eslint-plugin-import/docs/rules/no-default-export.md +0 -65
  73. data/node_modules/eslint-plugin-import/docs/rules/no-deprecated.md +0 -62
  74. data/node_modules/eslint-plugin-import/docs/rules/no-duplicates.md +0 -109
  75. data/node_modules/eslint-plugin-import/docs/rules/no-dynamic-require.md +0 -25
  76. data/node_modules/eslint-plugin-import/docs/rules/no-empty-named-blocks.md +0 -49
  77. data/node_modules/eslint-plugin-import/docs/rules/no-extraneous-dependencies.md +0 -139
  78. data/node_modules/eslint-plugin-import/docs/rules/no-import-module-exports.md +0 -81
  79. data/node_modules/eslint-plugin-import/docs/rules/no-internal-modules.md +0 -136
  80. data/node_modules/eslint-plugin-import/docs/rules/no-mutable-exports.md +0 -54
  81. data/node_modules/eslint-plugin-import/docs/rules/no-named-as-default-member.md +0 -52
  82. data/node_modules/eslint-plugin-import/docs/rules/no-named-as-default.md +0 -53
  83. data/node_modules/eslint-plugin-import/docs/rules/no-named-default.md +0 -36
  84. data/node_modules/eslint-plugin-import/docs/rules/no-named-export.md +0 -79
  85. data/node_modules/eslint-plugin-import/docs/rules/no-namespace.md +0 -44
  86. data/node_modules/eslint-plugin-import/docs/rules/no-nodejs-modules.md +0 -42
  87. data/node_modules/eslint-plugin-import/docs/rules/no-relative-packages.md +0 -70
  88. data/node_modules/eslint-plugin-import/docs/rules/no-relative-parent-imports.md +0 -123
  89. data/node_modules/eslint-plugin-import/docs/rules/no-restricted-paths.md +0 -198
  90. data/node_modules/eslint-plugin-import/docs/rules/no-self-import.md +0 -32
  91. data/node_modules/eslint-plugin-import/docs/rules/no-unassigned-import.md +0 -60
  92. data/node_modules/eslint-plugin-import/docs/rules/no-unresolved.md +0 -110
  93. data/node_modules/eslint-plugin-import/docs/rules/no-unused-modules.md +0 -125
  94. data/node_modules/eslint-plugin-import/docs/rules/no-useless-path-segments.md +0 -85
  95. data/node_modules/eslint-plugin-import/docs/rules/no-webpack-loader-syntax.md +0 -39
  96. data/node_modules/eslint-plugin-import/docs/rules/order.md +0 -365
  97. data/node_modules/eslint-plugin-import/docs/rules/prefer-default-export.md +0 -185
  98. data/node_modules/eslint-plugin-import/docs/rules/unambiguous.md +0 -57
  99. data/node_modules/eslint-plugin-import/lib/ExportMap.js +0 -856
  100. data/node_modules/eslint-plugin-import/lib/core/importType.js +0 -129
  101. data/node_modules/eslint-plugin-import/lib/core/packagePath.js +0 -22
  102. data/node_modules/eslint-plugin-import/lib/core/staticRequire.js +0 -11
  103. data/node_modules/eslint-plugin-import/lib/docsUrl.js +0 -8
  104. data/node_modules/eslint-plugin-import/lib/importDeclaration.js +0 -5
  105. data/node_modules/eslint-plugin-import/lib/index.js +0 -71
  106. data/node_modules/eslint-plugin-import/lib/rules/consistent-type-specifier-style.js +0 -221
  107. data/node_modules/eslint-plugin-import/lib/rules/default.js +0 -40
  108. data/node_modules/eslint-plugin-import/lib/rules/dynamic-import-chunkname.js +0 -120
  109. data/node_modules/eslint-plugin-import/lib/rules/export.js +0 -250
  110. data/node_modules/eslint-plugin-import/lib/rules/exports-last.js +0 -40
  111. data/node_modules/eslint-plugin-import/lib/rules/extensions.js +0 -193
  112. data/node_modules/eslint-plugin-import/lib/rules/first.js +0 -144
  113. data/node_modules/eslint-plugin-import/lib/rules/group-exports.js +0 -155
  114. data/node_modules/eslint-plugin-import/lib/rules/imports-first.js +0 -16
  115. data/node_modules/eslint-plugin-import/lib/rules/max-dependencies.js +0 -60
  116. data/node_modules/eslint-plugin-import/lib/rules/named.js +0 -143
  117. data/node_modules/eslint-plugin-import/lib/rules/namespace.js +0 -218
  118. data/node_modules/eslint-plugin-import/lib/rules/newline-after-import.js +0 -237
  119. data/node_modules/eslint-plugin-import/lib/rules/no-absolute-path.js +0 -40
  120. data/node_modules/eslint-plugin-import/lib/rules/no-amd.js +0 -47
  121. data/node_modules/eslint-plugin-import/lib/rules/no-anonymous-default-export.js +0 -103
  122. data/node_modules/eslint-plugin-import/lib/rules/no-commonjs.js +0 -141
  123. data/node_modules/eslint-plugin-import/lib/rules/no-cycle.js +0 -158
  124. data/node_modules/eslint-plugin-import/lib/rules/no-default-export.js +0 -43
  125. data/node_modules/eslint-plugin-import/lib/rules/no-deprecated.js +0 -138
  126. data/node_modules/eslint-plugin-import/lib/rules/no-duplicates.js +0 -354
  127. data/node_modules/eslint-plugin-import/lib/rules/no-dynamic-require.js +0 -77
  128. data/node_modules/eslint-plugin-import/lib/rules/no-empty-named-blocks.js +0 -105
  129. data/node_modules/eslint-plugin-import/lib/rules/no-extraneous-dependencies.js +0 -301
  130. data/node_modules/eslint-plugin-import/lib/rules/no-import-module-exports.js +0 -85
  131. data/node_modules/eslint-plugin-import/lib/rules/no-internal-modules.js +0 -144
  132. data/node_modules/eslint-plugin-import/lib/rules/no-mutable-exports.js +0 -59
  133. data/node_modules/eslint-plugin-import/lib/rules/no-named-as-default-member.js +0 -96
  134. data/node_modules/eslint-plugin-import/lib/rules/no-named-as-default.js +0 -45
  135. data/node_modules/eslint-plugin-import/lib/rules/no-named-default.js +0 -31
  136. data/node_modules/eslint-plugin-import/lib/rules/no-named-export.js +0 -39
  137. data/node_modules/eslint-plugin-import/lib/rules/no-namespace.js +0 -175
  138. data/node_modules/eslint-plugin-import/lib/rules/no-nodejs-modules.js +0 -44
  139. data/node_modules/eslint-plugin-import/lib/rules/no-relative-packages.js +0 -71
  140. data/node_modules/eslint-plugin-import/lib/rules/no-relative-parent-imports.js +0 -48
  141. data/node_modules/eslint-plugin-import/lib/rules/no-restricted-paths.js +0 -245
  142. data/node_modules/eslint-plugin-import/lib/rules/no-self-import.js +0 -39
  143. data/node_modules/eslint-plugin-import/lib/rules/no-unassigned-import.js +0 -79
  144. data/node_modules/eslint-plugin-import/lib/rules/no-unresolved.js +0 -60
  145. data/node_modules/eslint-plugin-import/lib/rules/no-unused-modules.js +0 -945
  146. data/node_modules/eslint-plugin-import/lib/rules/no-useless-path-segments.js +0 -147
  147. data/node_modules/eslint-plugin-import/lib/rules/no-webpack-loader-syntax.js +0 -26
  148. data/node_modules/eslint-plugin-import/lib/rules/order.js +0 -785
  149. data/node_modules/eslint-plugin-import/lib/rules/prefer-default-export.js +0 -116
  150. data/node_modules/eslint-plugin-import/lib/rules/unambiguous.js +0 -38
  151. data/node_modules/eslint-plugin-import/memo-parser/LICENSE +0 -22
  152. data/node_modules/eslint-plugin-import/memo-parser/README.md +0 -21
  153. data/node_modules/eslint-plugin-import/memo-parser/index.js +0 -41
  154. data/node_modules/eslint-plugin-import/node_modules/debug/CHANGELOG.md +0 -395
  155. data/node_modules/eslint-plugin-import/node_modules/debug/LICENSE +0 -19
  156. data/node_modules/eslint-plugin-import/node_modules/debug/README.md +0 -437
  157. data/node_modules/eslint-plugin-import/node_modules/debug/node.js +0 -1
  158. data/node_modules/eslint-plugin-import/node_modules/debug/node_modules/ms/index.js +0 -162
  159. data/node_modules/eslint-plugin-import/node_modules/debug/node_modules/ms/license.md +0 -21
  160. data/node_modules/eslint-plugin-import/node_modules/debug/node_modules/ms/package.json +0 -38
  161. data/node_modules/eslint-plugin-import/node_modules/debug/node_modules/ms/readme.md +0 -59
  162. data/node_modules/eslint-plugin-import/node_modules/debug/package.json +0 -51
  163. data/node_modules/eslint-plugin-import/node_modules/debug/src/browser.js +0 -180
  164. data/node_modules/eslint-plugin-import/node_modules/debug/src/common.js +0 -249
  165. data/node_modules/eslint-plugin-import/node_modules/debug/src/index.js +0 -12
  166. data/node_modules/eslint-plugin-import/node_modules/debug/src/node.js +0 -177
  167. data/node_modules/eslint-plugin-import/node_modules/doctrine/CHANGELOG.md +0 -94
  168. data/node_modules/eslint-plugin-import/node_modules/doctrine/LICENSE +0 -177
  169. data/node_modules/eslint-plugin-import/node_modules/doctrine/LICENSE.closure-compiler +0 -202
  170. data/node_modules/eslint-plugin-import/node_modules/doctrine/LICENSE.esprima +0 -19
  171. data/node_modules/eslint-plugin-import/node_modules/doctrine/README.md +0 -165
  172. data/node_modules/eslint-plugin-import/node_modules/doctrine/lib/doctrine.js +0 -899
  173. data/node_modules/eslint-plugin-import/node_modules/doctrine/lib/typed.js +0 -1305
  174. data/node_modules/eslint-plugin-import/node_modules/doctrine/lib/utility.js +0 -35
  175. data/node_modules/eslint-plugin-import/node_modules/doctrine/package.json +0 -57
  176. data/node_modules/eslint-plugin-import/node_modules/minimatch/LICENSE +0 -15
  177. data/node_modules/eslint-plugin-import/node_modules/minimatch/README.md +0 -230
  178. data/node_modules/eslint-plugin-import/node_modules/minimatch/minimatch.js +0 -947
  179. data/node_modules/eslint-plugin-import/node_modules/minimatch/node_modules/brace-expansion/LICENSE +0 -21
  180. data/node_modules/eslint-plugin-import/node_modules/minimatch/node_modules/brace-expansion/README.md +0 -129
  181. data/node_modules/eslint-plugin-import/node_modules/minimatch/node_modules/brace-expansion/index.js +0 -201
  182. data/node_modules/eslint-plugin-import/node_modules/minimatch/node_modules/brace-expansion/package.json +0 -47
  183. data/node_modules/eslint-plugin-import/node_modules/minimatch/package.json +0 -33
  184. data/node_modules/eslint-plugin-import/node_modules/semver/LICENSE +0 -15
  185. data/node_modules/eslint-plugin-import/node_modules/semver/README.md +0 -443
  186. data/node_modules/eslint-plugin-import/node_modules/semver/bin/semver.js +0 -174
  187. data/node_modules/eslint-plugin-import/node_modules/semver/package.json +0 -38
  188. data/node_modules/eslint-plugin-import/node_modules/semver/range.bnf +0 -16
  189. data/node_modules/eslint-plugin-import/node_modules/semver/semver.js +0 -1643
  190. data/node_modules/eslint-plugin-import/package.json +0 -124
  191. data/node_modules/function-bind/CHANGELOG.md +0 -136
@@ -1,437 +0,0 @@
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)
3
- [![OpenCollective](https://opencollective.com/debug/sponsors/badge.svg)](#sponsors)
4
-
5
- <img width="647" src="https://user-images.githubusercontent.com/71256/29091486-fa38524c-7c37-11e7-895f-e7ec8e1039b6.png">
6
-
7
- A tiny JavaScript debugging utility modelled after Node.js core's debugging
8
- technique. Works in Node.js and web browsers.
9
-
10
- ## Installation
11
-
12
- ```bash
13
- $ npm install debug
14
- ```
15
-
16
- ## Usage
17
-
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.
19
-
20
- Example [_app.js_](./examples/node/app.js):
21
-
22
- ```js
23
- var debug = require('debug')('http')
24
- , http = require('http')
25
- , name = 'My App';
26
-
27
- // fake app
28
-
29
- debug('booting %o', name);
30
-
31
- http.createServer(function(req, res){
32
- debug(req.method + ' ' + req.url);
33
- res.end('hello\n');
34
- }).listen(3000, function(){
35
- debug('listening');
36
- });
37
-
38
- // fake worker of some kind
39
-
40
- require('./worker');
41
- ```
42
-
43
- Example [_worker.js_](./examples/node/worker.js):
44
-
45
- ```js
46
- var a = require('debug')('worker:a')
47
- , b = require('debug')('worker:b');
48
-
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();
62
- ```
63
-
64
- The `DEBUG` environment variable is then used to enable these based on space or
65
- comma-delimited names.
66
-
67
- Here are some examples:
68
-
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">
72
-
73
- #### Windows command prompt notes
74
-
75
- ##### CMD
76
-
77
- On Windows the environment variable is set using the `set` command.
78
-
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)
90
-
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
- ```
102
-
103
- Then, run the program to be debugged as usual.
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
-
134
- ## Millisecond diff
135
-
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">
139
-
140
- When stdout is not a TTY, `Date#toISOString()` is used, making it more useful for logging the debug information as shown below:
141
-
142
- <img width="647" src="https://user-images.githubusercontent.com/71256/29091956-6bd78372-7c39-11e7-8c55-c948396d6edd.png">
143
-
144
-
145
- ## Conventions
146
-
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.
148
-
149
- ## Wildcards
150
-
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=*`.
156
-
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:".
160
-
161
- ## Environment Variables
162
-
163
- When running through Node.js, you can set a few environment variables that will
164
- change the behavior of the debug logging:
165
-
166
- | Name | Purpose |
167
- |-----------|-------------------------------------------------|
168
- | `DEBUG` | Enables/disables specific debugging namespaces. |
169
- | `DEBUG_HIDE_DATE` | Hide date from debug output (non-TTY). |
170
- | `DEBUG_COLORS`| Whether or not to use colors in the debug output. |
171
- | `DEBUG_DEPTH` | Object inspection depth. |
172
- | `DEBUG_SHOW_HIDDEN` | Shows hidden properties on inspected objects. |
173
-
174
-
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.
180
-
181
- ## Formatters
182
-
183
- Debug uses [printf-style](https://wikipedia.org/wiki/Printf_format_string) formatting.
184
- Below are the officially supported formatters:
185
-
186
- | Formatter | Representation |
187
- |-----------|----------------|
188
- | `%O` | Pretty-print an Object on multiple lines. |
189
- | `%o` | Pretty-print an Object all on a single line. |
190
- | `%s` | String. |
191
- | `%d` | Number (both integer and float). |
192
- | `%j` | JSON. Replaced with the string '[Circular]' if the argument contains circular references. |
193
- | `%%` | Single percent sign ('%'). This does not consume an argument. |
194
-
195
-
196
- ### Custom formatters
197
-
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:
201
-
202
- ```js
203
- const createDebug = require('debug')
204
- createDebug.formatters.h = (v) => {
205
- return v.toString('hex')
206
- }
207
-
208
- // …elsewhere
209
- const debug = createDebug('foo')
210
- debug('this is hex: %h', new Buffer('hello world'))
211
- // foo this is hex: 68656c6c6f20776f726c6421 +0ms
212
- ```
213
-
214
-
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`:
224
-
225
- ```js
226
- localStorage.debug = 'worker:*'
227
- ```
228
-
229
- And then refresh the page.
230
-
231
- ```js
232
- a = debug('worker:a');
233
- b = debug('worker:b');
234
-
235
- setInterval(function(){
236
- a('doing some work');
237
- }, 1000);
238
-
239
- setInterval(function(){
240
- b('doing some work');
241
- }, 1200);
242
- ```
243
-
244
-
245
- ## Output streams
246
-
247
- By default `debug` will log to stderr, however this can be configured per-namespace by overriding the `log` method:
248
-
249
- Example [_stdout.js_](./examples/node/stdout.js):
250
-
251
- ```js
252
- var debug = require('debug');
253
- var error = debug('app:error');
254
-
255
- // by default stderr is used
256
- error('goes to stderr!');
257
-
258
- var log = debug('app:log');
259
- // set this namespace to log via console.log
260
- log.log = console.log.bind(console); // don't forget to bind to console!
261
- log('goes to stdout');
262
- error('still goes to stderr!');
263
-
264
- // set all output to go via console.info
265
- // overrides all per-namespace log settings
266
- debug.log = console.info.bind(console);
267
- error('now goes to stdout via console.info');
268
- log('still goes to stdout, but via console.info now');
269
- ```
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
- ## Checking whether a debug target is enabled
321
-
322
- After you've created a debug instance, you can determine whether or not it is
323
- enabled by checking the `enabled` property:
324
-
325
- ```javascript
326
- const debug = require('debug')('http');
327
-
328
- if (debug.enabled) {
329
- // do stuff...
330
- }
331
- ```
332
-
333
- You can also manually toggle this property to force the debug instance to be
334
- enabled or disabled.
335
-
336
-
337
- ## Authors
338
-
339
- - TJ Holowaychuk
340
- - Nathan Rajlich
341
- - Andrew Rhyne
342
-
343
- ## Backers
344
-
345
- Support us with a monthly donation and help us continue our activities. [[Become a backer](https://opencollective.com/debug#backer)]
346
-
347
- <a href="https://opencollective.com/debug/backer/0/website" target="_blank"><img src="https://opencollective.com/debug/backer/0/avatar.svg"></a>
348
- <a href="https://opencollective.com/debug/backer/1/website" target="_blank"><img src="https://opencollective.com/debug/backer/1/avatar.svg"></a>
349
- <a href="https://opencollective.com/debug/backer/2/website" target="_blank"><img src="https://opencollective.com/debug/backer/2/avatar.svg"></a>
350
- <a href="https://opencollective.com/debug/backer/3/website" target="_blank"><img src="https://opencollective.com/debug/backer/3/avatar.svg"></a>
351
- <a href="https://opencollective.com/debug/backer/4/website" target="_blank"><img src="https://opencollective.com/debug/backer/4/avatar.svg"></a>
352
- <a href="https://opencollective.com/debug/backer/5/website" target="_blank"><img src="https://opencollective.com/debug/backer/5/avatar.svg"></a>
353
- <a href="https://opencollective.com/debug/backer/6/website" target="_blank"><img src="https://opencollective.com/debug/backer/6/avatar.svg"></a>
354
- <a href="https://opencollective.com/debug/backer/7/website" target="_blank"><img src="https://opencollective.com/debug/backer/7/avatar.svg"></a>
355
- <a href="https://opencollective.com/debug/backer/8/website" target="_blank"><img src="https://opencollective.com/debug/backer/8/avatar.svg"></a>
356
- <a href="https://opencollective.com/debug/backer/9/website" target="_blank"><img src="https://opencollective.com/debug/backer/9/avatar.svg"></a>
357
- <a href="https://opencollective.com/debug/backer/10/website" target="_blank"><img src="https://opencollective.com/debug/backer/10/avatar.svg"></a>
358
- <a href="https://opencollective.com/debug/backer/11/website" target="_blank"><img src="https://opencollective.com/debug/backer/11/avatar.svg"></a>
359
- <a href="https://opencollective.com/debug/backer/12/website" target="_blank"><img src="https://opencollective.com/debug/backer/12/avatar.svg"></a>
360
- <a href="https://opencollective.com/debug/backer/13/website" target="_blank"><img src="https://opencollective.com/debug/backer/13/avatar.svg"></a>
361
- <a href="https://opencollective.com/debug/backer/14/website" target="_blank"><img src="https://opencollective.com/debug/backer/14/avatar.svg"></a>
362
- <a href="https://opencollective.com/debug/backer/15/website" target="_blank"><img src="https://opencollective.com/debug/backer/15/avatar.svg"></a>
363
- <a href="https://opencollective.com/debug/backer/16/website" target="_blank"><img src="https://opencollective.com/debug/backer/16/avatar.svg"></a>
364
- <a href="https://opencollective.com/debug/backer/17/website" target="_blank"><img src="https://opencollective.com/debug/backer/17/avatar.svg"></a>
365
- <a href="https://opencollective.com/debug/backer/18/website" target="_blank"><img src="https://opencollective.com/debug/backer/18/avatar.svg"></a>
366
- <a href="https://opencollective.com/debug/backer/19/website" target="_blank"><img src="https://opencollective.com/debug/backer/19/avatar.svg"></a>
367
- <a href="https://opencollective.com/debug/backer/20/website" target="_blank"><img src="https://opencollective.com/debug/backer/20/avatar.svg"></a>
368
- <a href="https://opencollective.com/debug/backer/21/website" target="_blank"><img src="https://opencollective.com/debug/backer/21/avatar.svg"></a>
369
- <a href="https://opencollective.com/debug/backer/22/website" target="_blank"><img src="https://opencollective.com/debug/backer/22/avatar.svg"></a>
370
- <a href="https://opencollective.com/debug/backer/23/website" target="_blank"><img src="https://opencollective.com/debug/backer/23/avatar.svg"></a>
371
- <a href="https://opencollective.com/debug/backer/24/website" target="_blank"><img src="https://opencollective.com/debug/backer/24/avatar.svg"></a>
372
- <a href="https://opencollective.com/debug/backer/25/website" target="_blank"><img src="https://opencollective.com/debug/backer/25/avatar.svg"></a>
373
- <a href="https://opencollective.com/debug/backer/26/website" target="_blank"><img src="https://opencollective.com/debug/backer/26/avatar.svg"></a>
374
- <a href="https://opencollective.com/debug/backer/27/website" target="_blank"><img src="https://opencollective.com/debug/backer/27/avatar.svg"></a>
375
- <a href="https://opencollective.com/debug/backer/28/website" target="_blank"><img src="https://opencollective.com/debug/backer/28/avatar.svg"></a>
376
- <a href="https://opencollective.com/debug/backer/29/website" target="_blank"><img src="https://opencollective.com/debug/backer/29/avatar.svg"></a>
377
-
378
-
379
- ## Sponsors
380
-
381
- Become a sponsor and get your logo on our README on Github with a link to your site. [[Become a sponsor](https://opencollective.com/debug#sponsor)]
382
-
383
- <a href="https://opencollective.com/debug/sponsor/0/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/0/avatar.svg"></a>
384
- <a href="https://opencollective.com/debug/sponsor/1/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/1/avatar.svg"></a>
385
- <a href="https://opencollective.com/debug/sponsor/2/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/2/avatar.svg"></a>
386
- <a href="https://opencollective.com/debug/sponsor/3/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/3/avatar.svg"></a>
387
- <a href="https://opencollective.com/debug/sponsor/4/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/4/avatar.svg"></a>
388
- <a href="https://opencollective.com/debug/sponsor/5/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/5/avatar.svg"></a>
389
- <a href="https://opencollective.com/debug/sponsor/6/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/6/avatar.svg"></a>
390
- <a href="https://opencollective.com/debug/sponsor/7/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/7/avatar.svg"></a>
391
- <a href="https://opencollective.com/debug/sponsor/8/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/8/avatar.svg"></a>
392
- <a href="https://opencollective.com/debug/sponsor/9/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/9/avatar.svg"></a>
393
- <a href="https://opencollective.com/debug/sponsor/10/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/10/avatar.svg"></a>
394
- <a href="https://opencollective.com/debug/sponsor/11/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/11/avatar.svg"></a>
395
- <a href="https://opencollective.com/debug/sponsor/12/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/12/avatar.svg"></a>
396
- <a href="https://opencollective.com/debug/sponsor/13/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/13/avatar.svg"></a>
397
- <a href="https://opencollective.com/debug/sponsor/14/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/14/avatar.svg"></a>
398
- <a href="https://opencollective.com/debug/sponsor/15/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/15/avatar.svg"></a>
399
- <a href="https://opencollective.com/debug/sponsor/16/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/16/avatar.svg"></a>
400
- <a href="https://opencollective.com/debug/sponsor/17/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/17/avatar.svg"></a>
401
- <a href="https://opencollective.com/debug/sponsor/18/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/18/avatar.svg"></a>
402
- <a href="https://opencollective.com/debug/sponsor/19/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/19/avatar.svg"></a>
403
- <a href="https://opencollective.com/debug/sponsor/20/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/20/avatar.svg"></a>
404
- <a href="https://opencollective.com/debug/sponsor/21/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/21/avatar.svg"></a>
405
- <a href="https://opencollective.com/debug/sponsor/22/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/22/avatar.svg"></a>
406
- <a href="https://opencollective.com/debug/sponsor/23/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/23/avatar.svg"></a>
407
- <a href="https://opencollective.com/debug/sponsor/24/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/24/avatar.svg"></a>
408
- <a href="https://opencollective.com/debug/sponsor/25/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/25/avatar.svg"></a>
409
- <a href="https://opencollective.com/debug/sponsor/26/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/26/avatar.svg"></a>
410
- <a href="https://opencollective.com/debug/sponsor/27/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/27/avatar.svg"></a>
411
- <a href="https://opencollective.com/debug/sponsor/28/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/28/avatar.svg"></a>
412
- <a href="https://opencollective.com/debug/sponsor/29/website" target="_blank"><img src="https://opencollective.com/debug/sponsor/29/avatar.svg"></a>
413
-
414
- ## License
415
-
416
- (The MIT License)
417
-
418
- Copyright (c) 2014-2017 TJ Holowaychuk &lt;tj@vision-media.ca&gt;
419
-
420
- Permission is hereby granted, free of charge, to any person obtaining
421
- a copy of this software and associated documentation files (the
422
- 'Software'), to deal in the Software without restriction, including
423
- without limitation the rights to use, copy, modify, merge, publish,
424
- distribute, sublicense, and/or sell copies of the Software, and to
425
- permit persons to whom the Software is furnished to do so, subject to
426
- the following conditions:
427
-
428
- The above copyright notice and this permission notice shall be
429
- included in all copies or substantial portions of the Software.
430
-
431
- THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
432
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
433
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
434
- IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
435
- CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
436
- TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
437
- SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -1 +0,0 @@
1
- module.exports = require('./src/node');
@@ -1,162 +0,0 @@
1
- /**
2
- * Helpers.
3
- */
4
-
5
- var s = 1000;
6
- var m = s * 60;
7
- var h = m * 60;
8
- var d = h * 24;
9
- var w = d * 7;
10
- var y = d * 365.25;
11
-
12
- /**
13
- * Parse or format the given `val`.
14
- *
15
- * Options:
16
- *
17
- * - `long` verbose formatting [false]
18
- *
19
- * @param {String|Number} val
20
- * @param {Object} [options]
21
- * @throws {Error} throw an error if val is not a non-empty string or a number
22
- * @return {String|Number}
23
- * @api public
24
- */
25
-
26
- module.exports = function (val, options) {
27
- options = options || {};
28
- var type = typeof val;
29
- if (type === 'string' && val.length > 0) {
30
- return parse(val);
31
- } else if (type === 'number' && isFinite(val)) {
32
- return options.long ? fmtLong(val) : fmtShort(val);
33
- }
34
- throw new Error(
35
- 'val is not a non-empty string or a valid number. val=' +
36
- JSON.stringify(val)
37
- );
38
- };
39
-
40
- /**
41
- * Parse the given `str` and return milliseconds.
42
- *
43
- * @param {String} str
44
- * @return {Number}
45
- * @api private
46
- */
47
-
48
- function parse(str) {
49
- str = String(str);
50
- if (str.length > 100) {
51
- return;
52
- }
53
- var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
54
- str
55
- );
56
- if (!match) {
57
- return;
58
- }
59
- var n = parseFloat(match[1]);
60
- var type = (match[2] || 'ms').toLowerCase();
61
- switch (type) {
62
- case 'years':
63
- case 'year':
64
- case 'yrs':
65
- case 'yr':
66
- case 'y':
67
- return n * y;
68
- case 'weeks':
69
- case 'week':
70
- case 'w':
71
- return n * w;
72
- case 'days':
73
- case 'day':
74
- case 'd':
75
- return n * d;
76
- case 'hours':
77
- case 'hour':
78
- case 'hrs':
79
- case 'hr':
80
- case 'h':
81
- return n * h;
82
- case 'minutes':
83
- case 'minute':
84
- case 'mins':
85
- case 'min':
86
- case 'm':
87
- return n * m;
88
- case 'seconds':
89
- case 'second':
90
- case 'secs':
91
- case 'sec':
92
- case 's':
93
- return n * s;
94
- case 'milliseconds':
95
- case 'millisecond':
96
- case 'msecs':
97
- case 'msec':
98
- case 'ms':
99
- return n;
100
- default:
101
- return undefined;
102
- }
103
- }
104
-
105
- /**
106
- * Short format for `ms`.
107
- *
108
- * @param {Number} ms
109
- * @return {String}
110
- * @api private
111
- */
112
-
113
- function fmtShort(ms) {
114
- var msAbs = Math.abs(ms);
115
- if (msAbs >= d) {
116
- return Math.round(ms / d) + 'd';
117
- }
118
- if (msAbs >= h) {
119
- return Math.round(ms / h) + 'h';
120
- }
121
- if (msAbs >= m) {
122
- return Math.round(ms / m) + 'm';
123
- }
124
- if (msAbs >= s) {
125
- return Math.round(ms / s) + 's';
126
- }
127
- return ms + 'ms';
128
- }
129
-
130
- /**
131
- * Long format for `ms`.
132
- *
133
- * @param {Number} ms
134
- * @return {String}
135
- * @api private
136
- */
137
-
138
- function fmtLong(ms) {
139
- var msAbs = Math.abs(ms);
140
- if (msAbs >= d) {
141
- return plural(ms, msAbs, d, 'day');
142
- }
143
- if (msAbs >= h) {
144
- return plural(ms, msAbs, h, 'hour');
145
- }
146
- if (msAbs >= m) {
147
- return plural(ms, msAbs, m, 'minute');
148
- }
149
- if (msAbs >= s) {
150
- return plural(ms, msAbs, s, 'second');
151
- }
152
- return ms + ' ms';
153
- }
154
-
155
- /**
156
- * Pluralization helper.
157
- */
158
-
159
- function plural(ms, msAbs, n, name) {
160
- var isPlural = msAbs >= n * 1.5;
161
- return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
162
- }
@@ -1,21 +0,0 @@
1
- The MIT License (MIT)
2
-
3
- Copyright (c) 2020 Vercel, Inc.
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,38 +0,0 @@
1
- {
2
- "name": "ms",
3
- "version": "2.1.3",
4
- "description": "Tiny millisecond conversion utility",
5
- "repository": "vercel/ms",
6
- "main": "./index",
7
- "files": [
8
- "index.js"
9
- ],
10
- "scripts": {
11
- "precommit": "lint-staged",
12
- "lint": "eslint lib/* bin/*",
13
- "test": "mocha tests.js"
14
- },
15
- "eslintConfig": {
16
- "extends": "eslint:recommended",
17
- "env": {
18
- "node": true,
19
- "es6": true
20
- }
21
- },
22
- "lint-staged": {
23
- "*.js": [
24
- "npm run lint",
25
- "prettier --single-quote --write",
26
- "git add"
27
- ]
28
- },
29
- "license": "MIT",
30
- "devDependencies": {
31
- "eslint": "4.18.2",
32
- "expect.js": "0.3.1",
33
- "husky": "0.14.3",
34
- "lint-staged": "5.0.0",
35
- "mocha": "4.0.1",
36
- "prettier": "2.0.5"
37
- }
38
- }