@aws-solutions-constructs/core 2.77.0 → 2.78.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +42 -42
- package/lib/alb-helper.js +2 -3
- package/lib/apigateway-defaults.d.ts +6 -6
- package/lib/apigateway-defaults.js +11 -11
- package/lib/apigateway-helper.d.ts +2 -2
- package/lib/apigateway-helper.js +8 -10
- package/lib/cloudfront-distribution-helper.js +2 -3
- package/lib/cloudwatch-log-group-helper.js +2 -4
- package/lib/cognito-defaults.d.ts +2 -2
- package/lib/cognito-defaults.js +4 -4
- package/lib/cognito-helper.js +3 -5
- package/lib/dynamodb-table-defaults.d.ts +3 -3
- package/lib/dynamodb-table-defaults.js +6 -6
- package/lib/dynamodb-table-helper.js +3 -3
- package/lib/elasticsearch-helper.js +5 -5
- package/lib/eventbridge-helper.js +4 -4
- package/lib/events-rule-defaults.d.ts +1 -1
- package/lib/events-rule-defaults.js +4 -4
- package/lib/fargate-helper.js +2 -3
- package/lib/glue-database-defaults.js +3 -3
- package/lib/glue-job-helper.js +3 -3
- package/lib/glue-table-defaults.js +6 -6
- package/lib/iot-topic-rule-defaults.d.ts +1 -1
- package/lib/iot-topic-rule-defaults.js +6 -6
- package/lib/kendra-helper.d.ts +1 -1
- package/lib/kendra-helper.js +1 -1
- package/lib/kinesis-analytics-defaults.d.ts +2 -2
- package/lib/kinesis-analytics-defaults.js +4 -4
- package/lib/kinesis-analytics-helper.js +2 -2
- package/lib/kinesis-firehose-s3-defaults.d.ts +1 -1
- package/lib/kinesis-firehose-s3-defaults.js +7 -7
- package/lib/kinesis-streams-defaults.d.ts +2 -2
- package/lib/kinesis-streams-defaults.js +4 -4
- package/lib/kinesis-streams-helper.js +2 -3
- package/lib/kms-defaults.d.ts +2 -2
- package/lib/kms-defaults.js +4 -4
- package/lib/kms-helper.js +2 -4
- package/lib/lambda-event-source-mapping-defaults.d.ts +3 -3
- package/lib/lambda-event-source-mapping-defaults.js +16 -16
- package/lib/mediastore-helper.js +2 -3
- package/lib/opensearch-helper.js +2 -2
- package/lib/override-warning-service.js +9 -6
- package/lib/s3-bucket-helper.js +7 -1
- package/lib/sagemaker-helper.d.ts +5 -0
- package/lib/sagemaker-helper.js +10 -9
- package/lib/secretsmanager-defaults.d.ts +2 -2
- package/lib/secretsmanager-defaults.js +4 -4
- package/lib/secretsmanager-helper.js +2 -3
- package/lib/sns-defaults.d.ts +2 -2
- package/lib/sns-defaults.js +4 -4
- package/lib/sns-helper.js +2 -2
- package/lib/sqs-defaults.js +3 -3
- package/lib/sqs-helper.js +2 -2
- package/lib/step-function-defaults.d.ts +1 -1
- package/lib/step-function-defaults.js +3 -3
- package/lib/utils.d.ts +1 -1
- package/lib/utils.js +14 -12
- package/lib/vpc-helper.js +1 -3
- package/lib/waf-helper.js +2 -3
- package/lib/websocket-api-helper.js +1 -2
- package/package.json +3 -3
- package/test/apigateway-helper.test.js +3 -3
- package/test/cloudfront-distribution-api-gateway-helper.test.js +11 -11
- package/test/dynamo-table.test.js +9 -9
- package/test/glue-job-helper.test.js +7 -7
- package/test/glue-table-helper.test.js +5 -5
- package/test/kinesis-analytics.test.js +2 -2
- package/test/kinesis-streams-defaults.test.js +2 -2
- package/test/lambda-event-source.test.js +10 -10
- package/test/override-warning-service.test.js +25 -26
- package/test/pipes-helper.test.js +2 -2
- package/test/step-function-helper.test.js +5 -5
- package/test/utils.test.js +11 -12
- package/.eslintignore +0 -9
- package/node_modules/ansi-regex/index.d.ts +0 -37
- package/node_modules/ansi-regex/index.js +0 -10
- package/node_modules/ansi-regex/license +0 -9
- package/node_modules/ansi-regex/package.json +0 -55
- package/node_modules/ansi-regex/readme.md +0 -78
- package/node_modules/aproba/LICENSE +0 -14
- package/node_modules/aproba/README.md +0 -94
- package/node_modules/aproba/index.js +0 -105
- package/node_modules/aproba/package.json +0 -35
- package/node_modules/are-we-there-yet/LICENSE.md +0 -18
- package/node_modules/are-we-there-yet/README.md +0 -208
- package/node_modules/are-we-there-yet/lib/index.js +0 -4
- package/node_modules/are-we-there-yet/lib/tracker-base.js +0 -13
- package/node_modules/are-we-there-yet/lib/tracker-group.js +0 -112
- package/node_modules/are-we-there-yet/lib/tracker-stream.js +0 -42
- package/node_modules/are-we-there-yet/lib/tracker.js +0 -34
- package/node_modules/are-we-there-yet/package.json +0 -53
- package/node_modules/color-support/LICENSE +0 -15
- package/node_modules/color-support/README.md +0 -129
- package/node_modules/color-support/bin.js +0 -3
- package/node_modules/color-support/browser.js +0 -14
- package/node_modules/color-support/index.js +0 -134
- package/node_modules/color-support/package.json +0 -36
- package/node_modules/console-control-strings/LICENSE +0 -13
- package/node_modules/console-control-strings/README.md +0 -145
- package/node_modules/console-control-strings/index.js +0 -125
- package/node_modules/console-control-strings/package.json +0 -27
- package/node_modules/deep-diff/.circleci/config.yml +0 -76
- package/node_modules/deep-diff/.eslintrc +0 -72
- package/node_modules/deep-diff/.vscode/launch.json +0 -30
- package/node_modules/deep-diff/.vscode/tasks.json +0 -12
- package/node_modules/deep-diff/ChangeLog.md +0 -63
- package/node_modules/deep-diff/LICENSE +0 -7
- package/node_modules/deep-diff/Readme.md +0 -239
- package/node_modules/deep-diff/dist/deep-diff.min.js +0 -1
- package/node_modules/deep-diff/dist/deep-diff.min.js.map +0 -1
- package/node_modules/deep-diff/examples/apply-diff-from-any.js +0 -39
- package/node_modules/deep-diff/examples/array-change.js +0 -45
- package/node_modules/deep-diff/examples/capture_change_apply_elsewhere.js +0 -53
- package/node_modules/deep-diff/examples/diff-ignoring-fun.js +0 -88
- package/node_modules/deep-diff/examples/diff-scenarios.js +0 -49
- package/node_modules/deep-diff/examples/example1.js +0 -41
- package/node_modules/deep-diff/examples/issue-111.js +0 -6
- package/node_modules/deep-diff/examples/issue-113-1.js +0 -14
- package/node_modules/deep-diff/examples/issue-113-2.js +0 -11
- package/node_modules/deep-diff/examples/issue-115.js +0 -17
- package/node_modules/deep-diff/examples/issue-124.js +0 -8
- package/node_modules/deep-diff/examples/issue-125.js +0 -19
- package/node_modules/deep-diff/examples/issue-126.js +0 -33
- package/node_modules/deep-diff/examples/issue-35.js +0 -11
- package/node_modules/deep-diff/examples/issue-47.js +0 -17
- package/node_modules/deep-diff/examples/issue-48.js +0 -48
- package/node_modules/deep-diff/examples/issue-62.js +0 -14
- package/node_modules/deep-diff/examples/issue-70.js +0 -6
- package/node_modules/deep-diff/examples/issue-71.js +0 -15
- package/node_modules/deep-diff/examples/issue-72.js +0 -21
- package/node_modules/deep-diff/examples/issue-74.js +0 -9
- package/node_modules/deep-diff/examples/issue-78.js +0 -24
- package/node_modules/deep-diff/examples/issue-83.js +0 -11
- package/node_modules/deep-diff/examples/issue-88.js +0 -26
- package/node_modules/deep-diff/examples/performance.js +0 -64
- package/node_modules/deep-diff/examples/practice-data.json +0 -2501
- package/node_modules/deep-diff/index.js +0 -526
- package/node_modules/deep-diff/package.json +0 -74
- package/node_modules/deep-diff/test/.eslintrc +0 -10
- package/node_modules/deep-diff/test/tests.html +0 -34
- package/node_modules/deep-diff/test/tests.js +0 -759
- package/node_modules/deepmerge/.editorconfig +0 -7
- package/node_modules/deepmerge/.eslintcache +0 -1
- package/node_modules/deepmerge/changelog.md +0 -167
- package/node_modules/deepmerge/dist/cjs.js +0 -133
- package/node_modules/deepmerge/dist/umd.js +0 -139
- package/node_modules/deepmerge/index.d.ts +0 -20
- package/node_modules/deepmerge/index.js +0 -106
- package/node_modules/deepmerge/license.txt +0 -21
- package/node_modules/deepmerge/package.json +0 -42
- package/node_modules/deepmerge/readme.md +0 -264
- package/node_modules/deepmerge/rollup.config.js +0 -22
- package/node_modules/emoji-regex/LICENSE-MIT.txt +0 -20
- package/node_modules/emoji-regex/README.md +0 -73
- package/node_modules/emoji-regex/es2015/index.js +0 -6
- package/node_modules/emoji-regex/es2015/text.js +0 -6
- package/node_modules/emoji-regex/index.d.ts +0 -23
- package/node_modules/emoji-regex/index.js +0 -6
- package/node_modules/emoji-regex/package.json +0 -50
- package/node_modules/emoji-regex/text.js +0 -6
- package/node_modules/gauge/LICENSE.md +0 -20
- package/node_modules/gauge/README.md +0 -402
- package/node_modules/gauge/lib/base-theme.js +0 -18
- package/node_modules/gauge/lib/error.js +0 -24
- package/node_modules/gauge/lib/has-color.js +0 -4
- package/node_modules/gauge/lib/index.js +0 -289
- package/node_modules/gauge/lib/plumbing.js +0 -50
- package/node_modules/gauge/lib/process.js +0 -3
- package/node_modules/gauge/lib/progress-bar.js +0 -41
- package/node_modules/gauge/lib/render-template.js +0 -222
- package/node_modules/gauge/lib/set-immediate.js +0 -7
- package/node_modules/gauge/lib/set-interval.js +0 -3
- package/node_modules/gauge/lib/spin.js +0 -5
- package/node_modules/gauge/lib/template-item.js +0 -87
- package/node_modules/gauge/lib/theme-set.js +0 -122
- package/node_modules/gauge/lib/themes.js +0 -56
- package/node_modules/gauge/lib/wide-truncate.js +0 -31
- package/node_modules/gauge/package.json +0 -68
- package/node_modules/has-unicode/LICENSE +0 -14
- package/node_modules/has-unicode/README.md +0 -43
- package/node_modules/has-unicode/index.js +0 -16
- package/node_modules/has-unicode/package.json +0 -30
- package/node_modules/is-fullwidth-code-point/index.d.ts +0 -17
- package/node_modules/is-fullwidth-code-point/index.js +0 -50
- package/node_modules/is-fullwidth-code-point/license +0 -9
- package/node_modules/is-fullwidth-code-point/package.json +0 -42
- package/node_modules/is-fullwidth-code-point/readme.md +0 -39
- package/node_modules/npmlog/LICENSE.md +0 -20
- package/node_modules/npmlog/README.md +0 -216
- package/node_modules/npmlog/lib/log.js +0 -400
- package/node_modules/npmlog/package.json +0 -52
- package/node_modules/set-blocking/LICENSE.txt +0 -14
- package/node_modules/set-blocking/README.md +0 -31
- package/node_modules/set-blocking/index.js +0 -7
- package/node_modules/set-blocking/package.json +0 -42
- package/node_modules/signal-exit/LICENSE.txt +0 -16
- package/node_modules/signal-exit/README.md +0 -74
- package/node_modules/signal-exit/dist/cjs/browser.d.ts +0 -12
- package/node_modules/signal-exit/dist/cjs/browser.d.ts.map +0 -1
- package/node_modules/signal-exit/dist/cjs/browser.js +0 -10
- package/node_modules/signal-exit/dist/cjs/browser.js.map +0 -1
- package/node_modules/signal-exit/dist/cjs/index.d.ts +0 -48
- package/node_modules/signal-exit/dist/cjs/index.d.ts.map +0 -1
- package/node_modules/signal-exit/dist/cjs/index.js +0 -279
- package/node_modules/signal-exit/dist/cjs/index.js.map +0 -1
- package/node_modules/signal-exit/dist/cjs/package.json +0 -3
- package/node_modules/signal-exit/dist/cjs/signals.d.ts +0 -29
- package/node_modules/signal-exit/dist/cjs/signals.d.ts.map +0 -1
- package/node_modules/signal-exit/dist/cjs/signals.js +0 -42
- package/node_modules/signal-exit/dist/cjs/signals.js.map +0 -1
- package/node_modules/signal-exit/dist/mjs/browser.d.ts +0 -12
- package/node_modules/signal-exit/dist/mjs/browser.d.ts.map +0 -1
- package/node_modules/signal-exit/dist/mjs/browser.js +0 -4
- package/node_modules/signal-exit/dist/mjs/browser.js.map +0 -1
- package/node_modules/signal-exit/dist/mjs/index.d.ts +0 -48
- package/node_modules/signal-exit/dist/mjs/index.d.ts.map +0 -1
- package/node_modules/signal-exit/dist/mjs/index.js +0 -275
- package/node_modules/signal-exit/dist/mjs/index.js.map +0 -1
- package/node_modules/signal-exit/dist/mjs/package.json +0 -3
- package/node_modules/signal-exit/dist/mjs/signals.d.ts +0 -29
- package/node_modules/signal-exit/dist/mjs/signals.d.ts.map +0 -1
- package/node_modules/signal-exit/dist/mjs/signals.js +0 -39
- package/node_modules/signal-exit/dist/mjs/signals.js.map +0 -1
- package/node_modules/signal-exit/package.json +0 -106
- package/node_modules/string-width/index.d.ts +0 -29
- package/node_modules/string-width/index.js +0 -47
- package/node_modules/string-width/license +0 -9
- package/node_modules/string-width/package.json +0 -56
- package/node_modules/string-width/readme.md +0 -50
- package/node_modules/strip-ansi/index.d.ts +0 -17
- package/node_modules/strip-ansi/index.js +0 -4
- package/node_modules/strip-ansi/license +0 -9
- package/node_modules/strip-ansi/package.json +0 -54
- package/node_modules/strip-ansi/readme.md +0 -46
- package/node_modules/wide-align/LICENSE +0 -14
- package/node_modules/wide-align/README.md +0 -47
- package/node_modules/wide-align/align.js +0 -65
- package/node_modules/wide-align/package.json +0 -33
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "aproba",
|
|
3
|
-
"version": "2.0.0",
|
|
4
|
-
"description": "A ridiculously light-weight argument validator (now browser friendly)",
|
|
5
|
-
"main": "index.js",
|
|
6
|
-
"directories": {
|
|
7
|
-
"test": "test"
|
|
8
|
-
},
|
|
9
|
-
"dependencies": {},
|
|
10
|
-
"devDependencies": {
|
|
11
|
-
"standard": "^11.0.1",
|
|
12
|
-
"tap": "^12.0.1"
|
|
13
|
-
},
|
|
14
|
-
"files": [
|
|
15
|
-
"index.js"
|
|
16
|
-
],
|
|
17
|
-
"scripts": {
|
|
18
|
-
"pretest": "standard",
|
|
19
|
-
"test": "tap --100 -J test/*.js"
|
|
20
|
-
},
|
|
21
|
-
"repository": {
|
|
22
|
-
"type": "git",
|
|
23
|
-
"url": "https://github.com/iarna/aproba"
|
|
24
|
-
},
|
|
25
|
-
"keywords": [
|
|
26
|
-
"argument",
|
|
27
|
-
"validate"
|
|
28
|
-
],
|
|
29
|
-
"author": "Rebecca Turner <me@re-becca.org>",
|
|
30
|
-
"license": "ISC",
|
|
31
|
-
"bugs": {
|
|
32
|
-
"url": "https://github.com/iarna/aproba/issues"
|
|
33
|
-
},
|
|
34
|
-
"homepage": "https://github.com/iarna/aproba"
|
|
35
|
-
}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
ISC License
|
|
2
|
-
|
|
3
|
-
Copyright npm, Inc.
|
|
4
|
-
|
|
5
|
-
Permission to use, copy, modify, and/or distribute this
|
|
6
|
-
software for any purpose with or without fee is hereby
|
|
7
|
-
granted, provided that the above copyright notice and this
|
|
8
|
-
permission notice appear in all copies.
|
|
9
|
-
|
|
10
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND NPM DISCLAIMS ALL
|
|
11
|
-
WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL
|
|
12
|
-
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO
|
|
13
|
-
EVENT SHALL NPM BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
14
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
15
|
-
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
|
16
|
-
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
|
17
|
-
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE
|
|
18
|
-
USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
@@ -1,208 +0,0 @@
|
|
|
1
|
-
are-we-there-yet
|
|
2
|
-
----------------
|
|
3
|
-
|
|
4
|
-
Track complex hierarchies of asynchronous task completion statuses. This is
|
|
5
|
-
intended to give you a way of recording and reporting the progress of the big
|
|
6
|
-
recursive fan-out and gather type workflows that are so common in async.
|
|
7
|
-
|
|
8
|
-
What you do with this completion data is up to you, but the most common use case is to
|
|
9
|
-
feed it to one of the many progress bar modules.
|
|
10
|
-
|
|
11
|
-
Most progress bar modules include a rudimentary version of this, but my
|
|
12
|
-
needs were more complex.
|
|
13
|
-
|
|
14
|
-
Usage
|
|
15
|
-
=====
|
|
16
|
-
|
|
17
|
-
```javascript
|
|
18
|
-
var TrackerGroup = require("are-we-there-yet").TrackerGroup
|
|
19
|
-
|
|
20
|
-
var top = new TrackerGroup("program")
|
|
21
|
-
|
|
22
|
-
var single = top.newItem("one thing", 100)
|
|
23
|
-
single.completeWork(20)
|
|
24
|
-
|
|
25
|
-
console.log(top.completed()) // 0.2
|
|
26
|
-
|
|
27
|
-
fs.stat("file", function(er, stat) {
|
|
28
|
-
if (er) throw er
|
|
29
|
-
var stream = top.newStream("file", stat.size)
|
|
30
|
-
console.log(top.completed()) // now 0.1 as single is 50% of the job and is 20% complete
|
|
31
|
-
// and 50% * 20% == 10%
|
|
32
|
-
fs.createReadStream("file").pipe(stream).on("data", function (chunk) {
|
|
33
|
-
// do stuff with chunk
|
|
34
|
-
})
|
|
35
|
-
top.on("change", function (name) {
|
|
36
|
-
// called each time a chunk is read from "file"
|
|
37
|
-
// top.completed() will start at 0.1 and fill up to 0.6 as the file is read
|
|
38
|
-
})
|
|
39
|
-
})
|
|
40
|
-
```
|
|
41
|
-
|
|
42
|
-
Shared Methods
|
|
43
|
-
==============
|
|
44
|
-
|
|
45
|
-
* var completed = tracker.completed()
|
|
46
|
-
|
|
47
|
-
Implemented in: `Tracker`, `TrackerGroup`, `TrackerStream`
|
|
48
|
-
|
|
49
|
-
Returns the ratio of completed work to work to be done. Range of 0 to 1.
|
|
50
|
-
|
|
51
|
-
* tracker.finish()
|
|
52
|
-
|
|
53
|
-
Implemented in: `Tracker`, `TrackerGroup`
|
|
54
|
-
|
|
55
|
-
Marks the tracker as completed. With a TrackerGroup this marks all of its
|
|
56
|
-
components as completed.
|
|
57
|
-
|
|
58
|
-
Marks all of the components of this tracker as finished, which in turn means
|
|
59
|
-
that `tracker.completed()` for this will now be 1.
|
|
60
|
-
|
|
61
|
-
This will result in one or more `change` events being emitted.
|
|
62
|
-
|
|
63
|
-
Events
|
|
64
|
-
======
|
|
65
|
-
|
|
66
|
-
All tracker objects emit `change` events with the following arguments:
|
|
67
|
-
|
|
68
|
-
```
|
|
69
|
-
function (name, completed, tracker)
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
`name` is the name of the tracker that originally emitted the event,
|
|
73
|
-
or if it didn't have one, the first containing tracker group that had one.
|
|
74
|
-
|
|
75
|
-
`completed` is the percent complete (as returned by `tracker.completed()` method).
|
|
76
|
-
|
|
77
|
-
`tracker` is the tracker object that you are listening for events on.
|
|
78
|
-
|
|
79
|
-
TrackerGroup
|
|
80
|
-
============
|
|
81
|
-
|
|
82
|
-
* var tracker = new TrackerGroup(**name**)
|
|
83
|
-
|
|
84
|
-
* **name** *(optional)* - The name of this tracker group, used in change
|
|
85
|
-
notifications if the component updating didn't have a name. Defaults to undefined.
|
|
86
|
-
|
|
87
|
-
Creates a new empty tracker aggregation group. These are trackers whose
|
|
88
|
-
completion status is determined by the completion status of other trackers added to this aggregation group.
|
|
89
|
-
|
|
90
|
-
Ex.
|
|
91
|
-
|
|
92
|
-
```javascript
|
|
93
|
-
var tracker = new TrackerGroup("parent")
|
|
94
|
-
var foo = tracker.newItem("firstChild", 100)
|
|
95
|
-
var bar = tracker.newItem("secondChild", 100)
|
|
96
|
-
|
|
97
|
-
foo.finish()
|
|
98
|
-
console.log(tracker.completed()) // 0.5
|
|
99
|
-
bar.finish()
|
|
100
|
-
console.log(tracker.completed()) // 1
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
* tracker.addUnit(**otherTracker**, **weight**)
|
|
104
|
-
|
|
105
|
-
* **otherTracker** - Any of the other are-we-there-yet tracker objects
|
|
106
|
-
* **weight** *(optional)* - The weight to give the tracker, defaults to 1.
|
|
107
|
-
|
|
108
|
-
Adds the **otherTracker** to this aggregation group. The weight determines
|
|
109
|
-
how long you expect this tracker to take to complete in proportion to other
|
|
110
|
-
units. So for instance, if you add one tracker with a weight of 1 and
|
|
111
|
-
another with a weight of 2, you're saying the second will take twice as long
|
|
112
|
-
to complete as the first. As such, the first will account for 33% of the
|
|
113
|
-
completion of this tracker and the second will account for the other 67%.
|
|
114
|
-
|
|
115
|
-
Returns **otherTracker**.
|
|
116
|
-
|
|
117
|
-
* var subGroup = tracker.newGroup(**name**, **weight**)
|
|
118
|
-
|
|
119
|
-
The above is exactly equivalent to:
|
|
120
|
-
|
|
121
|
-
```javascript
|
|
122
|
-
var subGroup = tracker.addUnit(new TrackerGroup(name), weight)
|
|
123
|
-
```
|
|
124
|
-
|
|
125
|
-
* var subItem = tracker.newItem(**name**, **todo**, **weight**)
|
|
126
|
-
|
|
127
|
-
The above is exactly equivalent to:
|
|
128
|
-
|
|
129
|
-
```javascript
|
|
130
|
-
var subItem = tracker.addUnit(new Tracker(name, todo), weight)
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
* var subStream = tracker.newStream(**name**, **todo**, **weight**)
|
|
134
|
-
|
|
135
|
-
The above is exactly equivalent to:
|
|
136
|
-
|
|
137
|
-
```javascript
|
|
138
|
-
var subStream = tracker.addUnit(new TrackerStream(name, todo), weight)
|
|
139
|
-
```
|
|
140
|
-
|
|
141
|
-
* console.log( tracker.debug() )
|
|
142
|
-
|
|
143
|
-
Returns a tree showing the completion of this tracker group and all of its
|
|
144
|
-
children, including recursively entering all of the children.
|
|
145
|
-
|
|
146
|
-
Tracker
|
|
147
|
-
=======
|
|
148
|
-
|
|
149
|
-
* var tracker = new Tracker(**name**, **todo**)
|
|
150
|
-
|
|
151
|
-
* **name** *(optional)* The name of this counter to report in change
|
|
152
|
-
events. Defaults to undefined.
|
|
153
|
-
* **todo** *(optional)* The amount of work todo (a number). Defaults to 0.
|
|
154
|
-
|
|
155
|
-
Ordinarily these are constructed as a part of a tracker group (via
|
|
156
|
-
`newItem`).
|
|
157
|
-
|
|
158
|
-
* var completed = tracker.completed()
|
|
159
|
-
|
|
160
|
-
Returns the ratio of completed work to work to be done. Range of 0 to 1. If
|
|
161
|
-
total work to be done is 0 then it will return 0.
|
|
162
|
-
|
|
163
|
-
* tracker.addWork(**todo**)
|
|
164
|
-
|
|
165
|
-
* **todo** A number to add to the amount of work to be done.
|
|
166
|
-
|
|
167
|
-
Increases the amount of work to be done, thus decreasing the completion
|
|
168
|
-
percentage. Triggers a `change` event.
|
|
169
|
-
|
|
170
|
-
* tracker.completeWork(**completed**)
|
|
171
|
-
|
|
172
|
-
* **completed** A number to add to the work complete
|
|
173
|
-
|
|
174
|
-
Increase the amount of work complete, thus increasing the completion percentage.
|
|
175
|
-
Will never increase the work completed past the amount of work todo. That is,
|
|
176
|
-
percentages > 100% are not allowed. Triggers a `change` event.
|
|
177
|
-
|
|
178
|
-
* tracker.finish()
|
|
179
|
-
|
|
180
|
-
Marks this tracker as finished, tracker.completed() will now be 1. Triggers
|
|
181
|
-
a `change` event.
|
|
182
|
-
|
|
183
|
-
TrackerStream
|
|
184
|
-
=============
|
|
185
|
-
|
|
186
|
-
* var tracker = new TrackerStream(**name**, **size**, **options**)
|
|
187
|
-
|
|
188
|
-
* **name** *(optional)* The name of this counter to report in change
|
|
189
|
-
events. Defaults to undefined.
|
|
190
|
-
* **size** *(optional)* The number of bytes being sent through this stream.
|
|
191
|
-
* **options** *(optional)* A hash of stream options
|
|
192
|
-
|
|
193
|
-
The tracker stream object is a pass through stream that updates an internal
|
|
194
|
-
tracker object each time a block passes through. It's intended to track
|
|
195
|
-
downloads, file extraction and other related activities. You use it by piping
|
|
196
|
-
your data source into it and then using it as your data source.
|
|
197
|
-
|
|
198
|
-
If your data has a length attribute then that's used as the amount of work
|
|
199
|
-
completed when the chunk is passed through. If it does not (eg, object
|
|
200
|
-
streams) then each chunk counts as completing 1 unit of work, so your size
|
|
201
|
-
should be the total number of objects being streamed.
|
|
202
|
-
|
|
203
|
-
* tracker.addWork(**todo**)
|
|
204
|
-
|
|
205
|
-
* **todo** Increase the expected overall size by **todo** bytes.
|
|
206
|
-
|
|
207
|
-
Increases the amount of work to be done, thus decreasing the completion
|
|
208
|
-
percentage. Triggers a `change` event.
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
const TrackerBase = require('./tracker-base.js')
|
|
3
|
-
const Tracker = require('./tracker.js')
|
|
4
|
-
const TrackerStream = require('./tracker-stream.js')
|
|
5
|
-
|
|
6
|
-
class TrackerGroup extends TrackerBase {
|
|
7
|
-
parentGroup = null
|
|
8
|
-
trackers = []
|
|
9
|
-
completion = {}
|
|
10
|
-
weight = {}
|
|
11
|
-
totalWeight = 0
|
|
12
|
-
finished = false
|
|
13
|
-
bubbleChange = bubbleChange(this)
|
|
14
|
-
|
|
15
|
-
nameInTree () {
|
|
16
|
-
var names = []
|
|
17
|
-
var from = this
|
|
18
|
-
while (from) {
|
|
19
|
-
names.unshift(from.name)
|
|
20
|
-
from = from.parentGroup
|
|
21
|
-
}
|
|
22
|
-
return names.join('/')
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
addUnit (unit, weight) {
|
|
26
|
-
if (unit.addUnit) {
|
|
27
|
-
var toTest = this
|
|
28
|
-
while (toTest) {
|
|
29
|
-
if (unit === toTest) {
|
|
30
|
-
throw new Error(
|
|
31
|
-
'Attempted to add tracker group ' +
|
|
32
|
-
unit.name + ' to tree that already includes it ' +
|
|
33
|
-
this.nameInTree(this))
|
|
34
|
-
}
|
|
35
|
-
toTest = toTest.parentGroup
|
|
36
|
-
}
|
|
37
|
-
unit.parentGroup = this
|
|
38
|
-
}
|
|
39
|
-
this.weight[unit.id] = weight || 1
|
|
40
|
-
this.totalWeight += this.weight[unit.id]
|
|
41
|
-
this.trackers.push(unit)
|
|
42
|
-
this.completion[unit.id] = unit.completed()
|
|
43
|
-
unit.on('change', this.bubbleChange)
|
|
44
|
-
if (!this.finished) {
|
|
45
|
-
this.emit('change', unit.name, this.completion[unit.id], unit)
|
|
46
|
-
}
|
|
47
|
-
return unit
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
completed () {
|
|
51
|
-
if (this.trackers.length === 0) {
|
|
52
|
-
return 0
|
|
53
|
-
}
|
|
54
|
-
var valPerWeight = 1 / this.totalWeight
|
|
55
|
-
var completed = 0
|
|
56
|
-
for (var ii = 0; ii < this.trackers.length; ii++) {
|
|
57
|
-
var trackerId = this.trackers[ii].id
|
|
58
|
-
completed +=
|
|
59
|
-
valPerWeight * this.weight[trackerId] * this.completion[trackerId]
|
|
60
|
-
}
|
|
61
|
-
return completed
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
newGroup (name, weight) {
|
|
65
|
-
return this.addUnit(new TrackerGroup(name), weight)
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
newItem (name, todo, weight) {
|
|
69
|
-
return this.addUnit(new Tracker(name, todo), weight)
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
newStream (name, todo, weight) {
|
|
73
|
-
return this.addUnit(new TrackerStream(name, todo), weight)
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
finish () {
|
|
77
|
-
this.finished = true
|
|
78
|
-
if (!this.trackers.length) {
|
|
79
|
-
this.addUnit(new Tracker(), 1, true)
|
|
80
|
-
}
|
|
81
|
-
for (var ii = 0; ii < this.trackers.length; ii++) {
|
|
82
|
-
var tracker = this.trackers[ii]
|
|
83
|
-
tracker.finish()
|
|
84
|
-
tracker.removeListener('change', this.bubbleChange)
|
|
85
|
-
}
|
|
86
|
-
this.emit('change', this.name, 1, this)
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
debug (depth = 0) {
|
|
90
|
-
const indent = ' '.repeat(depth)
|
|
91
|
-
let output = `${indent}${this.name || 'top'}: ${this.completed()}\n`
|
|
92
|
-
|
|
93
|
-
this.trackers.forEach(function (tracker) {
|
|
94
|
-
output += tracker instanceof TrackerGroup
|
|
95
|
-
? tracker.debug(depth + 1)
|
|
96
|
-
: `${indent} ${tracker.name}: ${tracker.completed()}\n`
|
|
97
|
-
})
|
|
98
|
-
return output
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
function bubbleChange (trackerGroup) {
|
|
103
|
-
return function (name, completed, tracker) {
|
|
104
|
-
trackerGroup.completion[tracker.id] = completed
|
|
105
|
-
if (trackerGroup.finished) {
|
|
106
|
-
return
|
|
107
|
-
}
|
|
108
|
-
trackerGroup.emit('change', name || trackerGroup.name, trackerGroup.completed(), trackerGroup)
|
|
109
|
-
}
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
module.exports = TrackerGroup
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
const stream = require('stream')
|
|
3
|
-
const Tracker = require('./tracker.js')
|
|
4
|
-
|
|
5
|
-
class TrackerStream extends stream.Transform {
|
|
6
|
-
constructor (name, size, options) {
|
|
7
|
-
super(options)
|
|
8
|
-
this.tracker = new Tracker(name, size)
|
|
9
|
-
this.name = name
|
|
10
|
-
this.id = this.tracker.id
|
|
11
|
-
this.tracker.on('change', this.trackerChange.bind(this))
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
trackerChange (name, completion) {
|
|
15
|
-
this.emit('change', name, completion, this)
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
_transform (data, encoding, cb) {
|
|
19
|
-
this.tracker.completeWork(data.length ? data.length : 1)
|
|
20
|
-
this.push(data)
|
|
21
|
-
cb()
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
_flush (cb) {
|
|
25
|
-
this.tracker.finish()
|
|
26
|
-
cb()
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
completed () {
|
|
30
|
-
return this.tracker.completed()
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
addWork (work) {
|
|
34
|
-
return this.tracker.addWork(work)
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
finish () {
|
|
38
|
-
return this.tracker.finish()
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
module.exports = TrackerStream
|
|
@@ -1,34 +0,0 @@
|
|
|
1
|
-
'use strict'
|
|
2
|
-
const TrackerBase = require('./tracker-base.js')
|
|
3
|
-
|
|
4
|
-
class Tracker extends TrackerBase {
|
|
5
|
-
constructor (name, todo) {
|
|
6
|
-
super(name)
|
|
7
|
-
this.workDone = 0
|
|
8
|
-
this.workTodo = todo || 0
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
completed () {
|
|
12
|
-
return this.workTodo === 0 ? 0 : this.workDone / this.workTodo
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
addWork (work) {
|
|
16
|
-
this.workTodo += work
|
|
17
|
-
this.emit('change', this.name, this.completed(), this)
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
completeWork (work) {
|
|
21
|
-
this.workDone += work
|
|
22
|
-
if (this.workDone > this.workTodo) {
|
|
23
|
-
this.workDone = this.workTodo
|
|
24
|
-
}
|
|
25
|
-
this.emit('change', this.name, this.completed(), this)
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
finish () {
|
|
29
|
-
this.workTodo = this.workDone = 1
|
|
30
|
-
this.emit('change', this.name, 1, this)
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
module.exports = Tracker
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "are-we-there-yet",
|
|
3
|
-
"version": "4.0.2",
|
|
4
|
-
"description": "Keep track of the overall completion of many disparate processes",
|
|
5
|
-
"main": "lib/index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"test": "tap",
|
|
8
|
-
"lint": "eslint \"**/*.{js,cjs,ts,mjs,jsx,tsx}\"",
|
|
9
|
-
"lintfix": "npm run lint -- --fix",
|
|
10
|
-
"posttest": "npm run lint",
|
|
11
|
-
"postsnap": "npm run lintfix --",
|
|
12
|
-
"snap": "tap",
|
|
13
|
-
"postlint": "template-oss-check",
|
|
14
|
-
"template-oss-apply": "template-oss-apply --force"
|
|
15
|
-
},
|
|
16
|
-
"repository": {
|
|
17
|
-
"type": "git",
|
|
18
|
-
"url": "https://github.com/npm/are-we-there-yet.git"
|
|
19
|
-
},
|
|
20
|
-
"author": "GitHub Inc.",
|
|
21
|
-
"license": "ISC",
|
|
22
|
-
"bugs": {
|
|
23
|
-
"url": "https://github.com/npm/are-we-there-yet/issues"
|
|
24
|
-
},
|
|
25
|
-
"homepage": "https://github.com/npm/are-we-there-yet",
|
|
26
|
-
"devDependencies": {
|
|
27
|
-
"@npmcli/eslint-config": "^4.0.0",
|
|
28
|
-
"@npmcli/template-oss": "4.21.3",
|
|
29
|
-
"tap": "^16.0.1"
|
|
30
|
-
},
|
|
31
|
-
"files": [
|
|
32
|
-
"bin/",
|
|
33
|
-
"lib/"
|
|
34
|
-
],
|
|
35
|
-
"engines": {
|
|
36
|
-
"node": "^14.17.0 || ^16.13.0 || >=18.0.0"
|
|
37
|
-
},
|
|
38
|
-
"tap": {
|
|
39
|
-
"branches": 68,
|
|
40
|
-
"statements": 92,
|
|
41
|
-
"functions": 86,
|
|
42
|
-
"lines": 92,
|
|
43
|
-
"nyc-arg": [
|
|
44
|
-
"--exclude",
|
|
45
|
-
"tap-snapshots/**"
|
|
46
|
-
]
|
|
47
|
-
},
|
|
48
|
-
"templateOSS": {
|
|
49
|
-
"//@npmcli/template-oss": "This file is partially managed by @npmcli/template-oss. Edits may be overwritten.",
|
|
50
|
-
"version": "4.21.3",
|
|
51
|
-
"publish": true
|
|
52
|
-
}
|
|
53
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
The ISC License
|
|
2
|
-
|
|
3
|
-
Copyright (c) Isaac Z. Schlueter and Contributors
|
|
4
|
-
|
|
5
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
-
purpose with or without fee is hereby granted, provided that the above
|
|
7
|
-
copyright notice and this permission notice appear in all copies.
|
|
8
|
-
|
|
9
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
10
|
-
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
11
|
-
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
12
|
-
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
13
|
-
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
14
|
-
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
|
15
|
-
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
@@ -1,129 +0,0 @@
|
|
|
1
|
-
# color-support
|
|
2
|
-
|
|
3
|
-
A module which will endeavor to guess your terminal's level of color
|
|
4
|
-
support.
|
|
5
|
-
|
|
6
|
-
[](https://travis-ci.org/isaacs/color-support) [](https://coveralls.io/github/isaacs/color-support?branch=master)
|
|
7
|
-
|
|
8
|
-
This is similar to `supports-color`, but it does not read
|
|
9
|
-
`process.argv`.
|
|
10
|
-
|
|
11
|
-
1. If not in a node environment, not supported.
|
|
12
|
-
|
|
13
|
-
2. If stdout is not a TTY, not supported, unless the `ignoreTTY`
|
|
14
|
-
option is set.
|
|
15
|
-
|
|
16
|
-
3. If the `TERM` environ is `dumb`, not supported, unless the
|
|
17
|
-
`ignoreDumb` option is set.
|
|
18
|
-
|
|
19
|
-
4. If on Windows, then support 16 colors.
|
|
20
|
-
|
|
21
|
-
5. If using Tmux, then support 256 colors.
|
|
22
|
-
|
|
23
|
-
7. Handle continuous-integration servers. If `CI` or
|
|
24
|
-
`TEAMCITY_VERSION` are set in the environment, and `TRAVIS` is not
|
|
25
|
-
set, then color is not supported, unless `ignoreCI` option is set.
|
|
26
|
-
|
|
27
|
-
6. Guess based on the `TERM_PROGRAM` environ. These terminals support
|
|
28
|
-
16m colors:
|
|
29
|
-
|
|
30
|
-
- `iTerm.app` version 3.x supports 16m colors, below support 256
|
|
31
|
-
- `MacTerm` supports 16m colors
|
|
32
|
-
- `Apple_Terminal` supports 256 colors
|
|
33
|
-
- Have more things that belong on this list? Send a PR!
|
|
34
|
-
|
|
35
|
-
8. Make a guess based on the `TERM` environment variable. Any
|
|
36
|
-
`xterm-256color` will get 256 colors. Any screen, xterm, vt100,
|
|
37
|
-
color, ansi, cygwin, or linux `TERM` will get 16 colors.
|
|
38
|
-
|
|
39
|
-
9. If `COLORTERM` environment variable is set, then support 16 colors.
|
|
40
|
-
|
|
41
|
-
10. At this point, we assume that color is not supported.
|
|
42
|
-
|
|
43
|
-
## USAGE
|
|
44
|
-
|
|
45
|
-
```javascript
|
|
46
|
-
var testColorSupport = require('color-support')
|
|
47
|
-
var colorSupport = testColorSupport(/* options object */)
|
|
48
|
-
|
|
49
|
-
if (!colorSupport) {
|
|
50
|
-
console.log('color is not supported')
|
|
51
|
-
} else if (colorSupport.has16m) {
|
|
52
|
-
console.log('\x1b[38;2;102;194;255m16m colors\x1b[0m')
|
|
53
|
-
} else if (colorSupport.has256) {
|
|
54
|
-
console.log('\x1b[38;5;119m256 colors\x1b[0m')
|
|
55
|
-
} else if (colorSupport.hasBasic) {
|
|
56
|
-
console.log('\x1b[31mbasic colors\x1b[0m')
|
|
57
|
-
} else {
|
|
58
|
-
console.log('this is impossible, but colors are not supported')
|
|
59
|
-
}
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
If you don't have any options to set, you can also just look at the
|
|
63
|
-
flags which will all be set on the test function itself. (Of course,
|
|
64
|
-
this doesn't return a falsey value when colors aren't supported, and
|
|
65
|
-
doesn't allow you to set options.)
|
|
66
|
-
|
|
67
|
-
```javascript
|
|
68
|
-
var colorSupport = require('color-support')
|
|
69
|
-
|
|
70
|
-
if (colorSupport.has16m) {
|
|
71
|
-
console.log('\x1b[38;2;102;194;255m16m colors\x1b[0m')
|
|
72
|
-
} else if (colorSupport.has256) {
|
|
73
|
-
console.log('\x1b[38;5;119m256 colors\x1b[0m')
|
|
74
|
-
} else if (colorSupport.hasBasic) {
|
|
75
|
-
console.log('\x1b[31mbasic colors\x1b[0m')
|
|
76
|
-
} else {
|
|
77
|
-
console.log('colors are not supported')
|
|
78
|
-
}
|
|
79
|
-
```
|
|
80
|
-
|
|
81
|
-
## Options
|
|
82
|
-
|
|
83
|
-
You can pass in the following options.
|
|
84
|
-
|
|
85
|
-
* ignoreTTY - default false. Ignore the `isTTY` check.
|
|
86
|
-
* ignoreDumb - default false. Ignore `TERM=dumb` environ check.
|
|
87
|
-
* ignoreCI - default false. Ignore `CI` environ check.
|
|
88
|
-
* env - Object for environment vars. Defaults to `process.env`.
|
|
89
|
-
* stream - Stream for `isTTY` check. Defaults to `process.stdout`.
|
|
90
|
-
* term - String for `TERM` checking. Defaults to `env.TERM`.
|
|
91
|
-
* alwaysReturn - default false. Return an object when colors aren't
|
|
92
|
-
supported (instead of returning `false`).
|
|
93
|
-
* level - A number from 0 to 3. This will return a result for the
|
|
94
|
-
specified level. This is useful if you want to be able to set the
|
|
95
|
-
color support level explicitly as a number in an environment
|
|
96
|
-
variable or config, but then use the object flags in your program.
|
|
97
|
-
Except for `alwaysReturn` to return an object for level 0, all other
|
|
98
|
-
options are ignored, since no checking is done if a level is
|
|
99
|
-
explicitly set.
|
|
100
|
-
|
|
101
|
-
## Return Value
|
|
102
|
-
|
|
103
|
-
If no color support is available, then `false` is returned by default,
|
|
104
|
-
unless the `alwaysReturn` flag is set to `true`. This is so that the
|
|
105
|
-
simple question of "can I use colors or not" can treat any truthy
|
|
106
|
-
return as "yes".
|
|
107
|
-
|
|
108
|
-
Otherwise, the return object has the following fields:
|
|
109
|
-
|
|
110
|
-
* `level` - A number from 0 to 3
|
|
111
|
-
* `0` - No color support
|
|
112
|
-
* `1` - Basic (16) color support
|
|
113
|
-
* `2` - 256 color support
|
|
114
|
-
* `3` - 16 million (true) color support
|
|
115
|
-
* `hasBasic` - Boolean
|
|
116
|
-
* `has256` - Boolean
|
|
117
|
-
* `has16m` - Boolean
|
|
118
|
-
|
|
119
|
-
## CLI
|
|
120
|
-
|
|
121
|
-
You can run the `color-support` bin from the command line which will
|
|
122
|
-
just dump the values as this module calculates them in whatever env
|
|
123
|
-
it's run. It takes no command line arguments.
|
|
124
|
-
|
|
125
|
-
## Credits
|
|
126
|
-
|
|
127
|
-
This is a spiritual, if not actual, fork of
|
|
128
|
-
[supports-color](http://npm.im/supports-color) by the ever prolific
|
|
129
|
-
[Sindre Sorhus](http://npm.im/~sindresorhus).
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
module.exports = colorSupport({ alwaysReturn: true }, colorSupport)
|
|
2
|
-
|
|
3
|
-
function colorSupport(options, obj) {
|
|
4
|
-
obj = obj || {}
|
|
5
|
-
options = options || {}
|
|
6
|
-
obj.level = 0
|
|
7
|
-
obj.hasBasic = false
|
|
8
|
-
obj.has256 = false
|
|
9
|
-
obj.has16m = false
|
|
10
|
-
if (!options.alwaysReturn) {
|
|
11
|
-
return false
|
|
12
|
-
}
|
|
13
|
-
return obj
|
|
14
|
-
}
|