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.
- checksums.yaml +4 -4
- data/lib/immosquare-cleaner/version.rb +1 -1
- data/lib/immosquare-cleaner.rb +2 -2
- data/linters/eslint.config.mjs +30 -0
- data/linters/rubocop-3.2.2.yml +2 -0
- data/node_modules/function-bind/README.md +27 -25
- data/node_modules/function-bind/implementation.js +12 -44
- data/node_modules/function-bind/package.json +14 -38
- data/node_modules/is-core-module/CHANGELOG.md +0 -7
- data/node_modules/is-core-module/index.js +2 -2
- data/node_modules/is-core-module/package.json +4 -4
- data/package.json +2 -4
- metadata +3 -180
- data/linters/eslintrc.json +0 -57
- data/node_modules/.bin/rimraf +0 -1
- data/node_modules/eslint-config-airbnb-base/CHANGELOG.md +0 -374
- data/node_modules/eslint-config-airbnb-base/LICENSE.md +0 -21
- data/node_modules/eslint-config-airbnb-base/README.md +0 -112
- data/node_modules/eslint-config-airbnb-base/index.js +0 -17
- data/node_modules/eslint-config-airbnb-base/legacy.js +0 -34
- data/node_modules/eslint-config-airbnb-base/node_modules/semver/LICENSE +0 -15
- data/node_modules/eslint-config-airbnb-base/node_modules/semver/README.md +0 -443
- data/node_modules/eslint-config-airbnb-base/node_modules/semver/bin/semver.js +0 -174
- data/node_modules/eslint-config-airbnb-base/node_modules/semver/package.json +0 -38
- data/node_modules/eslint-config-airbnb-base/node_modules/semver/range.bnf +0 -16
- data/node_modules/eslint-config-airbnb-base/node_modules/semver/semver.js +0 -1643
- data/node_modules/eslint-config-airbnb-base/package.json +0 -95
- data/node_modules/eslint-config-airbnb-base/rules/best-practices.js +0 -408
- data/node_modules/eslint-config-airbnb-base/rules/errors.js +0 -179
- data/node_modules/eslint-config-airbnb-base/rules/es6.js +0 -185
- data/node_modules/eslint-config-airbnb-base/rules/imports.js +0 -273
- data/node_modules/eslint-config-airbnb-base/rules/node.js +0 -43
- data/node_modules/eslint-config-airbnb-base/rules/strict.js +0 -6
- data/node_modules/eslint-config-airbnb-base/rules/style.js +0 -529
- data/node_modules/eslint-config-airbnb-base/rules/variables.js +0 -56
- data/node_modules/eslint-config-airbnb-base/test/requires.js +0 -13
- data/node_modules/eslint-config-airbnb-base/test/test-base.js +0 -32
- data/node_modules/eslint-config-airbnb-base/whitespace-async.js +0 -96
- data/node_modules/eslint-config-airbnb-base/whitespace.js +0 -102
- data/node_modules/eslint-plugin-import/CHANGELOG.md +0 -1925
- data/node_modules/eslint-plugin-import/CONTRIBUTING.md +0 -84
- data/node_modules/eslint-plugin-import/LICENSE +0 -22
- data/node_modules/eslint-plugin-import/README.md +0 -500
- data/node_modules/eslint-plugin-import/RELEASE.md +0 -54
- data/node_modules/eslint-plugin-import/SECURITY.md +0 -11
- data/node_modules/eslint-plugin-import/config/electron.js +0 -8
- data/node_modules/eslint-plugin-import/config/errors.js +0 -14
- data/node_modules/eslint-plugin-import/config/react-native.js +0 -13
- data/node_modules/eslint-plugin-import/config/react.js +0 -18
- data/node_modules/eslint-plugin-import/config/recommended.js +0 -28
- data/node_modules/eslint-plugin-import/config/stage-0.js +0 -12
- data/node_modules/eslint-plugin-import/config/typescript.js +0 -34
- data/node_modules/eslint-plugin-import/config/warnings.js +0 -12
- data/node_modules/eslint-plugin-import/docs/rules/consistent-type-specifier-style.md +0 -91
- data/node_modules/eslint-plugin-import/docs/rules/default.md +0 -72
- data/node_modules/eslint-plugin-import/docs/rules/dynamic-import-chunkname.md +0 -92
- data/node_modules/eslint-plugin-import/docs/rules/export.md +0 -37
- data/node_modules/eslint-plugin-import/docs/rules/exports-last.md +0 -51
- data/node_modules/eslint-plugin-import/docs/rules/extensions.md +0 -174
- data/node_modules/eslint-plugin-import/docs/rules/first.md +0 -75
- data/node_modules/eslint-plugin-import/docs/rules/group-exports.md +0 -118
- data/node_modules/eslint-plugin-import/docs/rules/imports-first.md +0 -9
- data/node_modules/eslint-plugin-import/docs/rules/max-dependencies.md +0 -70
- data/node_modules/eslint-plugin-import/docs/rules/named.md +0 -102
- data/node_modules/eslint-plugin-import/docs/rules/namespace.md +0 -106
- data/node_modules/eslint-plugin-import/docs/rules/newline-after-import.md +0 -167
- data/node_modules/eslint-plugin-import/docs/rules/no-absolute-path.md +0 -54
- data/node_modules/eslint-plugin-import/docs/rules/no-amd.md +0 -37
- data/node_modules/eslint-plugin-import/docs/rules/no-anonymous-default-export.md +0 -83
- data/node_modules/eslint-plugin-import/docs/rules/no-commonjs.md +0 -96
- data/node_modules/eslint-plugin-import/docs/rules/no-cycle.md +0 -111
- data/node_modules/eslint-plugin-import/docs/rules/no-default-export.md +0 -65
- data/node_modules/eslint-plugin-import/docs/rules/no-deprecated.md +0 -62
- data/node_modules/eslint-plugin-import/docs/rules/no-duplicates.md +0 -109
- data/node_modules/eslint-plugin-import/docs/rules/no-dynamic-require.md +0 -25
- data/node_modules/eslint-plugin-import/docs/rules/no-empty-named-blocks.md +0 -49
- data/node_modules/eslint-plugin-import/docs/rules/no-extraneous-dependencies.md +0 -139
- data/node_modules/eslint-plugin-import/docs/rules/no-import-module-exports.md +0 -81
- data/node_modules/eslint-plugin-import/docs/rules/no-internal-modules.md +0 -136
- data/node_modules/eslint-plugin-import/docs/rules/no-mutable-exports.md +0 -54
- data/node_modules/eslint-plugin-import/docs/rules/no-named-as-default-member.md +0 -52
- data/node_modules/eslint-plugin-import/docs/rules/no-named-as-default.md +0 -53
- data/node_modules/eslint-plugin-import/docs/rules/no-named-default.md +0 -36
- data/node_modules/eslint-plugin-import/docs/rules/no-named-export.md +0 -79
- data/node_modules/eslint-plugin-import/docs/rules/no-namespace.md +0 -44
- data/node_modules/eslint-plugin-import/docs/rules/no-nodejs-modules.md +0 -42
- data/node_modules/eslint-plugin-import/docs/rules/no-relative-packages.md +0 -70
- data/node_modules/eslint-plugin-import/docs/rules/no-relative-parent-imports.md +0 -123
- data/node_modules/eslint-plugin-import/docs/rules/no-restricted-paths.md +0 -198
- data/node_modules/eslint-plugin-import/docs/rules/no-self-import.md +0 -32
- data/node_modules/eslint-plugin-import/docs/rules/no-unassigned-import.md +0 -60
- data/node_modules/eslint-plugin-import/docs/rules/no-unresolved.md +0 -110
- data/node_modules/eslint-plugin-import/docs/rules/no-unused-modules.md +0 -125
- data/node_modules/eslint-plugin-import/docs/rules/no-useless-path-segments.md +0 -85
- data/node_modules/eslint-plugin-import/docs/rules/no-webpack-loader-syntax.md +0 -39
- data/node_modules/eslint-plugin-import/docs/rules/order.md +0 -365
- data/node_modules/eslint-plugin-import/docs/rules/prefer-default-export.md +0 -185
- data/node_modules/eslint-plugin-import/docs/rules/unambiguous.md +0 -57
- data/node_modules/eslint-plugin-import/lib/ExportMap.js +0 -856
- data/node_modules/eslint-plugin-import/lib/core/importType.js +0 -129
- data/node_modules/eslint-plugin-import/lib/core/packagePath.js +0 -22
- data/node_modules/eslint-plugin-import/lib/core/staticRequire.js +0 -11
- data/node_modules/eslint-plugin-import/lib/docsUrl.js +0 -8
- data/node_modules/eslint-plugin-import/lib/importDeclaration.js +0 -5
- data/node_modules/eslint-plugin-import/lib/index.js +0 -71
- data/node_modules/eslint-plugin-import/lib/rules/consistent-type-specifier-style.js +0 -221
- data/node_modules/eslint-plugin-import/lib/rules/default.js +0 -40
- data/node_modules/eslint-plugin-import/lib/rules/dynamic-import-chunkname.js +0 -120
- data/node_modules/eslint-plugin-import/lib/rules/export.js +0 -250
- data/node_modules/eslint-plugin-import/lib/rules/exports-last.js +0 -40
- data/node_modules/eslint-plugin-import/lib/rules/extensions.js +0 -193
- data/node_modules/eslint-plugin-import/lib/rules/first.js +0 -144
- data/node_modules/eslint-plugin-import/lib/rules/group-exports.js +0 -155
- data/node_modules/eslint-plugin-import/lib/rules/imports-first.js +0 -16
- data/node_modules/eslint-plugin-import/lib/rules/max-dependencies.js +0 -60
- data/node_modules/eslint-plugin-import/lib/rules/named.js +0 -143
- data/node_modules/eslint-plugin-import/lib/rules/namespace.js +0 -218
- data/node_modules/eslint-plugin-import/lib/rules/newline-after-import.js +0 -237
- data/node_modules/eslint-plugin-import/lib/rules/no-absolute-path.js +0 -40
- data/node_modules/eslint-plugin-import/lib/rules/no-amd.js +0 -47
- data/node_modules/eslint-plugin-import/lib/rules/no-anonymous-default-export.js +0 -103
- data/node_modules/eslint-plugin-import/lib/rules/no-commonjs.js +0 -141
- data/node_modules/eslint-plugin-import/lib/rules/no-cycle.js +0 -158
- data/node_modules/eslint-plugin-import/lib/rules/no-default-export.js +0 -43
- data/node_modules/eslint-plugin-import/lib/rules/no-deprecated.js +0 -138
- data/node_modules/eslint-plugin-import/lib/rules/no-duplicates.js +0 -354
- data/node_modules/eslint-plugin-import/lib/rules/no-dynamic-require.js +0 -77
- data/node_modules/eslint-plugin-import/lib/rules/no-empty-named-blocks.js +0 -105
- data/node_modules/eslint-plugin-import/lib/rules/no-extraneous-dependencies.js +0 -301
- data/node_modules/eslint-plugin-import/lib/rules/no-import-module-exports.js +0 -85
- data/node_modules/eslint-plugin-import/lib/rules/no-internal-modules.js +0 -144
- data/node_modules/eslint-plugin-import/lib/rules/no-mutable-exports.js +0 -59
- data/node_modules/eslint-plugin-import/lib/rules/no-named-as-default-member.js +0 -96
- data/node_modules/eslint-plugin-import/lib/rules/no-named-as-default.js +0 -45
- data/node_modules/eslint-plugin-import/lib/rules/no-named-default.js +0 -31
- data/node_modules/eslint-plugin-import/lib/rules/no-named-export.js +0 -39
- data/node_modules/eslint-plugin-import/lib/rules/no-namespace.js +0 -175
- data/node_modules/eslint-plugin-import/lib/rules/no-nodejs-modules.js +0 -44
- data/node_modules/eslint-plugin-import/lib/rules/no-relative-packages.js +0 -71
- data/node_modules/eslint-plugin-import/lib/rules/no-relative-parent-imports.js +0 -48
- data/node_modules/eslint-plugin-import/lib/rules/no-restricted-paths.js +0 -245
- data/node_modules/eslint-plugin-import/lib/rules/no-self-import.js +0 -39
- data/node_modules/eslint-plugin-import/lib/rules/no-unassigned-import.js +0 -79
- data/node_modules/eslint-plugin-import/lib/rules/no-unresolved.js +0 -60
- data/node_modules/eslint-plugin-import/lib/rules/no-unused-modules.js +0 -945
- data/node_modules/eslint-plugin-import/lib/rules/no-useless-path-segments.js +0 -147
- data/node_modules/eslint-plugin-import/lib/rules/no-webpack-loader-syntax.js +0 -26
- data/node_modules/eslint-plugin-import/lib/rules/order.js +0 -785
- data/node_modules/eslint-plugin-import/lib/rules/prefer-default-export.js +0 -116
- data/node_modules/eslint-plugin-import/lib/rules/unambiguous.js +0 -38
- data/node_modules/eslint-plugin-import/memo-parser/LICENSE +0 -22
- data/node_modules/eslint-plugin-import/memo-parser/README.md +0 -21
- data/node_modules/eslint-plugin-import/memo-parser/index.js +0 -41
- data/node_modules/eslint-plugin-import/node_modules/debug/CHANGELOG.md +0 -395
- data/node_modules/eslint-plugin-import/node_modules/debug/LICENSE +0 -19
- data/node_modules/eslint-plugin-import/node_modules/debug/README.md +0 -437
- data/node_modules/eslint-plugin-import/node_modules/debug/node.js +0 -1
- data/node_modules/eslint-plugin-import/node_modules/debug/node_modules/ms/index.js +0 -162
- data/node_modules/eslint-plugin-import/node_modules/debug/node_modules/ms/license.md +0 -21
- data/node_modules/eslint-plugin-import/node_modules/debug/node_modules/ms/package.json +0 -38
- data/node_modules/eslint-plugin-import/node_modules/debug/node_modules/ms/readme.md +0 -59
- data/node_modules/eslint-plugin-import/node_modules/debug/package.json +0 -51
- data/node_modules/eslint-plugin-import/node_modules/debug/src/browser.js +0 -180
- data/node_modules/eslint-plugin-import/node_modules/debug/src/common.js +0 -249
- data/node_modules/eslint-plugin-import/node_modules/debug/src/index.js +0 -12
- data/node_modules/eslint-plugin-import/node_modules/debug/src/node.js +0 -177
- data/node_modules/eslint-plugin-import/node_modules/doctrine/CHANGELOG.md +0 -94
- data/node_modules/eslint-plugin-import/node_modules/doctrine/LICENSE +0 -177
- data/node_modules/eslint-plugin-import/node_modules/doctrine/LICENSE.closure-compiler +0 -202
- data/node_modules/eslint-plugin-import/node_modules/doctrine/LICENSE.esprima +0 -19
- data/node_modules/eslint-plugin-import/node_modules/doctrine/README.md +0 -165
- data/node_modules/eslint-plugin-import/node_modules/doctrine/lib/doctrine.js +0 -899
- data/node_modules/eslint-plugin-import/node_modules/doctrine/lib/typed.js +0 -1305
- data/node_modules/eslint-plugin-import/node_modules/doctrine/lib/utility.js +0 -35
- data/node_modules/eslint-plugin-import/node_modules/doctrine/package.json +0 -57
- data/node_modules/eslint-plugin-import/node_modules/minimatch/LICENSE +0 -15
- data/node_modules/eslint-plugin-import/node_modules/minimatch/README.md +0 -230
- data/node_modules/eslint-plugin-import/node_modules/minimatch/minimatch.js +0 -947
- data/node_modules/eslint-plugin-import/node_modules/minimatch/node_modules/brace-expansion/LICENSE +0 -21
- data/node_modules/eslint-plugin-import/node_modules/minimatch/node_modules/brace-expansion/README.md +0 -129
- data/node_modules/eslint-plugin-import/node_modules/minimatch/node_modules/brace-expansion/index.js +0 -201
- data/node_modules/eslint-plugin-import/node_modules/minimatch/node_modules/brace-expansion/package.json +0 -47
- data/node_modules/eslint-plugin-import/node_modules/minimatch/package.json +0 -33
- data/node_modules/eslint-plugin-import/node_modules/semver/LICENSE +0 -15
- data/node_modules/eslint-plugin-import/node_modules/semver/README.md +0 -443
- data/node_modules/eslint-plugin-import/node_modules/semver/bin/semver.js +0 -174
- data/node_modules/eslint-plugin-import/node_modules/semver/package.json +0 -38
- data/node_modules/eslint-plugin-import/node_modules/semver/range.bnf +0 -16
- data/node_modules/eslint-plugin-import/node_modules/semver/semver.js +0 -1643
- data/node_modules/eslint-plugin-import/package.json +0 -124
- data/node_modules/function-bind/CHANGELOG.md +0 -136
@@ -1,59 +0,0 @@
|
|
1
|
-
# ms
|
2
|
-
|
3
|
-
![CI](https://github.com/vercel/ms/workflows/CI/badge.svg)
|
4
|
-
|
5
|
-
Use this package to easily convert various time formats to milliseconds.
|
6
|
-
|
7
|
-
## Examples
|
8
|
-
|
9
|
-
```js
|
10
|
-
ms('2 days') // 172800000
|
11
|
-
ms('1d') // 86400000
|
12
|
-
ms('10h') // 36000000
|
13
|
-
ms('2.5 hrs') // 9000000
|
14
|
-
ms('2h') // 7200000
|
15
|
-
ms('1m') // 60000
|
16
|
-
ms('5s') // 5000
|
17
|
-
ms('1y') // 31557600000
|
18
|
-
ms('100') // 100
|
19
|
-
ms('-3 days') // -259200000
|
20
|
-
ms('-1h') // -3600000
|
21
|
-
ms('-200') // -200
|
22
|
-
```
|
23
|
-
|
24
|
-
### Convert from Milliseconds
|
25
|
-
|
26
|
-
```js
|
27
|
-
ms(60000) // "1m"
|
28
|
-
ms(2 * 60000) // "2m"
|
29
|
-
ms(-3 * 60000) // "-3m"
|
30
|
-
ms(ms('10 hours')) // "10h"
|
31
|
-
```
|
32
|
-
|
33
|
-
### Time Format Written-Out
|
34
|
-
|
35
|
-
```js
|
36
|
-
ms(60000, { long: true }) // "1 minute"
|
37
|
-
ms(2 * 60000, { long: true }) // "2 minutes"
|
38
|
-
ms(-3 * 60000, { long: true }) // "-3 minutes"
|
39
|
-
ms(ms('10 hours'), { long: true }) // "10 hours"
|
40
|
-
```
|
41
|
-
|
42
|
-
## Features
|
43
|
-
|
44
|
-
- Works both in [Node.js](https://nodejs.org) and in the browser
|
45
|
-
- If a number is supplied to `ms`, a string with a unit is returned
|
46
|
-
- If a string that contains the number is supplied, it returns it as a number (e.g.: it returns `100` for `'100'`)
|
47
|
-
- If you pass a string with a number and a valid unit, the number of equivalent milliseconds is returned
|
48
|
-
|
49
|
-
## Related Packages
|
50
|
-
|
51
|
-
- [ms.macro](https://github.com/knpwrs/ms.macro) - Run `ms` as a macro at build-time.
|
52
|
-
|
53
|
-
## Caught a Bug?
|
54
|
-
|
55
|
-
1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device
|
56
|
-
2. Link the package to the global module directory: `npm link`
|
57
|
-
3. Within the module you want to test your local development instance of ms, just link it to the dependencies: `npm link ms`. Instead of the default one from npm, Node.js will now use your clone of ms!
|
58
|
-
|
59
|
-
As always, you can run the tests using: `npm test`
|
@@ -1,51 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "debug",
|
3
|
-
"version": "3.2.7",
|
4
|
-
"repository": {
|
5
|
-
"type": "git",
|
6
|
-
"url": "git://github.com/visionmedia/debug.git"
|
7
|
-
},
|
8
|
-
"description": "small debugging utility",
|
9
|
-
"keywords": [
|
10
|
-
"debug",
|
11
|
-
"log",
|
12
|
-
"debugger"
|
13
|
-
],
|
14
|
-
"files": [
|
15
|
-
"src",
|
16
|
-
"node.js",
|
17
|
-
"dist/debug.js",
|
18
|
-
"LICENSE",
|
19
|
-
"README.md"
|
20
|
-
],
|
21
|
-
"author": "TJ Holowaychuk <tj@vision-media.ca>",
|
22
|
-
"contributors": [
|
23
|
-
"Nathan Rajlich <nathan@tootallnate.net> (http://n8.io)",
|
24
|
-
"Andrew Rhyne <rhyneandrew@gmail.com>"
|
25
|
-
],
|
26
|
-
"license": "MIT",
|
27
|
-
"dependencies": {
|
28
|
-
"ms": "^2.1.1"
|
29
|
-
},
|
30
|
-
"devDependencies": {
|
31
|
-
"@babel/cli": "^7.0.0",
|
32
|
-
"@babel/core": "^7.0.0",
|
33
|
-
"@babel/preset-env": "^7.0.0",
|
34
|
-
"browserify": "14.4.0",
|
35
|
-
"chai": "^3.5.0",
|
36
|
-
"concurrently": "^3.1.0",
|
37
|
-
"coveralls": "^3.0.2",
|
38
|
-
"istanbul": "^0.4.5",
|
39
|
-
"karma": "^3.0.0",
|
40
|
-
"karma-chai": "^0.1.0",
|
41
|
-
"karma-mocha": "^1.3.0",
|
42
|
-
"karma-phantomjs-launcher": "^1.0.2",
|
43
|
-
"mocha": "^5.2.0",
|
44
|
-
"mocha-lcov-reporter": "^1.2.0",
|
45
|
-
"rimraf": "^2.5.4",
|
46
|
-
"xo": "^0.23.0"
|
47
|
-
},
|
48
|
-
"main": "./src/index.js",
|
49
|
-
"browser": "./src/browser.js",
|
50
|
-
"unpkg": "./dist/debug.js"
|
51
|
-
}
|
@@ -1,180 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
4
|
-
|
5
|
-
/* eslint-env browser */
|
6
|
-
|
7
|
-
/**
|
8
|
-
* This is the web browser implementation of `debug()`.
|
9
|
-
*/
|
10
|
-
exports.log = log;
|
11
|
-
exports.formatArgs = formatArgs;
|
12
|
-
exports.save = save;
|
13
|
-
exports.load = load;
|
14
|
-
exports.useColors = useColors;
|
15
|
-
exports.storage = localstorage();
|
16
|
-
/**
|
17
|
-
* Colors.
|
18
|
-
*/
|
19
|
-
|
20
|
-
exports.colors = ['#0000CC', '#0000FF', '#0033CC', '#0033FF', '#0066CC', '#0066FF', '#0099CC', '#0099FF', '#00CC00', '#00CC33', '#00CC66', '#00CC99', '#00CCCC', '#00CCFF', '#3300CC', '#3300FF', '#3333CC', '#3333FF', '#3366CC', '#3366FF', '#3399CC', '#3399FF', '#33CC00', '#33CC33', '#33CC66', '#33CC99', '#33CCCC', '#33CCFF', '#6600CC', '#6600FF', '#6633CC', '#6633FF', '#66CC00', '#66CC33', '#9900CC', '#9900FF', '#9933CC', '#9933FF', '#99CC00', '#99CC33', '#CC0000', '#CC0033', '#CC0066', '#CC0099', '#CC00CC', '#CC00FF', '#CC3300', '#CC3333', '#CC3366', '#CC3399', '#CC33CC', '#CC33FF', '#CC6600', '#CC6633', '#CC9900', '#CC9933', '#CCCC00', '#CCCC33', '#FF0000', '#FF0033', '#FF0066', '#FF0099', '#FF00CC', '#FF00FF', '#FF3300', '#FF3333', '#FF3366', '#FF3399', '#FF33CC', '#FF33FF', '#FF6600', '#FF6633', '#FF9900', '#FF9933', '#FFCC00', '#FFCC33'];
|
21
|
-
/**
|
22
|
-
* Currently only WebKit-based Web Inspectors, Firefox >= v31,
|
23
|
-
* and the Firebug extension (any Firefox version) are known
|
24
|
-
* to support "%c" CSS customizations.
|
25
|
-
*
|
26
|
-
* TODO: add a `localStorage` variable to explicitly enable/disable colors
|
27
|
-
*/
|
28
|
-
// eslint-disable-next-line complexity
|
29
|
-
|
30
|
-
function useColors() {
|
31
|
-
// NB: In an Electron preload script, document will be defined but not fully
|
32
|
-
// initialized. Since we know we're in Chrome, we'll just detect this case
|
33
|
-
// explicitly
|
34
|
-
if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
|
35
|
-
return true;
|
36
|
-
} // Internet Explorer and Edge do not support colors.
|
37
|
-
|
38
|
-
|
39
|
-
if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
|
40
|
-
return false;
|
41
|
-
} // Is webkit? http://stackoverflow.com/a/16459606/376773
|
42
|
-
// document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
|
43
|
-
|
44
|
-
|
45
|
-
return typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
|
46
|
-
typeof window !== 'undefined' && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
|
47
|
-
// https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
|
48
|
-
typeof navigator !== 'undefined' && 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
|
49
|
-
typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
|
50
|
-
}
|
51
|
-
/**
|
52
|
-
* Colorize log arguments if enabled.
|
53
|
-
*
|
54
|
-
* @api public
|
55
|
-
*/
|
56
|
-
|
57
|
-
|
58
|
-
function formatArgs(args) {
|
59
|
-
args[0] = (this.useColors ? '%c' : '') + this.namespace + (this.useColors ? ' %c' : ' ') + args[0] + (this.useColors ? '%c ' : ' ') + '+' + module.exports.humanize(this.diff);
|
60
|
-
|
61
|
-
if (!this.useColors) {
|
62
|
-
return;
|
63
|
-
}
|
64
|
-
|
65
|
-
var c = 'color: ' + this.color;
|
66
|
-
args.splice(1, 0, c, 'color: inherit'); // The final "%c" is somewhat tricky, because there could be other
|
67
|
-
// arguments passed either before or after the %c, so we need to
|
68
|
-
// figure out the correct index to insert the CSS into
|
69
|
-
|
70
|
-
var index = 0;
|
71
|
-
var lastC = 0;
|
72
|
-
args[0].replace(/%[a-zA-Z%]/g, function (match) {
|
73
|
-
if (match === '%%') {
|
74
|
-
return;
|
75
|
-
}
|
76
|
-
|
77
|
-
index++;
|
78
|
-
|
79
|
-
if (match === '%c') {
|
80
|
-
// We only are interested in the *last* %c
|
81
|
-
// (the user may have provided their own)
|
82
|
-
lastC = index;
|
83
|
-
}
|
84
|
-
});
|
85
|
-
args.splice(lastC, 0, c);
|
86
|
-
}
|
87
|
-
/**
|
88
|
-
* Invokes `console.log()` when available.
|
89
|
-
* No-op when `console.log` is not a "function".
|
90
|
-
*
|
91
|
-
* @api public
|
92
|
-
*/
|
93
|
-
|
94
|
-
|
95
|
-
function log() {
|
96
|
-
var _console;
|
97
|
-
|
98
|
-
// This hackery is required for IE8/9, where
|
99
|
-
// the `console.log` function doesn't have 'apply'
|
100
|
-
return (typeof console === "undefined" ? "undefined" : _typeof(console)) === 'object' && console.log && (_console = console).log.apply(_console, arguments);
|
101
|
-
}
|
102
|
-
/**
|
103
|
-
* Save `namespaces`.
|
104
|
-
*
|
105
|
-
* @param {String} namespaces
|
106
|
-
* @api private
|
107
|
-
*/
|
108
|
-
|
109
|
-
|
110
|
-
function save(namespaces) {
|
111
|
-
try {
|
112
|
-
if (namespaces) {
|
113
|
-
exports.storage.setItem('debug', namespaces);
|
114
|
-
} else {
|
115
|
-
exports.storage.removeItem('debug');
|
116
|
-
}
|
117
|
-
} catch (error) {// Swallow
|
118
|
-
// XXX (@Qix-) should we be logging these?
|
119
|
-
}
|
120
|
-
}
|
121
|
-
/**
|
122
|
-
* Load `namespaces`.
|
123
|
-
*
|
124
|
-
* @return {String} returns the previously persisted debug modes
|
125
|
-
* @api private
|
126
|
-
*/
|
127
|
-
|
128
|
-
|
129
|
-
function load() {
|
130
|
-
var r;
|
131
|
-
|
132
|
-
try {
|
133
|
-
r = exports.storage.getItem('debug');
|
134
|
-
} catch (error) {} // Swallow
|
135
|
-
// XXX (@Qix-) should we be logging these?
|
136
|
-
// If debug isn't set in LS, and we're in Electron, try to load $DEBUG
|
137
|
-
|
138
|
-
|
139
|
-
if (!r && typeof process !== 'undefined' && 'env' in process) {
|
140
|
-
r = process.env.DEBUG;
|
141
|
-
}
|
142
|
-
|
143
|
-
return r;
|
144
|
-
}
|
145
|
-
/**
|
146
|
-
* Localstorage attempts to return the localstorage.
|
147
|
-
*
|
148
|
-
* This is necessary because safari throws
|
149
|
-
* when a user disables cookies/localstorage
|
150
|
-
* and you attempt to access it.
|
151
|
-
*
|
152
|
-
* @return {LocalStorage}
|
153
|
-
* @api private
|
154
|
-
*/
|
155
|
-
|
156
|
-
|
157
|
-
function localstorage() {
|
158
|
-
try {
|
159
|
-
// TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
|
160
|
-
// The Browser also has localStorage in the global context.
|
161
|
-
return localStorage;
|
162
|
-
} catch (error) {// Swallow
|
163
|
-
// XXX (@Qix-) should we be logging these?
|
164
|
-
}
|
165
|
-
}
|
166
|
-
|
167
|
-
module.exports = require('./common')(exports);
|
168
|
-
var formatters = module.exports.formatters;
|
169
|
-
/**
|
170
|
-
* Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
|
171
|
-
*/
|
172
|
-
|
173
|
-
formatters.j = function (v) {
|
174
|
-
try {
|
175
|
-
return JSON.stringify(v);
|
176
|
-
} catch (error) {
|
177
|
-
return '[UnexpectedJSONParseError]: ' + error.message;
|
178
|
-
}
|
179
|
-
};
|
180
|
-
|
@@ -1,249 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
/**
|
4
|
-
* This is the common logic for both the Node.js and web browser
|
5
|
-
* implementations of `debug()`.
|
6
|
-
*/
|
7
|
-
function setup(env) {
|
8
|
-
createDebug.debug = createDebug;
|
9
|
-
createDebug.default = createDebug;
|
10
|
-
createDebug.coerce = coerce;
|
11
|
-
createDebug.disable = disable;
|
12
|
-
createDebug.enable = enable;
|
13
|
-
createDebug.enabled = enabled;
|
14
|
-
createDebug.humanize = require('ms');
|
15
|
-
Object.keys(env).forEach(function (key) {
|
16
|
-
createDebug[key] = env[key];
|
17
|
-
});
|
18
|
-
/**
|
19
|
-
* Active `debug` instances.
|
20
|
-
*/
|
21
|
-
|
22
|
-
createDebug.instances = [];
|
23
|
-
/**
|
24
|
-
* The currently active debug mode names, and names to skip.
|
25
|
-
*/
|
26
|
-
|
27
|
-
createDebug.names = [];
|
28
|
-
createDebug.skips = [];
|
29
|
-
/**
|
30
|
-
* Map of special "%n" handling functions, for the debug "format" argument.
|
31
|
-
*
|
32
|
-
* Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
|
33
|
-
*/
|
34
|
-
|
35
|
-
createDebug.formatters = {};
|
36
|
-
/**
|
37
|
-
* Selects a color for a debug namespace
|
38
|
-
* @param {String} namespace The namespace string for the for the debug instance to be colored
|
39
|
-
* @return {Number|String} An ANSI color code for the given namespace
|
40
|
-
* @api private
|
41
|
-
*/
|
42
|
-
|
43
|
-
function selectColor(namespace) {
|
44
|
-
var hash = 0;
|
45
|
-
|
46
|
-
for (var i = 0; i < namespace.length; i++) {
|
47
|
-
hash = (hash << 5) - hash + namespace.charCodeAt(i);
|
48
|
-
hash |= 0; // Convert to 32bit integer
|
49
|
-
}
|
50
|
-
|
51
|
-
return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
|
52
|
-
}
|
53
|
-
|
54
|
-
createDebug.selectColor = selectColor;
|
55
|
-
/**
|
56
|
-
* Create a debugger with the given `namespace`.
|
57
|
-
*
|
58
|
-
* @param {String} namespace
|
59
|
-
* @return {Function}
|
60
|
-
* @api public
|
61
|
-
*/
|
62
|
-
|
63
|
-
function createDebug(namespace) {
|
64
|
-
var prevTime;
|
65
|
-
|
66
|
-
function debug() {
|
67
|
-
// Disabled?
|
68
|
-
if (!debug.enabled) {
|
69
|
-
return;
|
70
|
-
}
|
71
|
-
|
72
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
73
|
-
args[_key] = arguments[_key];
|
74
|
-
}
|
75
|
-
|
76
|
-
var self = debug; // Set `diff` timestamp
|
77
|
-
|
78
|
-
var curr = Number(new Date());
|
79
|
-
var ms = curr - (prevTime || curr);
|
80
|
-
self.diff = ms;
|
81
|
-
self.prev = prevTime;
|
82
|
-
self.curr = curr;
|
83
|
-
prevTime = curr;
|
84
|
-
args[0] = createDebug.coerce(args[0]);
|
85
|
-
|
86
|
-
if (typeof args[0] !== 'string') {
|
87
|
-
// Anything else let's inspect with %O
|
88
|
-
args.unshift('%O');
|
89
|
-
} // Apply any `formatters` transformations
|
90
|
-
|
91
|
-
|
92
|
-
var index = 0;
|
93
|
-
args[0] = args[0].replace(/%([a-zA-Z%])/g, function (match, format) {
|
94
|
-
// If we encounter an escaped % then don't increase the array index
|
95
|
-
if (match === '%%') {
|
96
|
-
return match;
|
97
|
-
}
|
98
|
-
|
99
|
-
index++;
|
100
|
-
var formatter = createDebug.formatters[format];
|
101
|
-
|
102
|
-
if (typeof formatter === 'function') {
|
103
|
-
var val = args[index];
|
104
|
-
match = formatter.call(self, val); // Now we need to remove `args[index]` since it's inlined in the `format`
|
105
|
-
|
106
|
-
args.splice(index, 1);
|
107
|
-
index--;
|
108
|
-
}
|
109
|
-
|
110
|
-
return match;
|
111
|
-
}); // Apply env-specific formatting (colors, etc.)
|
112
|
-
|
113
|
-
createDebug.formatArgs.call(self, args);
|
114
|
-
var logFn = self.log || createDebug.log;
|
115
|
-
logFn.apply(self, args);
|
116
|
-
}
|
117
|
-
|
118
|
-
debug.namespace = namespace;
|
119
|
-
debug.enabled = createDebug.enabled(namespace);
|
120
|
-
debug.useColors = createDebug.useColors();
|
121
|
-
debug.color = selectColor(namespace);
|
122
|
-
debug.destroy = destroy;
|
123
|
-
debug.extend = extend; // Debug.formatArgs = formatArgs;
|
124
|
-
// debug.rawLog = rawLog;
|
125
|
-
// env-specific initialization logic for debug instances
|
126
|
-
|
127
|
-
if (typeof createDebug.init === 'function') {
|
128
|
-
createDebug.init(debug);
|
129
|
-
}
|
130
|
-
|
131
|
-
createDebug.instances.push(debug);
|
132
|
-
return debug;
|
133
|
-
}
|
134
|
-
|
135
|
-
function destroy() {
|
136
|
-
var index = createDebug.instances.indexOf(this);
|
137
|
-
|
138
|
-
if (index !== -1) {
|
139
|
-
createDebug.instances.splice(index, 1);
|
140
|
-
return true;
|
141
|
-
}
|
142
|
-
|
143
|
-
return false;
|
144
|
-
}
|
145
|
-
|
146
|
-
function extend(namespace, delimiter) {
|
147
|
-
return createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
|
148
|
-
}
|
149
|
-
/**
|
150
|
-
* Enables a debug mode by namespaces. This can include modes
|
151
|
-
* separated by a colon and wildcards.
|
152
|
-
*
|
153
|
-
* @param {String} namespaces
|
154
|
-
* @api public
|
155
|
-
*/
|
156
|
-
|
157
|
-
|
158
|
-
function enable(namespaces) {
|
159
|
-
createDebug.save(namespaces);
|
160
|
-
createDebug.names = [];
|
161
|
-
createDebug.skips = [];
|
162
|
-
var i;
|
163
|
-
var split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
|
164
|
-
var len = split.length;
|
165
|
-
|
166
|
-
for (i = 0; i < len; i++) {
|
167
|
-
if (!split[i]) {
|
168
|
-
// ignore empty strings
|
169
|
-
continue;
|
170
|
-
}
|
171
|
-
|
172
|
-
namespaces = split[i].replace(/\*/g, '.*?');
|
173
|
-
|
174
|
-
if (namespaces[0] === '-') {
|
175
|
-
createDebug.skips.push(new RegExp('^' + namespaces.substr(1) + '$'));
|
176
|
-
} else {
|
177
|
-
createDebug.names.push(new RegExp('^' + namespaces + '$'));
|
178
|
-
}
|
179
|
-
}
|
180
|
-
|
181
|
-
for (i = 0; i < createDebug.instances.length; i++) {
|
182
|
-
var instance = createDebug.instances[i];
|
183
|
-
instance.enabled = createDebug.enabled(instance.namespace);
|
184
|
-
}
|
185
|
-
}
|
186
|
-
/**
|
187
|
-
* Disable debug output.
|
188
|
-
*
|
189
|
-
* @api public
|
190
|
-
*/
|
191
|
-
|
192
|
-
|
193
|
-
function disable() {
|
194
|
-
createDebug.enable('');
|
195
|
-
}
|
196
|
-
/**
|
197
|
-
* Returns true if the given mode name is enabled, false otherwise.
|
198
|
-
*
|
199
|
-
* @param {String} name
|
200
|
-
* @return {Boolean}
|
201
|
-
* @api public
|
202
|
-
*/
|
203
|
-
|
204
|
-
|
205
|
-
function enabled(name) {
|
206
|
-
if (name[name.length - 1] === '*') {
|
207
|
-
return true;
|
208
|
-
}
|
209
|
-
|
210
|
-
var i;
|
211
|
-
var len;
|
212
|
-
|
213
|
-
for (i = 0, len = createDebug.skips.length; i < len; i++) {
|
214
|
-
if (createDebug.skips[i].test(name)) {
|
215
|
-
return false;
|
216
|
-
}
|
217
|
-
}
|
218
|
-
|
219
|
-
for (i = 0, len = createDebug.names.length; i < len; i++) {
|
220
|
-
if (createDebug.names[i].test(name)) {
|
221
|
-
return true;
|
222
|
-
}
|
223
|
-
}
|
224
|
-
|
225
|
-
return false;
|
226
|
-
}
|
227
|
-
/**
|
228
|
-
* Coerce `val`.
|
229
|
-
*
|
230
|
-
* @param {Mixed} val
|
231
|
-
* @return {Mixed}
|
232
|
-
* @api private
|
233
|
-
*/
|
234
|
-
|
235
|
-
|
236
|
-
function coerce(val) {
|
237
|
-
if (val instanceof Error) {
|
238
|
-
return val.stack || val.message;
|
239
|
-
}
|
240
|
-
|
241
|
-
return val;
|
242
|
-
}
|
243
|
-
|
244
|
-
createDebug.enable(createDebug.load());
|
245
|
-
return createDebug;
|
246
|
-
}
|
247
|
-
|
248
|
-
module.exports = setup;
|
249
|
-
|
@@ -1,12 +0,0 @@
|
|
1
|
-
"use strict";
|
2
|
-
|
3
|
-
/**
|
4
|
-
* Detect Electron renderer / nwjs process, which is node, but we should
|
5
|
-
* treat as a browser.
|
6
|
-
*/
|
7
|
-
if (typeof process === 'undefined' || process.type === 'renderer' || process.browser === true || process.__nwjs) {
|
8
|
-
module.exports = require('./browser.js');
|
9
|
-
} else {
|
10
|
-
module.exports = require('./node.js');
|
11
|
-
}
|
12
|
-
|