porffor 0.1.0 → 0.2.0-77e30e8
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/README.md +184 -204
- package/compiler/2c.js +377 -0
- package/compiler/builtins/base64.js +91 -91
- package/compiler/builtins.js +19 -13
- package/compiler/codeGen.js +1313 -418
- package/compiler/decompile.js +35 -9
- package/compiler/embedding.js +9 -5
- package/compiler/encoding.js +8 -2
- package/compiler/index.js +55 -17
- package/compiler/log.js +15 -0
- package/compiler/opt.js +357 -258
- package/compiler/parse.js +24 -1
- package/compiler/prototype.js +263 -56
- package/compiler/sections.js +51 -8
- package/compiler/wasmSpec.js +3 -0
- package/compiler/wrap.js +21 -7
- package/package.json +6 -1
- package/porf.cmd +1 -1
- package/rhemyn/README.md +37 -0
- package/rhemyn/compile.js +214 -0
- package/rhemyn/parse.js +321 -0
- package/rhemyn/test/parse.js +59 -0
- package/runner/index.js +54 -31
- package/runner/info.js +37 -2
- package/runner/profile.js +1 -2
- package/runner/repl.js +13 -11
- package/runner/results.json +1 -0
- package/runner/transform.js +15 -36
- package/runner/version.js +10 -0
- package/CNAME +0 -1
- package/index.html +0 -1264
- package/logo.png +0 -0
- package/sw.js +0 -26
- package/test/array_1.js +0 -8
- package/test/array_push.js +0 -8
- package/test/assignop_1.js +0 -15
- package/test/bitwise_1.js +0 -6
- package/test/bool_1.js +0 -3
- package/test/boolean.js +0 -6
- package/test/break_1.js +0 -6
- package/test/break_2.js +0 -12
- package/test/conditional_1.js +0 -3
- package/test/conditional_2.js +0 -4
- package/test/console_1.js +0 -2
- package/test/continue_1.js +0 -6
- package/test/continue_2.js +0 -10
- package/test/empty.js +0 -1
- package/test/ending_exp_1.js +0 -2
- package/test/ending_exp_2.js +0 -6
- package/test/eq_1.js +0 -4
- package/test/eq_2.js +0 -4
- package/test/eq_3.js +0 -5
- package/test/export_1.js +0 -9
- package/test/factorial.js +0 -3
- package/test/fibonacci.js +0 -16
- package/test/float_div0.js +0 -2
- package/test/float_frac.js +0 -2
- package/test/float_isfinite.js +0 -29
- package/test/float_isinteger.js +0 -13
- package/test/float_isnan.js +0 -20
- package/test/float_issafeinteger.js +0 -11
- package/test/float_large.js +0 -2
- package/test/float_math_funcs.js +0 -24
- package/test/float_math_random.js +0 -6
- package/test/float_nan.js +0 -3
- package/test/float_number_values.js +0 -12
- package/test/for_1.js +0 -4
- package/test/for_2.js +0 -4
- package/test/func_1.js +0 -16
- package/test/func_2.js +0 -6
- package/test/func_3.js +0 -10
- package/test/global_1.js +0 -8
- package/test/global_2.js +0 -10
- package/test/if_1.js +0 -6
- package/test/if_2.js +0 -9
- package/test/if_3.js +0 -7
- package/test/iife_1.js +0 -8
- package/test/iife_2.js +0 -8
- package/test/index.js +0 -93
- package/test/int_number_values.js +0 -6
- package/test/logic_1.js +0 -7
- package/test/logic_2.js +0 -7
- package/test/math_1.js +0 -6
- package/test/math_2.js +0 -12
- package/test/math_3.js +0 -6
- package/test/number_func.js +0 -4
- package/test/return_1.js +0 -8
- package/test/return_2.js +0 -11
- package/test/tailcall_1.js +0 -10
- package/test/throw_1.js +0 -2
- package/test/throw_2.js +0 -4
- package/test/throw_3.js +0 -2
- package/test/throw_4.js +0 -3
- package/test/try_1.js +0 -7
- package/test/unary_1.js +0 -4
- package/test/unary_2.js +0 -5
- package/test/unary_3.js +0 -6
- package/test/unary_4.js +0 -12
- package/test/unary_5.js +0 -8
- package/test/undefined_1.js +0 -8
- package/test/undefined_2.js +0 -10
- package/test/updateexp_1.js +0 -9
- package/test/vars_1.js +0 -5
- package/test/vars_2.js +0 -9
- package/test/while_1.js +0 -6
- package/test262/compare.js +0 -30
- package/test262/index.js +0 -314
- package/test262/node_modules/.bin/esparse +0 -12
- package/test262/node_modules/.bin/esparse.cmd +0 -17
- package/test262/node_modules/.bin/esparse.ps1 +0 -28
- package/test262/node_modules/.bin/esvalidate +0 -12
- package/test262/node_modules/.bin/esvalidate.cmd +0 -17
- package/test262/node_modules/.bin/esvalidate.ps1 +0 -28
- package/test262/node_modules/.bin/js-yaml +0 -12
- package/test262/node_modules/.bin/js-yaml.cmd +0 -17
- package/test262/node_modules/.bin/js-yaml.ps1 +0 -28
- package/test262/node_modules/.package-lock.json +0 -0
- package/test262/node_modules/@nodelib/fs.scandir/LICENSE +0 -21
- package/test262/node_modules/@nodelib/fs.scandir/README.md +0 -171
- package/test262/node_modules/@nodelib/fs.scandir/out/adapters/fs.d.ts +0 -20
- package/test262/node_modules/@nodelib/fs.scandir/out/adapters/fs.js +0 -19
- package/test262/node_modules/@nodelib/fs.scandir/out/constants.d.ts +0 -4
- package/test262/node_modules/@nodelib/fs.scandir/out/constants.js +0 -17
- package/test262/node_modules/@nodelib/fs.scandir/out/index.d.ts +0 -12
- package/test262/node_modules/@nodelib/fs.scandir/out/index.js +0 -26
- package/test262/node_modules/@nodelib/fs.scandir/out/providers/async.d.ts +0 -7
- package/test262/node_modules/@nodelib/fs.scandir/out/providers/async.js +0 -104
- package/test262/node_modules/@nodelib/fs.scandir/out/providers/common.d.ts +0 -1
- package/test262/node_modules/@nodelib/fs.scandir/out/providers/common.js +0 -13
- package/test262/node_modules/@nodelib/fs.scandir/out/providers/sync.d.ts +0 -5
- package/test262/node_modules/@nodelib/fs.scandir/out/providers/sync.js +0 -54
- package/test262/node_modules/@nodelib/fs.scandir/out/settings.d.ts +0 -20
- package/test262/node_modules/@nodelib/fs.scandir/out/settings.js +0 -24
- package/test262/node_modules/@nodelib/fs.scandir/out/types/index.d.ts +0 -20
- package/test262/node_modules/@nodelib/fs.scandir/out/types/index.js +0 -2
- package/test262/node_modules/@nodelib/fs.scandir/out/utils/fs.d.ts +0 -2
- package/test262/node_modules/@nodelib/fs.scandir/out/utils/fs.js +0 -19
- package/test262/node_modules/@nodelib/fs.scandir/out/utils/index.d.ts +0 -2
- package/test262/node_modules/@nodelib/fs.scandir/out/utils/index.js +0 -5
- package/test262/node_modules/@nodelib/fs.scandir/package.json +0 -44
- package/test262/node_modules/@nodelib/fs.stat/LICENSE +0 -21
- package/test262/node_modules/@nodelib/fs.stat/README.md +0 -126
- package/test262/node_modules/@nodelib/fs.stat/out/adapters/fs.d.ts +0 -13
- package/test262/node_modules/@nodelib/fs.stat/out/adapters/fs.js +0 -17
- package/test262/node_modules/@nodelib/fs.stat/out/index.d.ts +0 -12
- package/test262/node_modules/@nodelib/fs.stat/out/index.js +0 -26
- package/test262/node_modules/@nodelib/fs.stat/out/providers/async.d.ts +0 -4
- package/test262/node_modules/@nodelib/fs.stat/out/providers/async.js +0 -36
- package/test262/node_modules/@nodelib/fs.stat/out/providers/sync.d.ts +0 -3
- package/test262/node_modules/@nodelib/fs.stat/out/providers/sync.js +0 -23
- package/test262/node_modules/@nodelib/fs.stat/out/settings.d.ts +0 -16
- package/test262/node_modules/@nodelib/fs.stat/out/settings.js +0 -16
- package/test262/node_modules/@nodelib/fs.stat/out/types/index.d.ts +0 -4
- package/test262/node_modules/@nodelib/fs.stat/out/types/index.js +0 -2
- package/test262/node_modules/@nodelib/fs.stat/package.json +0 -37
- package/test262/node_modules/@nodelib/fs.walk/LICENSE +0 -21
- package/test262/node_modules/@nodelib/fs.walk/README.md +0 -215
- package/test262/node_modules/@nodelib/fs.walk/out/index.d.ts +0 -14
- package/test262/node_modules/@nodelib/fs.walk/out/index.js +0 -34
- package/test262/node_modules/@nodelib/fs.walk/out/providers/async.d.ts +0 -12
- package/test262/node_modules/@nodelib/fs.walk/out/providers/async.js +0 -30
- package/test262/node_modules/@nodelib/fs.walk/out/providers/index.d.ts +0 -4
- package/test262/node_modules/@nodelib/fs.walk/out/providers/index.js +0 -9
- package/test262/node_modules/@nodelib/fs.walk/out/providers/stream.d.ts +0 -12
- package/test262/node_modules/@nodelib/fs.walk/out/providers/stream.js +0 -34
- package/test262/node_modules/@nodelib/fs.walk/out/providers/sync.d.ts +0 -10
- package/test262/node_modules/@nodelib/fs.walk/out/providers/sync.js +0 -14
- package/test262/node_modules/@nodelib/fs.walk/out/readers/async.d.ts +0 -30
- package/test262/node_modules/@nodelib/fs.walk/out/readers/async.js +0 -97
- package/test262/node_modules/@nodelib/fs.walk/out/readers/common.d.ts +0 -7
- package/test262/node_modules/@nodelib/fs.walk/out/readers/common.js +0 -31
- package/test262/node_modules/@nodelib/fs.walk/out/readers/reader.d.ts +0 -6
- package/test262/node_modules/@nodelib/fs.walk/out/readers/reader.js +0 -11
- package/test262/node_modules/@nodelib/fs.walk/out/readers/sync.d.ts +0 -15
- package/test262/node_modules/@nodelib/fs.walk/out/readers/sync.js +0 -59
- package/test262/node_modules/@nodelib/fs.walk/out/settings.d.ts +0 -30
- package/test262/node_modules/@nodelib/fs.walk/out/settings.js +0 -26
- package/test262/node_modules/@nodelib/fs.walk/out/types/index.d.ts +0 -8
- package/test262/node_modules/@nodelib/fs.walk/out/types/index.js +0 -2
- package/test262/node_modules/@nodelib/fs.walk/package.json +0 -44
- package/test262/node_modules/argparse/CHANGELOG.md +0 -185
- package/test262/node_modules/argparse/LICENSE +0 -21
- package/test262/node_modules/argparse/README.md +0 -257
- package/test262/node_modules/argparse/index.js +0 -3
- package/test262/node_modules/argparse/lib/action/append/constant.js +0 -47
- package/test262/node_modules/argparse/lib/action/append.js +0 -53
- package/test262/node_modules/argparse/lib/action/count.js +0 -40
- package/test262/node_modules/argparse/lib/action/help.js +0 -47
- package/test262/node_modules/argparse/lib/action/store/constant.js +0 -43
- package/test262/node_modules/argparse/lib/action/store/false.js +0 -27
- package/test262/node_modules/argparse/lib/action/store/true.js +0 -26
- package/test262/node_modules/argparse/lib/action/store.js +0 -50
- package/test262/node_modules/argparse/lib/action/subparsers.js +0 -149
- package/test262/node_modules/argparse/lib/action/version.js +0 -47
- package/test262/node_modules/argparse/lib/action.js +0 -146
- package/test262/node_modules/argparse/lib/action_container.js +0 -482
- package/test262/node_modules/argparse/lib/argparse.js +0 -14
- package/test262/node_modules/argparse/lib/argument/error.js +0 -50
- package/test262/node_modules/argparse/lib/argument/exclusive.js +0 -54
- package/test262/node_modules/argparse/lib/argument/group.js +0 -75
- package/test262/node_modules/argparse/lib/argument_parser.js +0 -1161
- package/test262/node_modules/argparse/lib/const.js +0 -21
- package/test262/node_modules/argparse/lib/help/added_formatters.js +0 -87
- package/test262/node_modules/argparse/lib/help/formatter.js +0 -795
- package/test262/node_modules/argparse/lib/namespace.js +0 -76
- package/test262/node_modules/argparse/lib/utils.js +0 -57
- package/test262/node_modules/argparse/package.json +0 -34
- package/test262/node_modules/braces/CHANGELOG.md +0 -184
- package/test262/node_modules/braces/LICENSE +0 -21
- package/test262/node_modules/braces/README.md +0 -593
- package/test262/node_modules/braces/index.js +0 -170
- package/test262/node_modules/braces/lib/compile.js +0 -57
- package/test262/node_modules/braces/lib/constants.js +0 -57
- package/test262/node_modules/braces/lib/expand.js +0 -113
- package/test262/node_modules/braces/lib/parse.js +0 -333
- package/test262/node_modules/braces/lib/stringify.js +0 -32
- package/test262/node_modules/braces/lib/utils.js +0 -112
- package/test262/node_modules/braces/package.json +0 -77
- package/test262/node_modules/esprima/ChangeLog +0 -235
- package/test262/node_modules/esprima/LICENSE.BSD +0 -21
- package/test262/node_modules/esprima/README.md +0 -46
- package/test262/node_modules/esprima/bin/esparse.js +0 -139
- package/test262/node_modules/esprima/bin/esvalidate.js +0 -236
- package/test262/node_modules/esprima/dist/esprima.js +0 -6709
- package/test262/node_modules/esprima/package.json +0 -112
- package/test262/node_modules/fast-glob/LICENSE +0 -21
- package/test262/node_modules/fast-glob/README.md +0 -859
- package/test262/node_modules/fast-glob/out/index.d.ts +0 -40
- package/test262/node_modules/fast-glob/out/index.js +0 -102
- package/test262/node_modules/fast-glob/out/managers/tasks.d.ts +0 -22
- package/test262/node_modules/fast-glob/out/managers/tasks.js +0 -110
- package/test262/node_modules/fast-glob/out/providers/async.d.ts +0 -9
- package/test262/node_modules/fast-glob/out/providers/async.js +0 -23
- package/test262/node_modules/fast-glob/out/providers/filters/deep.d.ts +0 -16
- package/test262/node_modules/fast-glob/out/providers/filters/deep.js +0 -62
- package/test262/node_modules/fast-glob/out/providers/filters/entry.d.ts +0 -16
- package/test262/node_modules/fast-glob/out/providers/filters/entry.js +0 -63
- package/test262/node_modules/fast-glob/out/providers/filters/error.d.ts +0 -8
- package/test262/node_modules/fast-glob/out/providers/filters/error.js +0 -15
- package/test262/node_modules/fast-glob/out/providers/matchers/matcher.d.ts +0 -33
- package/test262/node_modules/fast-glob/out/providers/matchers/matcher.js +0 -45
- package/test262/node_modules/fast-glob/out/providers/matchers/partial.d.ts +0 -4
- package/test262/node_modules/fast-glob/out/providers/matchers/partial.js +0 -38
- package/test262/node_modules/fast-glob/out/providers/provider.d.ts +0 -19
- package/test262/node_modules/fast-glob/out/providers/provider.js +0 -48
- package/test262/node_modules/fast-glob/out/providers/stream.d.ts +0 -11
- package/test262/node_modules/fast-glob/out/providers/stream.js +0 -31
- package/test262/node_modules/fast-glob/out/providers/sync.d.ts +0 -9
- package/test262/node_modules/fast-glob/out/providers/sync.js +0 -23
- package/test262/node_modules/fast-glob/out/providers/transformers/entry.d.ts +0 -8
- package/test262/node_modules/fast-glob/out/providers/transformers/entry.js +0 -26
- package/test262/node_modules/fast-glob/out/readers/async.d.ts +0 -10
- package/test262/node_modules/fast-glob/out/readers/async.js +0 -35
- package/test262/node_modules/fast-glob/out/readers/reader.d.ts +0 -15
- package/test262/node_modules/fast-glob/out/readers/reader.js +0 -33
- package/test262/node_modules/fast-glob/out/readers/stream.d.ts +0 -14
- package/test262/node_modules/fast-glob/out/readers/stream.js +0 -55
- package/test262/node_modules/fast-glob/out/readers/sync.d.ts +0 -12
- package/test262/node_modules/fast-glob/out/readers/sync.js +0 -43
- package/test262/node_modules/fast-glob/out/settings.d.ts +0 -164
- package/test262/node_modules/fast-glob/out/settings.js +0 -57
- package/test262/node_modules/fast-glob/out/types/index.d.ts +0 -31
- package/test262/node_modules/fast-glob/out/types/index.js +0 -2
- package/test262/node_modules/fast-glob/out/utils/array.d.ts +0 -2
- package/test262/node_modules/fast-glob/out/utils/array.js +0 -22
- package/test262/node_modules/fast-glob/out/utils/errno.d.ts +0 -2
- package/test262/node_modules/fast-glob/out/utils/errno.js +0 -7
- package/test262/node_modules/fast-glob/out/utils/fs.d.ts +0 -4
- package/test262/node_modules/fast-glob/out/utils/fs.js +0 -19
- package/test262/node_modules/fast-glob/out/utils/index.d.ts +0 -8
- package/test262/node_modules/fast-glob/out/utils/index.js +0 -17
- package/test262/node_modules/fast-glob/out/utils/path.d.ts +0 -13
- package/test262/node_modules/fast-glob/out/utils/path.js +0 -68
- package/test262/node_modules/fast-glob/out/utils/pattern.d.ts +0 -47
- package/test262/node_modules/fast-glob/out/utils/pattern.js +0 -188
- package/test262/node_modules/fast-glob/out/utils/stream.d.ts +0 -4
- package/test262/node_modules/fast-glob/out/utils/stream.js +0 -17
- package/test262/node_modules/fast-glob/out/utils/string.d.ts +0 -2
- package/test262/node_modules/fast-glob/out/utils/string.js +0 -11
- package/test262/node_modules/fast-glob/package.json +0 -81
- package/test262/node_modules/fastq/.github/dependabot.yml +0 -11
- package/test262/node_modules/fastq/.github/workflows/ci.yml +0 -50
- package/test262/node_modules/fastq/LICENSE +0 -13
- package/test262/node_modules/fastq/README.md +0 -309
- package/test262/node_modules/fastq/bench.js +0 -66
- package/test262/node_modules/fastq/example.js +0 -14
- package/test262/node_modules/fastq/example.mjs +0 -11
- package/test262/node_modules/fastq/index.d.ts +0 -37
- package/test262/node_modules/fastq/package.json +0 -52
- package/test262/node_modules/fastq/queue.js +0 -289
- package/test262/node_modules/fastq/test/example.ts +0 -81
- package/test262/node_modules/fastq/test/promise.js +0 -248
- package/test262/node_modules/fastq/test/test.js +0 -566
- package/test262/node_modules/fastq/test/tsconfig.json +0 -11
- package/test262/node_modules/fill-range/LICENSE +0 -21
- package/test262/node_modules/fill-range/README.md +0 -237
- package/test262/node_modules/fill-range/index.js +0 -249
- package/test262/node_modules/fill-range/package.json +0 -69
- package/test262/node_modules/glob-parent/CHANGELOG.md +0 -110
- package/test262/node_modules/glob-parent/LICENSE +0 -15
- package/test262/node_modules/glob-parent/README.md +0 -137
- package/test262/node_modules/glob-parent/index.js +0 -42
- package/test262/node_modules/glob-parent/package.json +0 -48
- package/test262/node_modules/graceful-fs/LICENSE +0 -15
- package/test262/node_modules/graceful-fs/README.md +0 -143
- package/test262/node_modules/graceful-fs/clone.js +0 -23
- package/test262/node_modules/graceful-fs/graceful-fs.js +0 -448
- package/test262/node_modules/graceful-fs/legacy-streams.js +0 -118
- package/test262/node_modules/graceful-fs/package.json +0 -53
- package/test262/node_modules/graceful-fs/polyfills.js +0 -355
- package/test262/node_modules/is-extglob/LICENSE +0 -21
- package/test262/node_modules/is-extglob/README.md +0 -107
- package/test262/node_modules/is-extglob/index.js +0 -20
- package/test262/node_modules/is-extglob/package.json +0 -69
- package/test262/node_modules/is-glob/LICENSE +0 -21
- package/test262/node_modules/is-glob/README.md +0 -206
- package/test262/node_modules/is-glob/index.js +0 -150
- package/test262/node_modules/is-glob/package.json +0 -81
- package/test262/node_modules/is-number/LICENSE +0 -21
- package/test262/node_modules/is-number/README.md +0 -187
- package/test262/node_modules/is-number/index.js +0 -18
- package/test262/node_modules/is-number/package.json +0 -82
- package/test262/node_modules/js-yaml/CHANGELOG.md +0 -557
- package/test262/node_modules/js-yaml/LICENSE +0 -21
- package/test262/node_modules/js-yaml/README.md +0 -299
- package/test262/node_modules/js-yaml/bin/js-yaml.js +0 -132
- package/test262/node_modules/js-yaml/dist/js-yaml.js +0 -3989
- package/test262/node_modules/js-yaml/dist/js-yaml.min.js +0 -1
- package/test262/node_modules/js-yaml/index.js +0 -7
- package/test262/node_modules/js-yaml/lib/js-yaml/common.js +0 -59
- package/test262/node_modules/js-yaml/lib/js-yaml/dumper.js +0 -850
- package/test262/node_modules/js-yaml/lib/js-yaml/exception.js +0 -43
- package/test262/node_modules/js-yaml/lib/js-yaml/loader.js +0 -1644
- package/test262/node_modules/js-yaml/lib/js-yaml/mark.js +0 -76
- package/test262/node_modules/js-yaml/lib/js-yaml/schema/core.js +0 -18
- package/test262/node_modules/js-yaml/lib/js-yaml/schema/default_full.js +0 -25
- package/test262/node_modules/js-yaml/lib/js-yaml/schema/default_safe.js +0 -28
- package/test262/node_modules/js-yaml/lib/js-yaml/schema/failsafe.js +0 -17
- package/test262/node_modules/js-yaml/lib/js-yaml/schema/json.js +0 -25
- package/test262/node_modules/js-yaml/lib/js-yaml/schema.js +0 -108
- package/test262/node_modules/js-yaml/lib/js-yaml/type/binary.js +0 -138
- package/test262/node_modules/js-yaml/lib/js-yaml/type/bool.js +0 -35
- package/test262/node_modules/js-yaml/lib/js-yaml/type/float.js +0 -116
- package/test262/node_modules/js-yaml/lib/js-yaml/type/int.js +0 -173
- package/test262/node_modules/js-yaml/lib/js-yaml/type/js/function.js +0 -93
- package/test262/node_modules/js-yaml/lib/js-yaml/type/js/regexp.js +0 -60
- package/test262/node_modules/js-yaml/lib/js-yaml/type/js/undefined.js +0 -28
- package/test262/node_modules/js-yaml/lib/js-yaml/type/map.js +0 -8
- package/test262/node_modules/js-yaml/lib/js-yaml/type/merge.js +0 -12
- package/test262/node_modules/js-yaml/lib/js-yaml/type/null.js +0 -34
- package/test262/node_modules/js-yaml/lib/js-yaml/type/omap.js +0 -44
- package/test262/node_modules/js-yaml/lib/js-yaml/type/pairs.js +0 -53
- package/test262/node_modules/js-yaml/lib/js-yaml/type/seq.js +0 -8
- package/test262/node_modules/js-yaml/lib/js-yaml/type/set.js +0 -29
- package/test262/node_modules/js-yaml/lib/js-yaml/type/str.js +0 -8
- package/test262/node_modules/js-yaml/lib/js-yaml/type/timestamp.js +0 -88
- package/test262/node_modules/js-yaml/lib/js-yaml/type.js +0 -61
- package/test262/node_modules/js-yaml/lib/js-yaml.js +0 -39
- package/test262/node_modules/js-yaml/package.json +0 -49
- package/test262/node_modules/klaw/CHANGELOG.md +0 -62
- package/test262/node_modules/klaw/LICENSE +0 -15
- package/test262/node_modules/klaw/README.md +0 -252
- package/test262/node_modules/klaw/package.json +0 -40
- package/test262/node_modules/klaw/src/index.js +0 -56
- package/test262/node_modules/merge2/LICENSE +0 -21
- package/test262/node_modules/merge2/README.md +0 -144
- package/test262/node_modules/merge2/index.js +0 -144
- package/test262/node_modules/merge2/package.json +0 -43
- package/test262/node_modules/micromatch/LICENSE +0 -21
- package/test262/node_modules/micromatch/README.md +0 -1011
- package/test262/node_modules/micromatch/index.js +0 -467
- package/test262/node_modules/micromatch/package.json +0 -119
- package/test262/node_modules/picomatch/CHANGELOG.md +0 -136
- package/test262/node_modules/picomatch/LICENSE +0 -21
- package/test262/node_modules/picomatch/README.md +0 -708
- package/test262/node_modules/picomatch/index.js +0 -3
- package/test262/node_modules/picomatch/lib/constants.js +0 -179
- package/test262/node_modules/picomatch/lib/parse.js +0 -1091
- package/test262/node_modules/picomatch/lib/picomatch.js +0 -342
- package/test262/node_modules/picomatch/lib/scan.js +0 -391
- package/test262/node_modules/picomatch/lib/utils.js +0 -64
- package/test262/node_modules/picomatch/package.json +0 -81
- package/test262/node_modules/queue-microtask/LICENSE +0 -20
- package/test262/node_modules/queue-microtask/README.md +0 -90
- package/test262/node_modules/queue-microtask/index.d.ts +0 -2
- package/test262/node_modules/queue-microtask/index.js +0 -9
- package/test262/node_modules/queue-microtask/package.json +0 -55
- package/test262/node_modules/reusify/.coveralls.yml +0 -1
- package/test262/node_modules/reusify/.travis.yml +0 -28
- package/test262/node_modules/reusify/LICENSE +0 -22
- package/test262/node_modules/reusify/README.md +0 -145
- package/test262/node_modules/reusify/benchmarks/createNoCodeFunction.js +0 -30
- package/test262/node_modules/reusify/benchmarks/fib.js +0 -13
- package/test262/node_modules/reusify/benchmarks/reuseNoCodeFunction.js +0 -38
- package/test262/node_modules/reusify/package.json +0 -45
- package/test262/node_modules/reusify/reusify.js +0 -33
- package/test262/node_modules/reusify/test.js +0 -66
- package/test262/node_modules/run-parallel/LICENSE +0 -20
- package/test262/node_modules/run-parallel/README.md +0 -85
- package/test262/node_modules/run-parallel/index.js +0 -51
- package/test262/node_modules/run-parallel/package.json +0 -58
- package/test262/node_modules/sprintf-js/LICENSE +0 -24
- package/test262/node_modules/sprintf-js/README.md +0 -88
- package/test262/node_modules/sprintf-js/bower.json +0 -14
- package/test262/node_modules/sprintf-js/demo/angular.html +0 -20
- package/test262/node_modules/sprintf-js/dist/angular-sprintf.min.js +0 -4
- package/test262/node_modules/sprintf-js/dist/angular-sprintf.min.js.map +0 -1
- package/test262/node_modules/sprintf-js/dist/angular-sprintf.min.map +0 -1
- package/test262/node_modules/sprintf-js/dist/sprintf.min.js +0 -4
- package/test262/node_modules/sprintf-js/dist/sprintf.min.js.map +0 -1
- package/test262/node_modules/sprintf-js/dist/sprintf.min.map +0 -1
- package/test262/node_modules/sprintf-js/gruntfile.js +0 -36
- package/test262/node_modules/sprintf-js/package.json +0 -22
- package/test262/node_modules/sprintf-js/src/angular-sprintf.js +0 -18
- package/test262/node_modules/sprintf-js/src/sprintf.js +0 -208
- package/test262/node_modules/sprintf-js/test/test.js +0 -82
- package/test262/node_modules/test262-stream/.jshintignore +0 -2
- package/test262/node_modules/test262-stream/.jshintrc +0 -6
- package/test262/node_modules/test262-stream/.travis.yml +0 -5
- package/test262/node_modules/test262-stream/CONTRIBUTING.md +0 -37
- package/test262/node_modules/test262-stream/LICENSE-MICROSOFT.txt +0 -27
- package/test262/node_modules/test262-stream/LICENSE.txt +0 -27
- package/test262/node_modules/test262-stream/README.md +0 -71
- package/test262/node_modules/test262-stream/lib/builder.js +0 -46
- package/test262/node_modules/test262-stream/lib/compile.js +0 -24
- package/test262/node_modules/test262-stream/lib/create-scenarios.js +0 -29
- package/test262/node_modules/test262-stream/lib/index.js +0 -187
- package/test262/node_modules/test262-stream/lib/test-file.js +0 -150
- package/test262/node_modules/test262-stream/package.json +0 -26
- package/test262/node_modules/test262-stream/test/collateral/invalid-missing-harness/fake-test262/test/a-test-file.js +0 -16
- package/test262/node_modules/test262-stream/test/collateral/invalid-version-other-accepted/fake-test262/harness/assert.js +0 -17
- package/test262/node_modules/test262-stream/test/collateral/invalid-version-other-accepted/fake-test262/harness/doneprintHandle.js +0 -6
- package/test262/node_modules/test262-stream/test/collateral/invalid-version-other-accepted/fake-test262/harness/sta.js +0 -12
- package/test262/node_modules/test262-stream/test/collateral/invalid-version-other-accepted/fake-test262/package.json +0 -3
- package/test262/node_modules/test262-stream/test/collateral/invalid-version-other-accepted/fake-test262/test/strict.js +0 -9
- package/test262/node_modules/test262-stream/test/collateral/invalid-version-unsupported/fake-test262/harness/assert.js +0 -17
- package/test262/node_modules/test262-stream/test/collateral/invalid-version-unsupported/fake-test262/harness/doneprintHandle.js +0 -6
- package/test262/node_modules/test262-stream/test/collateral/invalid-version-unsupported/fake-test262/harness/sta.js +0 -12
- package/test262/node_modules/test262-stream/test/collateral/invalid-version-unsupported/fake-test262/package.json +0 -3
- package/test262/node_modules/test262-stream/test/collateral/invalid-version-unsupported/fake-test262/test/strict.js +0 -9
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/asyncNegative_default.js +0 -49
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/asyncNegative_strict_mode.js +0 -50
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/async_default.js +0 -48
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/async_strict_mode.js +0 -49
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/bothStrict_default.js +0 -46
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/bothStrict_strict_mode.js +0 -47
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/error_default.js +0 -39
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/error_strict_mode.js +0 -40
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/module_default.js +0 -37
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/module_strict_mode.js +0 -38
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/negative-empty_default.js +0 -37
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/negative-empty_strict_mode.js +0 -38
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/noStrict_default.js +0 -36
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/rawNoStrict_default.js +0 -14
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/rawStrict_default.js +0 -15
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-content/test/strict_strict_mode.js +0 -41
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/asyncNegative_default.json +0 -22
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/asyncNegative_strict_mode.json +0 -22
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/async_default.json +0 -18
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/async_strict_mode.json +0 -18
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/bothStrict_default.json +0 -24
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/bothStrict_strict_mode.json +0 -24
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/error_default.json +0 -19
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/error_strict_mode.json +0 -19
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/module_default.json +0 -17
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/module_strict_mode.json +0 -17
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/negative-empty_default.json +0 -19
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/negative-empty_strict_mode.json +0 -19
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/noStrict_default.json +0 -17
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/rawNoStrict_default.json +0 -14
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/rawStrict_default.json +0 -14
- package/test262/node_modules/test262-stream/test/collateral/valid-default/expected-metadata/test/strict_strict_mode.json +0 -21
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/harness/assert.js +0 -17
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/harness/doneprintHandle.js +0 -6
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/harness/sta.js +0 -12
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/async.js +0 -10
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/asyncNegative.js +0 -11
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/bothStrict.js +0 -15
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/error.js +0 -8
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/module.js +0 -6
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/module_FIXTURE.js +0 -2
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/negative-empty.js +0 -6
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/noStrict.js +0 -5
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/rawNoStrict.js +0 -14
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/rawStrict.js +0 -15
- package/test262/node_modules/test262-stream/test/collateral/valid-default/fake-test262/test/strict.js +0 -9
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/expected-content/test/bothStrict_default.js +0 -46
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/expected-content/test/bothStrict_strict_mode.js +0 -47
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/expected-metadata/test/bothStrict_default.json +0 -24
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/expected-metadata/test/bothStrict_strict_mode.json +0 -24
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/harness/assert.js +0 -17
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/harness/doneprintHandle.js +0 -6
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/harness/sta.js +0 -12
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/bothStrict.js +0 -15
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/zzz-0_FIXTURE.js +0 -2
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/zzz-1_FIXTURE.js +0 -2
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/zzz-2_FIXTURE.js +0 -2
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/zzz-3_FIXTURE.js +0 -2
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/zzz-4_FIXTURE.js +0 -2
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/zzz-5_FIXTURE.js +0 -2
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/zzz-6_FIXTURE.js +0 -2
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/zzz-7_FIXTURE.js +0 -2
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/zzz-8_FIXTURE.js +0 -2
- package/test262/node_modules/test262-stream/test/collateral/valid-extra-files/fake-test262/test/zzz-9_FIXTURE.txt +0 -2
- package/test262/node_modules/test262-stream/test/collateral/valid-insertionindex-with-copyright/expected-content/test/raw_default.js +0 -15
- package/test262/node_modules/test262-stream/test/collateral/valid-insertionindex-with-copyright/expected-content/test/runtime_default.js +0 -38
- package/test262/node_modules/test262-stream/test/collateral/valid-insertionindex-with-copyright/expected-content/test/runtime_strict_mode.js +0 -39
- package/test262/node_modules/test262-stream/test/collateral/valid-insertionindex-with-copyright/expected-metadata/test/raw_default.json +0 -14
- package/test262/node_modules/test262-stream/test/collateral/valid-insertionindex-with-copyright/expected-metadata/test/runtime_default.json +0 -15
- package/test262/node_modules/test262-stream/test/collateral/valid-insertionindex-with-copyright/expected-metadata/test/runtime_strict_mode.json +0 -15
- package/test262/node_modules/test262-stream/test/collateral/valid-insertionindex-with-copyright/fake-test262/harness/assert.js +0 -17
- package/test262/node_modules/test262-stream/test/collateral/valid-insertionindex-with-copyright/fake-test262/harness/sta.js +0 -12
- package/test262/node_modules/test262-stream/test/collateral/valid-insertionindex-with-copyright/fake-test262/test/raw.js +0 -15
- package/test262/node_modules/test262-stream/test/collateral/valid-insertionindex-with-copyright/fake-test262/test/runtime.js +0 -7
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/asyncNegative_default.js +0 -11
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/asyncNegative_strict_mode.js +0 -12
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/async_default.js +0 -10
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/async_strict_mode.js +0 -11
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/bothStrict_default.js +0 -15
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/bothStrict_strict_mode.js +0 -16
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/error_default.js +0 -8
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/error_strict_mode.js +0 -9
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/module_default.js +0 -6
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/module_strict_mode.js +0 -7
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/negative-empty_default.js +0 -6
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/negative-empty_strict_mode.js +0 -7
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/noStrict_default.js +0 -5
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/rawNoStrict_default.js +0 -14
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/rawStrict_default.js +0 -15
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-content/test/strict_strict_mode.js +0 -10
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/asyncNegative_default.json +0 -18
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/asyncNegative_strict_mode.json +0 -18
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/async_default.json +0 -14
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/async_strict_mode.json +0 -14
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/bothStrict_default.json +0 -21
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/bothStrict_strict_mode.json +0 -21
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/error_default.json +0 -16
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/error_strict_mode.json +0 -16
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/module_default.json +0 -14
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/module_strict_mode.json +0 -14
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/negative-empty_default.json +0 -16
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/negative-empty_strict_mode.json +0 -16
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/noStrict_default.json +0 -14
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/rawNoStrict_default.json +0 -14
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/rawStrict_default.json +0 -14
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/expected-metadata/test/strict_strict_mode.json +0 -18
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/harness/assert.js +0 -17
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/harness/doneprintHandle.js +0 -6
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/harness/sta.js +0 -12
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/async.js +0 -10
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/asyncNegative.js +0 -11
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/bothStrict.js +0 -15
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/error.js +0 -8
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/module.js +0 -6
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/module_FIXTURE.js +0 -2
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/negative-empty.js +0 -6
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/noStrict.js +0 -5
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/rawNoStrict.js +0 -14
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/rawStrict.js +0 -15
- package/test262/node_modules/test262-stream/test/collateral/valid-omit-runtime/fake-test262/test/strict.js +0 -9
- package/test262/node_modules/test262-stream/test/collateral/valid-version-ignored/expected-content/test/strict_strict_mode.js +0 -41
- package/test262/node_modules/test262-stream/test/collateral/valid-version-ignored/expected-metadata/test/strict_strict_mode.json +0 -21
- package/test262/node_modules/test262-stream/test/collateral/valid-version-ignored/fake-test262/harness/assert.js +0 -17
- package/test262/node_modules/test262-stream/test/collateral/valid-version-ignored/fake-test262/harness/doneprintHandle.js +0 -6
- package/test262/node_modules/test262-stream/test/collateral/valid-version-ignored/fake-test262/harness/sta.js +0 -12
- package/test262/node_modules/test262-stream/test/collateral/valid-version-ignored/fake-test262/package.json +0 -3
- package/test262/node_modules/test262-stream/test/collateral/valid-version-ignored/fake-test262/test/strict.js +0 -9
- package/test262/node_modules/test262-stream/test/collateral/valid-version-supported/expected-content/test/strict_strict_mode.js +0 -41
- package/test262/node_modules/test262-stream/test/collateral/valid-version-supported/expected-metadata/test/strict_strict_mode.json +0 -21
- package/test262/node_modules/test262-stream/test/collateral/valid-version-supported/fake-test262/harness/assert.js +0 -17
- package/test262/node_modules/test262-stream/test/collateral/valid-version-supported/fake-test262/harness/doneprintHandle.js +0 -6
- package/test262/node_modules/test262-stream/test/collateral/valid-version-supported/fake-test262/harness/sta.js +0 -12
- package/test262/node_modules/test262-stream/test/collateral/valid-version-supported/fake-test262/package.json +0 -3
- package/test262/node_modules/test262-stream/test/collateral/valid-version-supported/fake-test262/test/strict.js +0 -9
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-content/test/missing-raw-flag_default.js +0 -44
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-content/test/missing-raw-flag_strict_mode.js +0 -45
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-content/test/raw-with-ls-and-license-on-same-line_default.js +0 -20
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-content/test/raw-with-ls-multiline-block_default.js +0 -18
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-content/test/raw-with-ls_default.js +0 -17
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-content/test/raw-with-ps-and-license-on-same-line_default.js +0 -20
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-content/test/raw-with-ps-multiline-block_default.js +0 -18
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-content/test/raw-with-ps_default.js +0 -17
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-content/test/rawWithLicense_default.js +0 -21
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-content/test/raw_default.js +0 -17
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-metadata/test/missing-raw-flag_default.json +0 -22
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-metadata/test/missing-raw-flag_strict_mode.json +0 -22
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-metadata/test/raw-with-ls-and-license-on-same-line_default.json +0 -21
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-metadata/test/raw-with-ls-multiline-block_default.json +0 -21
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-metadata/test/raw-with-ls_default.json +0 -21
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-metadata/test/raw-with-ps-and-license-on-same-line_default.json +0 -21
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-metadata/test/raw-with-ps-multiline-block_default.json +0 -21
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-metadata/test/raw-with-ps_default.json +0 -21
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-metadata/test/rawWithLicense_default.json +0 -21
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/expected-metadata/test/raw_default.json +0 -21
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/harness/assert.js +0 -17
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/harness/doneprintHandle.js +0 -6
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/harness/sta.js +0 -12
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/test/missing-raw-flag.js +0 -13
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/test/raw-with-ls-and-license-on-same-line.js +0 -20
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/test/raw-with-ls-multiline-block.js +0 -18
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/test/raw-with-ls.js +0 -17
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/test/raw-with-ps-and-license-on-same-line.js +0 -20
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/test/raw-with-ps-multiline-block.js +0 -18
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/test/raw-with-ps.js +0 -17
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/test/raw.js +0 -17
- package/test262/node_modules/test262-stream/test/collateral/valid-with-hashbang/fake-test262/test/rawWithLicense.js +0 -21
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/custom-includes/assert.js +0 -17
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/custom-includes/doneprintHandle.js +0 -9
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/custom-includes/sta.js +0 -13
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/expected-content/test/async_default.js +0 -52
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/expected-content/test/async_strict_mode.js +0 -53
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/expected-content/test/bothStrict_default.js +0 -47
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/expected-content/test/bothStrict_strict_mode.js +0 -48
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/expected-metadata/test/async_default.json +0 -18
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/expected-metadata/test/async_strict_mode.json +0 -18
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/expected-metadata/test/bothStrict_default.json +0 -24
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/expected-metadata/test/bothStrict_strict_mode.json +0 -24
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/fake-test262/harness/assert.js +0 -17
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/fake-test262/harness/doneprintHandle.js +0 -6
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/fake-test262/test/async.js +0 -10
- package/test262/node_modules/test262-stream/test/collateral/valid-with-includes/fake-test262/test/bothStrict.js +0 -15
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-content/test/async/asyncNegative_default.js +0 -49
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-content/test/async/asyncNegative_strict_mode.js +0 -50
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-content/test/async/async_default.js +0 -48
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-content/test/async/async_strict_mode.js +0 -49
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-content/test/bothStrict_default.js +0 -46
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-content/test/bothStrict_strict_mode.js +0 -47
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-content/test/strict/no/noStrict_default.js +0 -36
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-content/test/strict/no/rawNoStrict_default.js +0 -14
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-metadata/test/async/asyncNegative_default.json +0 -22
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-metadata/test/async/asyncNegative_strict_mode.json +0 -22
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-metadata/test/async/async_default.json +0 -18
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-metadata/test/async/async_strict_mode.json +0 -18
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-metadata/test/bothStrict_default.json +0 -24
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-metadata/test/bothStrict_strict_mode.json +0 -24
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-metadata/test/strict/no/noStrict_default.json +0 -17
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/expected-metadata/test/strict/no/rawNoStrict_default.json +0 -14
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/harness/assert.js +0 -17
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/harness/doneprintHandle.js +0 -6
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/harness/sta.js +0 -12
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/test/async/async.js +0 -10
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/test/async/asyncNegative.js +0 -11
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/test/bothStrict.js +0 -15
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/test/error.js +0 -8
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/test/negative-empty.js +0 -6
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/test/strict/no/noStrict.js +0 -5
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/test/strict/no/rawNoStrict.js +0 -14
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/test/strict/rawStrict.js +0 -15
- package/test262/node_modules/test262-stream/test/collateral/valid-with-paths/fake-test262/test/strict/strict.js +0 -9
- package/test262/node_modules/test262-stream/test/test.js +0 -319
- package/test262/node_modules/to-regex-range/LICENSE +0 -21
- package/test262/node_modules/to-regex-range/README.md +0 -305
- package/test262/node_modules/to-regex-range/index.js +0 -288
- package/test262/node_modules/to-regex-range/package.json +0 -88
- package/test262/package-lock.json +0 -279
- package/test262/package.json +0 -6
- package/test262/prelude.js +0 -75
- package/test262/results.json +0 -1
@@ -1,55 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "queue-microtask",
|
3
|
-
"description": "fast, tiny `queueMicrotask` shim for modern engines",
|
4
|
-
"version": "1.2.3",
|
5
|
-
"author": {
|
6
|
-
"name": "Feross Aboukhadijeh",
|
7
|
-
"email": "feross@feross.org",
|
8
|
-
"url": "https://feross.org"
|
9
|
-
},
|
10
|
-
"bugs": {
|
11
|
-
"url": "https://github.com/feross/queue-microtask/issues"
|
12
|
-
},
|
13
|
-
"devDependencies": {
|
14
|
-
"standard": "*",
|
15
|
-
"tape": "^5.2.2"
|
16
|
-
},
|
17
|
-
"funding": [
|
18
|
-
{
|
19
|
-
"type": "github",
|
20
|
-
"url": "https://github.com/sponsors/feross"
|
21
|
-
},
|
22
|
-
{
|
23
|
-
"type": "patreon",
|
24
|
-
"url": "https://www.patreon.com/feross"
|
25
|
-
},
|
26
|
-
{
|
27
|
-
"type": "consulting",
|
28
|
-
"url": "https://feross.org/support"
|
29
|
-
}
|
30
|
-
],
|
31
|
-
"homepage": "https://github.com/feross/queue-microtask",
|
32
|
-
"keywords": [
|
33
|
-
"asap",
|
34
|
-
"immediate",
|
35
|
-
"micro task",
|
36
|
-
"microtask",
|
37
|
-
"nextTick",
|
38
|
-
"process.nextTick",
|
39
|
-
"queue micro task",
|
40
|
-
"queue microtask",
|
41
|
-
"queue-microtask",
|
42
|
-
"queueMicrotask",
|
43
|
-
"setImmediate",
|
44
|
-
"task"
|
45
|
-
],
|
46
|
-
"license": "MIT",
|
47
|
-
"main": "index.js",
|
48
|
-
"repository": {
|
49
|
-
"type": "git",
|
50
|
-
"url": "git://github.com/feross/queue-microtask.git"
|
51
|
-
},
|
52
|
-
"scripts": {
|
53
|
-
"test": "standard && tape test/*.js"
|
54
|
-
}
|
55
|
-
}
|
@@ -1 +0,0 @@
|
|
1
|
-
repo_token: yIxhFqtaaz5iGVYfie9mODehFYogm8S8L
|
@@ -1,28 +0,0 @@
|
|
1
|
-
language: node_js
|
2
|
-
sudo: false
|
3
|
-
|
4
|
-
node_js:
|
5
|
-
- 9
|
6
|
-
- 8
|
7
|
-
- 7
|
8
|
-
- 6
|
9
|
-
- 5
|
10
|
-
- 4
|
11
|
-
- 4.0
|
12
|
-
- iojs-v3
|
13
|
-
- iojs-v2
|
14
|
-
- iojs-v1
|
15
|
-
- 0.12
|
16
|
-
- 0.10
|
17
|
-
|
18
|
-
cache:
|
19
|
-
directories:
|
20
|
-
- node_modules
|
21
|
-
|
22
|
-
after_script:
|
23
|
-
- npm run coverage
|
24
|
-
|
25
|
-
notifications:
|
26
|
-
email:
|
27
|
-
on_success: never
|
28
|
-
on_failure: always
|
@@ -1,22 +0,0 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) 2015 Matteo Collina
|
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.
|
22
|
-
|
@@ -1,145 +0,0 @@
|
|
1
|
-
# reusify
|
2
|
-
|
3
|
-
[![npm version][npm-badge]][npm-url]
|
4
|
-
[![Build Status][travis-badge]][travis-url]
|
5
|
-
[![Coverage Status][coveralls-badge]][coveralls-url]
|
6
|
-
|
7
|
-
Reuse your objects and functions for maximum speed. This technique will
|
8
|
-
make any function run ~10% faster. You call your functions a
|
9
|
-
lot, and it adds up quickly in hot code paths.
|
10
|
-
|
11
|
-
```
|
12
|
-
$ node benchmarks/createNoCodeFunction.js
|
13
|
-
Total time 53133
|
14
|
-
Total iterations 100000000
|
15
|
-
Iteration/s 1882069.5236482036
|
16
|
-
|
17
|
-
$ node benchmarks/reuseNoCodeFunction.js
|
18
|
-
Total time 50617
|
19
|
-
Total iterations 100000000
|
20
|
-
Iteration/s 1975620.838848608
|
21
|
-
```
|
22
|
-
|
23
|
-
The above benchmark uses fibonacci to simulate a real high-cpu load.
|
24
|
-
The actual numbers might differ for your use case, but the difference
|
25
|
-
should not.
|
26
|
-
|
27
|
-
The benchmark was taken using Node v6.10.0.
|
28
|
-
|
29
|
-
This library was extracted from
|
30
|
-
[fastparallel](http://npm.im/fastparallel).
|
31
|
-
|
32
|
-
## Example
|
33
|
-
|
34
|
-
```js
|
35
|
-
var reusify = require('reusify')
|
36
|
-
var fib = require('reusify/benchmarks/fib')
|
37
|
-
var instance = reusify(MyObject)
|
38
|
-
|
39
|
-
// get an object from the cache,
|
40
|
-
// or creates a new one when cache is empty
|
41
|
-
var obj = instance.get()
|
42
|
-
|
43
|
-
// set the state
|
44
|
-
obj.num = 100
|
45
|
-
obj.func()
|
46
|
-
|
47
|
-
// reset the state.
|
48
|
-
// if the state contains any external object
|
49
|
-
// do not use delete operator (it is slow)
|
50
|
-
// prefer set them to null
|
51
|
-
obj.num = 0
|
52
|
-
|
53
|
-
// store an object in the cache
|
54
|
-
instance.release(obj)
|
55
|
-
|
56
|
-
function MyObject () {
|
57
|
-
// you need to define this property
|
58
|
-
// so V8 can compile MyObject into an
|
59
|
-
// hidden class
|
60
|
-
this.next = null
|
61
|
-
this.num = 0
|
62
|
-
|
63
|
-
var that = this
|
64
|
-
|
65
|
-
// this function is never reallocated,
|
66
|
-
// so it can be optimized by V8
|
67
|
-
this.func = function () {
|
68
|
-
if (null) {
|
69
|
-
// do nothing
|
70
|
-
} else {
|
71
|
-
// calculates fibonacci
|
72
|
-
fib(that.num)
|
73
|
-
}
|
74
|
-
}
|
75
|
-
}
|
76
|
-
```
|
77
|
-
|
78
|
-
The above example was intended for synchronous code, let's see async:
|
79
|
-
```js
|
80
|
-
var reusify = require('reusify')
|
81
|
-
var instance = reusify(MyObject)
|
82
|
-
|
83
|
-
for (var i = 0; i < 100; i++) {
|
84
|
-
getData(i, console.log)
|
85
|
-
}
|
86
|
-
|
87
|
-
function getData (value, cb) {
|
88
|
-
var obj = instance.get()
|
89
|
-
|
90
|
-
obj.value = value
|
91
|
-
obj.cb = cb
|
92
|
-
obj.run()
|
93
|
-
}
|
94
|
-
|
95
|
-
function MyObject () {
|
96
|
-
this.next = null
|
97
|
-
this.value = null
|
98
|
-
|
99
|
-
var that = this
|
100
|
-
|
101
|
-
this.run = function () {
|
102
|
-
asyncOperation(that.value, that.handle)
|
103
|
-
}
|
104
|
-
|
105
|
-
this.handle = function (err, result) {
|
106
|
-
that.cb(err, result)
|
107
|
-
that.value = null
|
108
|
-
that.cb = null
|
109
|
-
instance.release(that)
|
110
|
-
}
|
111
|
-
}
|
112
|
-
```
|
113
|
-
|
114
|
-
Also note how in the above examples, the code, that consumes an istance of `MyObject`,
|
115
|
-
reset the state to initial condition, just before storing it in the cache.
|
116
|
-
That's needed so that every subsequent request for an instance from the cache,
|
117
|
-
could get a clean instance.
|
118
|
-
|
119
|
-
## Why
|
120
|
-
|
121
|
-
It is faster because V8 doesn't have to collect all the functions you
|
122
|
-
create. On a short-lived benchmark, it is as fast as creating the
|
123
|
-
nested function, but on a longer time frame it creates less
|
124
|
-
pressure on the garbage collector.
|
125
|
-
|
126
|
-
## Other examples
|
127
|
-
If you want to see some complex example, checkout [middie](https://github.com/fastify/middie) and [steed](https://github.com/mcollina/steed).
|
128
|
-
|
129
|
-
## Acknowledgements
|
130
|
-
|
131
|
-
Thanks to [Trevor Norris](https://github.com/trevnorris) for
|
132
|
-
getting me down the rabbit hole of performance, and thanks to [Mathias
|
133
|
-
Buss](http://github.com/mafintosh) for suggesting me to share this
|
134
|
-
trick.
|
135
|
-
|
136
|
-
## License
|
137
|
-
|
138
|
-
MIT
|
139
|
-
|
140
|
-
[npm-badge]: https://badge.fury.io/js/reusify.svg
|
141
|
-
[npm-url]: https://badge.fury.io/js/reusify
|
142
|
-
[travis-badge]: https://api.travis-ci.org/mcollina/reusify.svg
|
143
|
-
[travis-url]: https://travis-ci.org/mcollina/reusify
|
144
|
-
[coveralls-badge]: https://coveralls.io/repos/mcollina/reusify/badge.svg?branch=master&service=github
|
145
|
-
[coveralls-url]: https://coveralls.io/github/mcollina/reusify?branch=master
|
@@ -1,30 +0,0 @@
|
|
1
|
-
'use strict'
|
2
|
-
|
3
|
-
var fib = require('./fib')
|
4
|
-
var max = 100000000
|
5
|
-
var start = Date.now()
|
6
|
-
|
7
|
-
// create a funcion with the typical error
|
8
|
-
// pattern, that delegates the heavy load
|
9
|
-
// to something else
|
10
|
-
function createNoCodeFunction () {
|
11
|
-
/* eslint no-constant-condition: "off" */
|
12
|
-
var num = 100
|
13
|
-
|
14
|
-
;(function () {
|
15
|
-
if (null) {
|
16
|
-
// do nothing
|
17
|
-
} else {
|
18
|
-
fib(num)
|
19
|
-
}
|
20
|
-
})()
|
21
|
-
}
|
22
|
-
|
23
|
-
for (var i = 0; i < max; i++) {
|
24
|
-
createNoCodeFunction()
|
25
|
-
}
|
26
|
-
|
27
|
-
var time = Date.now() - start
|
28
|
-
console.log('Total time', time)
|
29
|
-
console.log('Total iterations', max)
|
30
|
-
console.log('Iteration/s', max / time * 1000)
|
@@ -1,38 +0,0 @@
|
|
1
|
-
'use strict'
|
2
|
-
|
3
|
-
var reusify = require('../')
|
4
|
-
var fib = require('./fib')
|
5
|
-
var instance = reusify(MyObject)
|
6
|
-
var max = 100000000
|
7
|
-
var start = Date.now()
|
8
|
-
|
9
|
-
function reuseNoCodeFunction () {
|
10
|
-
var obj = instance.get()
|
11
|
-
obj.num = 100
|
12
|
-
obj.func()
|
13
|
-
obj.num = 0
|
14
|
-
instance.release(obj)
|
15
|
-
}
|
16
|
-
|
17
|
-
function MyObject () {
|
18
|
-
this.next = null
|
19
|
-
var that = this
|
20
|
-
this.num = 0
|
21
|
-
this.func = function () {
|
22
|
-
/* eslint no-constant-condition: "off" */
|
23
|
-
if (null) {
|
24
|
-
// do nothing
|
25
|
-
} else {
|
26
|
-
fib(that.num)
|
27
|
-
}
|
28
|
-
}
|
29
|
-
}
|
30
|
-
|
31
|
-
for (var i = 0; i < max; i++) {
|
32
|
-
reuseNoCodeFunction()
|
33
|
-
}
|
34
|
-
|
35
|
-
var time = Date.now() - start
|
36
|
-
console.log('Total time', time)
|
37
|
-
console.log('Total iterations', max)
|
38
|
-
console.log('Iteration/s', max / time * 1000)
|
@@ -1,45 +0,0 @@
|
|
1
|
-
{
|
2
|
-
"name": "reusify",
|
3
|
-
"version": "1.0.4",
|
4
|
-
"description": "Reuse objects and functions with style",
|
5
|
-
"main": "reusify.js",
|
6
|
-
"scripts": {
|
7
|
-
"lint": "standard",
|
8
|
-
"test": "tape test.js | faucet",
|
9
|
-
"istanbul": "istanbul cover tape test.js",
|
10
|
-
"coverage": "npm run istanbul; cat coverage/lcov.info | coveralls"
|
11
|
-
},
|
12
|
-
"pre-commit": [
|
13
|
-
"lint",
|
14
|
-
"test"
|
15
|
-
],
|
16
|
-
"repository": {
|
17
|
-
"type": "git",
|
18
|
-
"url": "git+https://github.com/mcollina/reusify.git"
|
19
|
-
},
|
20
|
-
"keywords": [
|
21
|
-
"reuse",
|
22
|
-
"object",
|
23
|
-
"performance",
|
24
|
-
"function",
|
25
|
-
"fast"
|
26
|
-
],
|
27
|
-
"author": "Matteo Collina <hello@matteocollina.com>",
|
28
|
-
"license": "MIT",
|
29
|
-
"bugs": {
|
30
|
-
"url": "https://github.com/mcollina/reusify/issues"
|
31
|
-
},
|
32
|
-
"homepage": "https://github.com/mcollina/reusify#readme",
|
33
|
-
"engines": {
|
34
|
-
"node": ">=0.10.0",
|
35
|
-
"iojs": ">=1.0.0"
|
36
|
-
},
|
37
|
-
"devDependencies": {
|
38
|
-
"coveralls": "^2.13.3",
|
39
|
-
"faucet": "0.0.1",
|
40
|
-
"istanbul": "^0.4.5",
|
41
|
-
"pre-commit": "^1.2.2",
|
42
|
-
"standard": "^10.0.3",
|
43
|
-
"tape": "^4.8.0"
|
44
|
-
}
|
45
|
-
}
|
@@ -1,33 +0,0 @@
|
|
1
|
-
'use strict'
|
2
|
-
|
3
|
-
function reusify (Constructor) {
|
4
|
-
var head = new Constructor()
|
5
|
-
var tail = head
|
6
|
-
|
7
|
-
function get () {
|
8
|
-
var current = head
|
9
|
-
|
10
|
-
if (current.next) {
|
11
|
-
head = current.next
|
12
|
-
} else {
|
13
|
-
head = new Constructor()
|
14
|
-
tail = head
|
15
|
-
}
|
16
|
-
|
17
|
-
current.next = null
|
18
|
-
|
19
|
-
return current
|
20
|
-
}
|
21
|
-
|
22
|
-
function release (obj) {
|
23
|
-
tail.next = obj
|
24
|
-
tail = obj
|
25
|
-
}
|
26
|
-
|
27
|
-
return {
|
28
|
-
get: get,
|
29
|
-
release: release
|
30
|
-
}
|
31
|
-
}
|
32
|
-
|
33
|
-
module.exports = reusify
|
@@ -1,66 +0,0 @@
|
|
1
|
-
'use strict'
|
2
|
-
|
3
|
-
var test = require('tape')
|
4
|
-
var reusify = require('./')
|
5
|
-
|
6
|
-
test('reuse objects', function (t) {
|
7
|
-
t.plan(6)
|
8
|
-
|
9
|
-
function MyObject () {
|
10
|
-
t.pass('constructor called')
|
11
|
-
this.next = null
|
12
|
-
}
|
13
|
-
|
14
|
-
var instance = reusify(MyObject)
|
15
|
-
var obj = instance.get()
|
16
|
-
|
17
|
-
t.notEqual(obj, instance.get(), 'two instance created')
|
18
|
-
t.notOk(obj.next, 'next must be null')
|
19
|
-
|
20
|
-
instance.release(obj)
|
21
|
-
|
22
|
-
// the internals keeps a hot copy ready for reuse
|
23
|
-
// putting this one back in the queue
|
24
|
-
instance.release(instance.get())
|
25
|
-
|
26
|
-
// comparing the old one with the one we got
|
27
|
-
// never do this in real code, after release you
|
28
|
-
// should never reuse that instance
|
29
|
-
t.equal(obj, instance.get(), 'instance must be reused')
|
30
|
-
})
|
31
|
-
|
32
|
-
test('reuse more than 2 objects', function (t) {
|
33
|
-
function MyObject () {
|
34
|
-
t.pass('constructor called')
|
35
|
-
this.next = null
|
36
|
-
}
|
37
|
-
|
38
|
-
var instance = reusify(MyObject)
|
39
|
-
var obj = instance.get()
|
40
|
-
var obj2 = instance.get()
|
41
|
-
var obj3 = instance.get()
|
42
|
-
|
43
|
-
t.notOk(obj.next, 'next must be null')
|
44
|
-
t.notOk(obj2.next, 'next must be null')
|
45
|
-
t.notOk(obj3.next, 'next must be null')
|
46
|
-
|
47
|
-
t.notEqual(obj, obj2)
|
48
|
-
t.notEqual(obj, obj3)
|
49
|
-
t.notEqual(obj3, obj2)
|
50
|
-
|
51
|
-
instance.release(obj)
|
52
|
-
instance.release(obj2)
|
53
|
-
instance.release(obj3)
|
54
|
-
|
55
|
-
// skip one
|
56
|
-
instance.get()
|
57
|
-
|
58
|
-
var obj4 = instance.get()
|
59
|
-
var obj5 = instance.get()
|
60
|
-
var obj6 = instance.get()
|
61
|
-
|
62
|
-
t.equal(obj4, obj)
|
63
|
-
t.equal(obj5, obj2)
|
64
|
-
t.equal(obj6, obj3)
|
65
|
-
t.end()
|
66
|
-
})
|
@@ -1,20 +0,0 @@
|
|
1
|
-
The MIT License (MIT)
|
2
|
-
|
3
|
-
Copyright (c) Feross Aboukhadijeh
|
4
|
-
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
6
|
-
this software and associated documentation files (the "Software"), to deal in
|
7
|
-
the Software without restriction, including without limitation the rights to
|
8
|
-
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
9
|
-
the Software, and to permit persons to whom the Software is furnished to do so,
|
10
|
-
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, FITNESS
|
17
|
-
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
18
|
-
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
19
|
-
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
20
|
-
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -1,85 +0,0 @@
|
|
1
|
-
# run-parallel [![travis][travis-image]][travis-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url] [![javascript style guide][standard-image]][standard-url]
|
2
|
-
|
3
|
-
[travis-image]: https://img.shields.io/travis/feross/run-parallel/master.svg
|
4
|
-
[travis-url]: https://travis-ci.org/feross/run-parallel
|
5
|
-
[npm-image]: https://img.shields.io/npm/v/run-parallel.svg
|
6
|
-
[npm-url]: https://npmjs.org/package/run-parallel
|
7
|
-
[downloads-image]: https://img.shields.io/npm/dm/run-parallel.svg
|
8
|
-
[downloads-url]: https://npmjs.org/package/run-parallel
|
9
|
-
[standard-image]: https://img.shields.io/badge/code_style-standard-brightgreen.svg
|
10
|
-
[standard-url]: https://standardjs.com
|
11
|
-
|
12
|
-
### Run an array of functions in parallel
|
13
|
-
|
14
|
-
 [](https://saucelabs.com/u/run-parallel)
|
15
|
-
|
16
|
-
### install
|
17
|
-
|
18
|
-
```
|
19
|
-
npm install run-parallel
|
20
|
-
```
|
21
|
-
|
22
|
-
### usage
|
23
|
-
|
24
|
-
#### parallel(tasks, [callback])
|
25
|
-
|
26
|
-
Run the `tasks` array of functions in parallel, without waiting until the previous
|
27
|
-
function has completed. If any of the functions pass an error to its callback, the main
|
28
|
-
`callback` is immediately called with the value of the error. Once the `tasks` have
|
29
|
-
completed, the results are passed to the final `callback` as an array.
|
30
|
-
|
31
|
-
It is also possible to use an object instead of an array. Each property will be run as a
|
32
|
-
function and the results will be passed to the final `callback` as an object instead of
|
33
|
-
an array. This can be a more readable way of handling the results.
|
34
|
-
|
35
|
-
##### arguments
|
36
|
-
|
37
|
-
- `tasks` - An array or object containing functions to run. Each function is passed a
|
38
|
-
`callback(err, result)` which it must call on completion with an error `err` (which can
|
39
|
-
be `null`) and an optional `result` value.
|
40
|
-
- `callback(err, results)` - An optional callback to run once all the functions have
|
41
|
-
completed. This function gets a results array (or object) containing all the result
|
42
|
-
arguments passed to the task callbacks.
|
43
|
-
|
44
|
-
##### example
|
45
|
-
|
46
|
-
```js
|
47
|
-
var parallel = require('run-parallel')
|
48
|
-
|
49
|
-
parallel([
|
50
|
-
function (callback) {
|
51
|
-
setTimeout(function () {
|
52
|
-
callback(null, 'one')
|
53
|
-
}, 200)
|
54
|
-
},
|
55
|
-
function (callback) {
|
56
|
-
setTimeout(function () {
|
57
|
-
callback(null, 'two')
|
58
|
-
}, 100)
|
59
|
-
}
|
60
|
-
],
|
61
|
-
// optional callback
|
62
|
-
function (err, results) {
|
63
|
-
// the results array will equal ['one','two'] even though
|
64
|
-
// the second function had a shorter timeout.
|
65
|
-
})
|
66
|
-
```
|
67
|
-
|
68
|
-
This module is basically equavalent to
|
69
|
-
[`async.parallel`](https://github.com/caolan/async#paralleltasks-callback), but it's
|
70
|
-
handy to just have the one function you need instead of the kitchen sink. Modularity!
|
71
|
-
Especially handy if you're serving to the browser and need to reduce your javascript
|
72
|
-
bundle size.
|
73
|
-
|
74
|
-
Works great in the browser with [browserify](http://browserify.org/)!
|
75
|
-
|
76
|
-
### see also
|
77
|
-
|
78
|
-
- [run-auto](https://github.com/feross/run-auto)
|
79
|
-
- [run-parallel-limit](https://github.com/feross/run-parallel-limit)
|
80
|
-
- [run-series](https://github.com/feross/run-series)
|
81
|
-
- [run-waterfall](https://github.com/feross/run-waterfall)
|
82
|
-
|
83
|
-
### license
|
84
|
-
|
85
|
-
MIT. Copyright (c) [Feross Aboukhadijeh](http://feross.org).
|
@@ -1,51 +0,0 @@
|
|
1
|
-
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
2
|
-
module.exports = runParallel
|
3
|
-
|
4
|
-
const queueMicrotask = require('queue-microtask')
|
5
|
-
|
6
|
-
function runParallel (tasks, cb) {
|
7
|
-
let results, pending, keys
|
8
|
-
let isSync = true
|
9
|
-
|
10
|
-
if (Array.isArray(tasks)) {
|
11
|
-
results = []
|
12
|
-
pending = tasks.length
|
13
|
-
} else {
|
14
|
-
keys = Object.keys(tasks)
|
15
|
-
results = {}
|
16
|
-
pending = keys.length
|
17
|
-
}
|
18
|
-
|
19
|
-
function done (err) {
|
20
|
-
function end () {
|
21
|
-
if (cb) cb(err, results)
|
22
|
-
cb = null
|
23
|
-
}
|
24
|
-
if (isSync) queueMicrotask(end)
|
25
|
-
else end()
|
26
|
-
}
|
27
|
-
|
28
|
-
function each (i, err, result) {
|
29
|
-
results[i] = result
|
30
|
-
if (--pending === 0 || err) {
|
31
|
-
done(err)
|
32
|
-
}
|
33
|
-
}
|
34
|
-
|
35
|
-
if (!pending) {
|
36
|
-
// empty
|
37
|
-
done(null)
|
38
|
-
} else if (keys) {
|
39
|
-
// object
|
40
|
-
keys.forEach(function (key) {
|
41
|
-
tasks[key](function (err, result) { each(key, err, result) })
|
42
|
-
})
|
43
|
-
} else {
|
44
|
-
// array
|
45
|
-
tasks.forEach(function (task, i) {
|
46
|
-
task(function (err, result) { each(i, err, result) })
|
47
|
-
})
|
48
|
-
}
|
49
|
-
|
50
|
-
isSync = false
|
51
|
-
}
|