meteor-node-stubs 1.2.17 → 1.2.19
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/node_modules/@meteorjs/browserify-sign/browser/sign.js +1 -1
- package/node_modules/@meteorjs/browserify-sign/browser/verify.js +1 -1
- package/node_modules/@meteorjs/browserify-sign/elliptic/benchmarks/deps/jodid.js +82 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/benchmarks/deps/secp256k1.js +41 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/benchmarks/index.js +153 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/benchmarks/package.json +21 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/dist/.gitkeep +0 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/dist/elliptic.js +8961 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/dist/elliptic.min.js +1 -0
- package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic.js +1 -1
- package/node_modules/@meteorjs/browserify-sign/elliptic/test/api-test.js +20 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/test/curve-test.js +357 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/test/ecdh-test.js +43 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/test/ecdsa-test.js +547 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/test/ed25519-test.js +138 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/test/fixtures/derivation-fixtures.js +3842 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/test/fixtures/sign.input +1024 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/test/index.js +10 -0
- package/node_modules/@meteorjs/browserify-sign/elliptic/test/unittests.html +39 -0
- package/node_modules/@meteorjs/browserify-sign/package.json +22 -5
- package/node_modules/@meteorjs/create-ecdh/browser.js +1 -1
- package/node_modules/@meteorjs/create-ecdh/elliptic/README.md +238 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/benchmarks/deps/jodid.js +82 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/benchmarks/deps/secp256k1.js +41 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/benchmarks/index.js +153 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/benchmarks/package.json +21 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/dist/.gitkeep +0 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/dist/elliptic.js +8961 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/dist/elliptic.min.js +1 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/curve/base.js +381 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/curve/edwards.js +435 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/curve/index.js +8 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/curve/mont.js +178 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/curve/short.js +938 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/curves.js +206 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/ec/index.js +278 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/ec/key.js +121 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/ec/signature.js +176 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/eddsa/index.js +121 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/eddsa/key.js +95 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/eddsa/signature.js +66 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/precomputed/secp256k1.js +780 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic/utils.js +122 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/lib/elliptic.js +13 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/test/api-test.js +20 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/test/curve-test.js +357 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/test/ecdh-test.js +43 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/test/ecdsa-test.js +547 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/test/ed25519-test.js +138 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/test/fixtures/derivation-fixtures.js +3842 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/test/fixtures/sign.input +1024 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/test/index.js +10 -0
- package/node_modules/@meteorjs/create-ecdh/elliptic/test/unittests.html +39 -0
- package/node_modules/@meteorjs/create-ecdh/node_modules/bn.js/lib/bn.js +1 -0
- package/node_modules/@meteorjs/create-ecdh/node_modules/bn.js/package.json +1 -1
- package/node_modules/@meteorjs/create-ecdh/package.json +23 -5
- package/node_modules/asn1.js/node_modules/bn.js/lib/bn.js +6 -5
- package/node_modules/asn1.js/node_modules/bn.js/package.json +1 -1
- package/node_modules/asn1.js/node_modules/bn.js/util/genCombMulTo.js +65 -0
- package/node_modules/asn1.js/node_modules/bn.js/util/genCombMulTo10.js +65 -0
- package/node_modules/available-typed-arrays/.eslintrc +0 -4
- package/node_modules/available-typed-arrays/CHANGELOG.md +21 -0
- package/node_modules/available-typed-arrays/README.md +16 -13
- package/node_modules/available-typed-arrays/index.d.ts +8 -0
- package/node_modules/available-typed-arrays/index.js +4 -14
- package/node_modules/available-typed-arrays/package.json +26 -15
- package/node_modules/available-typed-arrays/tsconfig.json +49 -0
- package/node_modules/bn.js/README.md +11 -5
- package/node_modules/bn.js/lib/bn.js +6 -5
- package/node_modules/bn.js/package.json +1 -1
- package/node_modules/browserify-rsa/CHANGELOG.md +98 -0
- package/node_modules/browserify-rsa/README.md +0 -2
- package/node_modules/browserify-rsa/index.js +31 -28
- package/node_modules/browserify-rsa/package.json +64 -29
- package/node_modules/call-bind/CHANGELOG.md +13 -0
- package/node_modules/call-bind/index.js +6 -17
- package/node_modules/call-bind/package.json +14 -16
- package/node_modules/call-bind/test/index.js +4 -10
- package/node_modules/call-bind-apply-helpers/.eslintrc +17 -0
- package/node_modules/call-bind-apply-helpers/.github/FUNDING.yml +12 -0
- package/node_modules/call-bind-apply-helpers/.nycrc +9 -0
- package/node_modules/call-bind-apply-helpers/CHANGELOG.md +30 -0
- package/node_modules/{has-proto → call-bind-apply-helpers}/LICENSE +1 -1
- package/node_modules/call-bind-apply-helpers/README.md +62 -0
- package/node_modules/call-bind-apply-helpers/actualApply.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/actualApply.js +10 -0
- package/node_modules/call-bind-apply-helpers/applyBind.d.ts +19 -0
- package/node_modules/call-bind-apply-helpers/applyBind.js +10 -0
- package/node_modules/call-bind-apply-helpers/functionApply.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/functionApply.js +4 -0
- package/node_modules/call-bind-apply-helpers/functionCall.d.ts +1 -0
- package/node_modules/call-bind-apply-helpers/functionCall.js +4 -0
- package/node_modules/call-bind-apply-helpers/index.d.ts +64 -0
- package/node_modules/call-bind-apply-helpers/index.js +15 -0
- package/node_modules/call-bind-apply-helpers/package.json +85 -0
- package/node_modules/call-bind-apply-helpers/reflectApply.d.ts +3 -0
- package/node_modules/call-bind-apply-helpers/reflectApply.js +4 -0
- package/node_modules/call-bind-apply-helpers/test/index.js +63 -0
- package/node_modules/call-bind-apply-helpers/tsconfig.json +9 -0
- package/node_modules/call-bound/.eslintrc +13 -0
- package/node_modules/call-bound/.github/FUNDING.yml +12 -0
- package/node_modules/call-bound/.nycrc +9 -0
- package/node_modules/call-bound/CHANGELOG.md +42 -0
- package/node_modules/{@meteorjs/browserify-sign/node_modules/bn.js → call-bound}/LICENSE +3 -1
- package/node_modules/call-bound/README.md +53 -0
- package/node_modules/call-bound/index.d.ts +94 -0
- package/node_modules/call-bound/index.js +19 -0
- package/node_modules/call-bound/package.json +99 -0
- package/node_modules/call-bound/test/index.js +61 -0
- package/node_modules/call-bound/tsconfig.json +10 -0
- package/node_modules/cipher-base/.eslintrc +24 -1
- package/node_modules/cipher-base/.github/FUNDING.yml +12 -0
- package/node_modules/cipher-base/CHANGELOG.md +66 -0
- package/node_modules/cipher-base/index.js +145 -77
- package/node_modules/cipher-base/package.json +60 -30
- package/node_modules/cipher-base/test/index.js +221 -0
- package/node_modules/des.js/lib/des/cipher.js +1 -0
- package/node_modules/des.js/lib/des/des.js +8 -0
- package/node_modules/des.js/package.json +3 -4
- package/node_modules/des.js/test/cbc-test.js +5 -5
- package/node_modules/des.js/test/des-test.js +9 -9
- package/node_modules/des.js/test/ede-test.js +39 -6
- package/node_modules/diffie-hellman/node_modules/bn.js/lib/bn.js +6 -5
- package/node_modules/diffie-hellman/node_modules/bn.js/package.json +1 -1
- package/node_modules/diffie-hellman/node_modules/bn.js/util/genCombMulTo.js +65 -0
- package/node_modules/diffie-hellman/node_modules/bn.js/util/genCombMulTo10.js +65 -0
- package/node_modules/dunder-proto/.github/FUNDING.yml +12 -0
- package/node_modules/dunder-proto/.nycrc +13 -0
- package/node_modules/dunder-proto/CHANGELOG.md +24 -0
- package/node_modules/{@meteorjs/crypto-browserify/node_modules/hash-base → dunder-proto}/LICENSE +6 -6
- package/node_modules/dunder-proto/README.md +54 -0
- package/node_modules/dunder-proto/get.d.ts +5 -0
- package/node_modules/dunder-proto/get.js +30 -0
- package/node_modules/dunder-proto/package.json +76 -0
- package/node_modules/dunder-proto/set.d.ts +5 -0
- package/node_modules/dunder-proto/set.js +35 -0
- package/node_modules/dunder-proto/test/get.js +34 -0
- package/node_modules/dunder-proto/test/index.js +4 -0
- package/node_modules/dunder-proto/test/set.js +50 -0
- package/node_modules/dunder-proto/tsconfig.json +9 -0
- package/node_modules/es-define-property/CHANGELOG.md +14 -0
- package/node_modules/es-define-property/index.js +1 -3
- package/node_modules/es-define-property/package.json +12 -12
- package/node_modules/es-define-property/test/index.js +1 -0
- package/node_modules/es-define-property/tsconfig.json +2 -42
- package/node_modules/es-object-atoms/.eslintrc +16 -0
- package/node_modules/es-object-atoms/.github/FUNDING.yml +12 -0
- package/node_modules/es-object-atoms/CHANGELOG.md +37 -0
- package/node_modules/{elliptic/node_modules/bn.js → es-object-atoms}/LICENSE +3 -1
- package/node_modules/es-object-atoms/README.md +63 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.d.ts +3 -0
- package/node_modules/es-object-atoms/RequireObjectCoercible.js +11 -0
- package/node_modules/es-object-atoms/ToObject.d.ts +7 -0
- package/node_modules/es-object-atoms/ToObject.js +10 -0
- package/node_modules/es-object-atoms/index.d.ts +3 -0
- package/node_modules/es-object-atoms/index.js +4 -0
- package/node_modules/es-object-atoms/isObject.d.ts +3 -0
- package/node_modules/es-object-atoms/isObject.js +6 -0
- package/node_modules/es-object-atoms/package.json +80 -0
- package/node_modules/es-object-atoms/test/index.js +38 -0
- package/node_modules/es-object-atoms/tsconfig.json +6 -0
- package/node_modules/for-each/.eslintrc +16 -2
- package/node_modules/{has-proto → for-each}/.github/FUNDING.yml +1 -1
- package/node_modules/for-each/.github/SECURITY.md +3 -0
- package/node_modules/for-each/.nycrc +8 -0
- package/node_modules/for-each/CHANGELOG.md +107 -0
- package/node_modules/for-each/README.md +0 -4
- package/node_modules/for-each/index.d.ts +35 -0
- package/node_modules/for-each/index.js +11 -4
- package/node_modules/for-each/package.json +47 -36
- package/node_modules/for-each/test/test.js +54 -12
- package/node_modules/for-each/tsconfig.json +8 -0
- package/node_modules/get-intrinsic/.eslintrc +4 -0
- package/node_modules/get-intrinsic/CHANGELOG.md +43 -0
- package/node_modules/get-intrinsic/index.js +40 -21
- package/node_modules/get-intrinsic/package.json +24 -20
- package/node_modules/get-intrinsic/test/GetIntrinsic.js +2 -2
- package/node_modules/get-proto/.eslintrc +10 -0
- package/node_modules/get-proto/.github/FUNDING.yml +12 -0
- package/node_modules/get-proto/.nycrc +9 -0
- package/node_modules/get-proto/CHANGELOG.md +21 -0
- package/node_modules/get-proto/LICENSE +21 -0
- package/node_modules/get-proto/Object.getPrototypeOf.d.ts +5 -0
- package/node_modules/get-proto/Object.getPrototypeOf.js +6 -0
- package/node_modules/get-proto/README.md +50 -0
- package/node_modules/get-proto/Reflect.getPrototypeOf.d.ts +3 -0
- package/node_modules/get-proto/Reflect.getPrototypeOf.js +4 -0
- package/node_modules/get-proto/index.d.ts +5 -0
- package/node_modules/get-proto/index.js +27 -0
- package/node_modules/{has-proto → get-proto}/package.json +33 -26
- package/node_modules/get-proto/test/index.js +68 -0
- package/node_modules/get-proto/tsconfig.json +9 -0
- package/node_modules/gopd/CHANGELOG.md +20 -0
- package/node_modules/gopd/gOPD.d.ts +1 -0
- package/node_modules/gopd/gOPD.js +4 -0
- package/node_modules/gopd/index.d.ts +5 -0
- package/node_modules/gopd/index.js +2 -3
- package/node_modules/gopd/package.json +16 -10
- package/node_modules/gopd/test/index.js +2 -1
- package/node_modules/gopd/tsconfig.json +9 -0
- package/node_modules/has-symbols/CHANGELOG.md +16 -0
- package/node_modules/has-symbols/index.d.ts +3 -0
- package/node_modules/has-symbols/index.js +1 -0
- package/node_modules/has-symbols/package.json +19 -9
- package/node_modules/has-symbols/shams.d.ts +3 -0
- package/node_modules/has-symbols/shams.js +5 -2
- package/node_modules/has-symbols/test/shams/core-js.js +1 -0
- package/node_modules/has-symbols/test/shams/get-own-property-symbols.js +1 -0
- package/node_modules/has-symbols/test/tests.js +4 -2
- package/node_modules/has-symbols/tsconfig.json +10 -0
- package/node_modules/has-tostringtag/.eslintrc +0 -6
- package/node_modules/has-tostringtag/.nycrc +13 -0
- package/node_modules/has-tostringtag/CHANGELOG.md +22 -0
- package/node_modules/has-tostringtag/index.d.ts +3 -0
- package/node_modules/has-tostringtag/index.js +1 -0
- package/node_modules/has-tostringtag/package.json +37 -13
- package/node_modules/has-tostringtag/shams.d.ts +3 -0
- package/node_modules/has-tostringtag/shams.js +1 -0
- package/node_modules/has-tostringtag/test/shams/core-js.js +3 -0
- package/node_modules/has-tostringtag/test/shams/get-own-property-symbols.js +2 -0
- package/node_modules/has-tostringtag/test/tests.js +2 -1
- package/node_modules/has-tostringtag/tsconfig.json +49 -0
- package/node_modules/hash-base/README.md +15 -15
- package/node_modules/hash-base/index.js +52 -9
- package/node_modules/hash-base/package.json +40 -40
- package/node_modules/hasown/CHANGELOG.md +20 -0
- package/node_modules/hasown/index.d.ts +3 -3
- package/node_modules/hasown/index.js +1 -1
- package/node_modules/hasown/package.json +16 -15
- package/node_modules/hasown/tsconfig.json +3 -46
- package/node_modules/is-arguments/.eslintrc +0 -1
- package/node_modules/is-arguments/CHANGELOG.md +22 -0
- package/node_modules/is-arguments/README.md +11 -11
- package/node_modules/is-arguments/index.d.ts +6 -0
- package/node_modules/is-arguments/index.js +19 -8
- package/node_modules/is-arguments/package.json +25 -11
- package/node_modules/is-arguments/test/index.js +4 -1
- package/node_modules/is-arguments/tsconfig.json +9 -0
- package/node_modules/is-generator-function/.eslintrc +1 -1
- package/node_modules/is-generator-function/CHANGELOG.md +21 -0
- package/node_modules/is-generator-function/index.d.ts +3 -0
- package/node_modules/is-generator-function/index.js +16 -7
- package/node_modules/is-generator-function/package.json +30 -11
- package/node_modules/is-generator-function/test/corejs.js +1 -0
- package/node_modules/is-generator-function/test/index.js +4 -7
- package/node_modules/is-generator-function/test/uglified.js +1 -0
- package/node_modules/is-generator-function/tsconfig.json +9 -0
- package/node_modules/is-regex/.editorconfig +23 -0
- package/node_modules/is-regex/.eslintrc +10 -0
- package/node_modules/is-regex/.nycrc +10 -0
- package/node_modules/is-regex/CHANGELOG.md +233 -0
- package/node_modules/is-regex/LICENSE +20 -0
- package/node_modules/is-regex/README.md +52 -0
- package/node_modules/is-regex/index.d.ts +3 -0
- package/node_modules/is-regex/index.js +69 -0
- package/node_modules/is-regex/package.json +104 -0
- package/node_modules/is-regex/test/index.js +121 -0
- package/node_modules/is-regex/tsconfig.json +9 -0
- package/node_modules/is-typed-array/CHANGELOG.md +32 -0
- package/node_modules/is-typed-array/index.d.ts +9 -0
- package/node_modules/is-typed-array/index.js +1 -0
- package/node_modules/is-typed-array/package.json +23 -10
- package/node_modules/is-typed-array/test/index.js +9 -1
- package/node_modules/is-typed-array/tsconfig.json +6 -0
- package/node_modules/math-intrinsics/.eslintrc +16 -0
- package/node_modules/math-intrinsics/.github/FUNDING.yml +12 -0
- package/node_modules/math-intrinsics/CHANGELOG.md +24 -0
- package/node_modules/math-intrinsics/LICENSE +21 -0
- package/node_modules/math-intrinsics/README.md +50 -0
- package/node_modules/math-intrinsics/abs.d.ts +1 -0
- package/node_modules/math-intrinsics/abs.js +4 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxArrayLength.js +4 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxSafeInteger.js +5 -0
- package/node_modules/math-intrinsics/constants/maxValue.d.ts +3 -0
- package/node_modules/math-intrinsics/constants/maxValue.js +5 -0
- package/node_modules/math-intrinsics/floor.d.ts +1 -0
- package/node_modules/math-intrinsics/floor.js +4 -0
- package/node_modules/math-intrinsics/isFinite.d.ts +3 -0
- package/node_modules/math-intrinsics/isFinite.js +12 -0
- package/node_modules/math-intrinsics/isInteger.d.ts +3 -0
- package/node_modules/math-intrinsics/isInteger.js +16 -0
- package/node_modules/math-intrinsics/isNaN.d.ts +1 -0
- package/node_modules/math-intrinsics/isNaN.js +6 -0
- package/node_modules/math-intrinsics/isNegativeZero.d.ts +3 -0
- package/node_modules/math-intrinsics/isNegativeZero.js +6 -0
- package/node_modules/math-intrinsics/max.d.ts +1 -0
- package/node_modules/math-intrinsics/max.js +4 -0
- package/node_modules/math-intrinsics/min.d.ts +1 -0
- package/node_modules/math-intrinsics/min.js +4 -0
- package/node_modules/math-intrinsics/mod.d.ts +3 -0
- package/node_modules/math-intrinsics/mod.js +9 -0
- package/node_modules/math-intrinsics/package.json +86 -0
- package/node_modules/math-intrinsics/pow.d.ts +1 -0
- package/node_modules/math-intrinsics/pow.js +4 -0
- package/node_modules/math-intrinsics/round.d.ts +1 -0
- package/node_modules/math-intrinsics/round.js +4 -0
- package/node_modules/math-intrinsics/sign.d.ts +3 -0
- package/node_modules/math-intrinsics/sign.js +11 -0
- package/node_modules/math-intrinsics/test/index.js +192 -0
- package/node_modules/math-intrinsics/tsconfig.json +3 -0
- package/node_modules/miller-rabin/node_modules/bn.js/lib/bn.js +6 -5
- package/node_modules/miller-rabin/node_modules/bn.js/package.json +1 -1
- package/node_modules/miller-rabin/node_modules/bn.js/util/genCombMulTo.js +65 -0
- package/node_modules/miller-rabin/node_modules/bn.js/util/genCombMulTo10.js +65 -0
- package/node_modules/object-inspect/CHANGELOG.md +20 -0
- package/node_modules/object-inspect/index.js +27 -10
- package/node_modules/object-inspect/package.json +9 -8
- package/node_modules/object-inspect/test/quoteStyle.js +9 -0
- package/node_modules/object-inspect/test/values.js +50 -0
- package/node_modules/object-is/.eslintrc +1 -1
- package/node_modules/object-is/.nycrc +0 -4
- package/node_modules/object-is/CHANGELOG.md +25 -0
- package/node_modules/object-is/README.md +20 -20
- package/node_modules/object-is/package.json +23 -14
- package/node_modules/object.assign/CHANGELOG.md +21 -0
- package/node_modules/object.assign/dist/browser.js +495 -135
- package/node_modules/object.assign/implementation.js +6 -6
- package/node_modules/object.assign/package.json +14 -14
- package/node_modules/object.assign/test/tests.js +2 -2
- package/node_modules/possible-typed-array-names/.eslintrc +5 -0
- package/node_modules/possible-typed-array-names/.github/FUNDING.yml +12 -0
- package/node_modules/possible-typed-array-names/CHANGELOG.md +29 -0
- package/node_modules/possible-typed-array-names/LICENSE +21 -0
- package/node_modules/possible-typed-array-names/README.md +50 -0
- package/node_modules/possible-typed-array-names/index.d.ts +16 -0
- package/node_modules/possible-typed-array-names/index.js +17 -0
- package/node_modules/possible-typed-array-names/package.json +84 -0
- package/node_modules/possible-typed-array-names/test/index.js +19 -0
- package/node_modules/possible-typed-array-names/tsconfig.json +9 -0
- package/node_modules/public-encrypt/node_modules/bn.js/lib/bn.js +6 -5
- package/node_modules/public-encrypt/node_modules/bn.js/package.json +1 -1
- package/node_modules/public-encrypt/node_modules/bn.js/util/genCombMulTo.js +65 -0
- package/node_modules/public-encrypt/node_modules/bn.js/util/genCombMulTo10.js +65 -0
- package/node_modules/qs/.eslintrc +1 -0
- package/node_modules/qs/CHANGELOG.md +22 -0
- package/node_modules/qs/README.md +25 -1
- package/node_modules/qs/dist/qs.js +95 -44
- package/node_modules/qs/lib/parse.js +44 -12
- package/node_modules/qs/lib/stringify.js +11 -6
- package/node_modules/qs/lib/utils.js +7 -4
- package/node_modules/qs/package.json +9 -7
- package/node_modules/qs/test/parse.js +133 -27
- package/node_modules/qs/test/stringify.js +19 -11
- package/node_modules/qs/test/utils.js +126 -0
- package/node_modules/safe-regex-test/.eslintrc +9 -0
- package/node_modules/safe-regex-test/.github/FUNDING.yml +12 -0
- package/node_modules/safe-regex-test/.nycrc +13 -0
- package/node_modules/safe-regex-test/CHANGELOG.md +55 -0
- package/node_modules/safe-regex-test/LICENSE +21 -0
- package/node_modules/safe-regex-test/README.md +46 -0
- package/node_modules/safe-regex-test/index.d.ts +3 -0
- package/node_modules/safe-regex-test/index.js +17 -0
- package/node_modules/safe-regex-test/package.json +87 -0
- package/node_modules/safe-regex-test/test/index.js +41 -0
- package/node_modules/safe-regex-test/tsconfig.json +9 -0
- package/node_modules/side-channel/.eslintrc +1 -0
- package/node_modules/side-channel/CHANGELOG.md +15 -0
- package/node_modules/side-channel/README.md +60 -1
- package/node_modules/side-channel/index.d.ts +9 -22
- package/node_modules/side-channel/index.js +20 -106
- package/node_modules/side-channel/package.json +20 -19
- package/node_modules/side-channel/test/index.js +76 -55
- package/node_modules/side-channel/tsconfig.json +2 -43
- package/node_modules/side-channel-list/.editorconfig +9 -0
- package/node_modules/side-channel-list/.eslintrc +11 -0
- package/node_modules/side-channel-list/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel-list/.nycrc +13 -0
- package/node_modules/side-channel-list/CHANGELOG.md +15 -0
- package/node_modules/side-channel-list/LICENSE +21 -0
- package/node_modules/side-channel-list/README.md +62 -0
- package/node_modules/side-channel-list/index.d.ts +13 -0
- package/node_modules/side-channel-list/index.js +113 -0
- package/node_modules/side-channel-list/list.d.ts +14 -0
- package/node_modules/side-channel-list/package.json +77 -0
- package/node_modules/side-channel-list/test/index.js +104 -0
- package/node_modules/side-channel-list/tsconfig.json +9 -0
- package/node_modules/side-channel-map/.editorconfig +9 -0
- package/node_modules/side-channel-map/.eslintrc +11 -0
- package/node_modules/side-channel-map/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel-map/.nycrc +13 -0
- package/node_modules/side-channel-map/CHANGELOG.md +22 -0
- package/node_modules/side-channel-map/LICENSE +21 -0
- package/node_modules/side-channel-map/README.md +62 -0
- package/node_modules/side-channel-map/index.d.ts +15 -0
- package/node_modules/side-channel-map/index.js +68 -0
- package/node_modules/side-channel-map/package.json +80 -0
- package/node_modules/side-channel-map/test/index.js +114 -0
- package/node_modules/side-channel-map/tsconfig.json +9 -0
- package/node_modules/side-channel-weakmap/.editorconfig +9 -0
- package/node_modules/side-channel-weakmap/.eslintrc +12 -0
- package/node_modules/side-channel-weakmap/.github/FUNDING.yml +12 -0
- package/node_modules/side-channel-weakmap/.nycrc +13 -0
- package/node_modules/side-channel-weakmap/CHANGELOG.md +28 -0
- package/node_modules/side-channel-weakmap/LICENSE +21 -0
- package/node_modules/side-channel-weakmap/README.md +62 -0
- package/node_modules/side-channel-weakmap/index.d.ts +15 -0
- package/node_modules/side-channel-weakmap/index.js +84 -0
- package/node_modules/side-channel-weakmap/package.json +87 -0
- package/node_modules/side-channel-weakmap/test/index.js +114 -0
- package/node_modules/side-channel-weakmap/tsconfig.json +9 -0
- package/node_modules/which-typed-array/.eslintrc +1 -0
- package/node_modules/which-typed-array/CHANGELOG.md +57 -0
- package/node_modules/which-typed-array/index.d.ts +62 -0
- package/node_modules/which-typed-array/index.js +50 -25
- package/node_modules/which-typed-array/package.json +28 -13
- package/node_modules/which-typed-array/test/index.js +7 -1
- package/node_modules/which-typed-array/tsconfig.json +9 -0
- package/package.json +2 -3
- package/node_modules/@meteorjs/browserify-sign/node_modules/bn.js/README.md +0 -214
- package/node_modules/@meteorjs/browserify-sign/node_modules/bn.js/lib/bn.js +0 -3547
- package/node_modules/@meteorjs/browserify-sign/node_modules/bn.js/package.json +0 -39
- package/node_modules/@meteorjs/browserify-sign/node_modules/hash-base/LICENSE +0 -21
- package/node_modules/@meteorjs/browserify-sign/node_modules/hash-base/README.md +0 -48
- package/node_modules/@meteorjs/browserify-sign/node_modules/hash-base/index.js +0 -138
- package/node_modules/@meteorjs/browserify-sign/node_modules/hash-base/package.json +0 -42
- package/node_modules/@meteorjs/crypto-browserify/node_modules/hash-base/README.md +0 -48
- package/node_modules/@meteorjs/crypto-browserify/node_modules/hash-base/index.js +0 -95
- package/node_modules/@meteorjs/crypto-browserify/node_modules/hash-base/package.json +0 -41
- package/node_modules/available-typed-arrays/.eslintignore +0 -1
- package/node_modules/bn.js/CHANGELOG.md +0 -51
- package/node_modules/cipher-base/.npmignore +0 -1
- package/node_modules/cipher-base/.travis.yml +0 -6
- package/node_modules/cipher-base/test.js +0 -111
- package/node_modules/elliptic/node_modules/bn.js/README.md +0 -200
- package/node_modules/elliptic/node_modules/bn.js/lib/bn.js +0 -3446
- package/node_modules/elliptic/node_modules/bn.js/package.json +0 -36
- package/node_modules/elliptic/package.json +0 -56
- package/node_modules/for-each/.travis.yml +0 -45
- package/node_modules/for-each/test/.eslintrc +0 -8
- package/node_modules/has-proto/CHANGELOG.md +0 -23
- package/node_modules/has-proto/README.md +0 -38
- package/node_modules/has-proto/index.js +0 -11
- package/node_modules/has-proto/test/index.js +0 -19
- package/node_modules/hasown/index.d.ts.map +0 -1
- package/node_modules/is-arguments/.eslintignore +0 -1
- package/node_modules/is-generator-function/.eslintignore +0 -1
- package/node_modules/object-is/.eslintignore +0 -1
- package/node_modules/object.assign/test.html +0 -18458
- package/node_modules/parse-asn1/node_modules/hash-base/LICENSE +0 -21
- package/node_modules/parse-asn1/node_modules/hash-base/README.md +0 -48
- package/node_modules/parse-asn1/node_modules/hash-base/index.js +0 -95
- package/node_modules/parse-asn1/node_modules/hash-base/package.json +0 -41
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/README.md +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/curve/base.js +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/curve/edwards.js +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/curve/index.js +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/curve/mont.js +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/curve/short.js +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/curves.js +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/ec/index.js +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/ec/key.js +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/ec/signature.js +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/eddsa/index.js +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/eddsa/key.js +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/eddsa/signature.js +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/precomputed/secp256k1.js +0 -0
- /package/node_modules/{elliptic → @meteorjs/browserify-sign/elliptic}/lib/elliptic/utils.js +0 -0
- /package/node_modules/{has-proto → dunder-proto}/.eslintrc +0 -0
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html>
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<title>scrypt-async Unit Tests</title>
|
|
6
|
+
<link rel="stylesheet" href="lib/mocha.css" />
|
|
7
|
+
</head>
|
|
8
|
+
<body>
|
|
9
|
+
<div id="mocha"></div>
|
|
10
|
+
<script src="lib/mocha.js"></script>
|
|
11
|
+
<script>
|
|
12
|
+
mocha.setup('bdd');
|
|
13
|
+
mocha.timeout(20000);
|
|
14
|
+
</script>
|
|
15
|
+
<script src="lib/unittests-bundle.js"></script>
|
|
16
|
+
<script>
|
|
17
|
+
mocha.setup('bdd');
|
|
18
|
+
mocha.timeout(20000);
|
|
19
|
+
|
|
20
|
+
var runner = mocha.run();
|
|
21
|
+
var failedTests = [];
|
|
22
|
+
runner.on('end', function(){
|
|
23
|
+
window.mochaResults = runner.stats;
|
|
24
|
+
window.mochaResults.reports = failedTests;
|
|
25
|
+
});
|
|
26
|
+
runner.on('fail', function(test, err) {
|
|
27
|
+
var flattenTitles = function(test) {
|
|
28
|
+
var titles = [];
|
|
29
|
+
while (test.parent.title) {
|
|
30
|
+
titles.push(test.parent.title);
|
|
31
|
+
test = test.parent;
|
|
32
|
+
}
|
|
33
|
+
return titles.reverse();
|
|
34
|
+
};
|
|
35
|
+
failedTests.push({name: test.title, result: false, message: err.message, stack: err.stack, titles: flattenTitles(test)});
|
|
36
|
+
});
|
|
37
|
+
</script>
|
|
38
|
+
</body>
|
|
39
|
+
</html>
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meteorjs/create-ecdh",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.5",
|
|
4
4
|
"description": "createECDH but browserifiable",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"browser": "browser.js",
|
|
7
7
|
"scripts": {
|
|
8
|
-
"test": "
|
|
8
|
+
"test": "node test.js | tspec"
|
|
9
9
|
},
|
|
10
10
|
"repository": {
|
|
11
11
|
"type": "git",
|
|
@@ -24,12 +24,30 @@
|
|
|
24
24
|
},
|
|
25
25
|
"homepage": "https://github.com/crypto-browserify/createECDH",
|
|
26
26
|
"dependencies": {
|
|
27
|
-
"bn.js": "^4.
|
|
28
|
-
"
|
|
27
|
+
"bn.js": "^4.11.9",
|
|
28
|
+
"brorand": "^1.1.0",
|
|
29
|
+
"hash.js": "^1.0.0",
|
|
30
|
+
"hmac-drbg": "^1.0.1",
|
|
31
|
+
"inherits": "^2.0.4",
|
|
32
|
+
"minimalistic-assert": "^1.0.1",
|
|
33
|
+
"minimalistic-crypto-utils": "^1.0.1"
|
|
29
34
|
},
|
|
30
35
|
"devDependencies": {
|
|
31
36
|
"tap-spec": "^1.0.1",
|
|
32
37
|
"tape": "^3.0.1",
|
|
33
|
-
"standard": "^5.4.1"
|
|
38
|
+
"standard": "^5.4.1",
|
|
39
|
+
"brfs": "^2.0.2",
|
|
40
|
+
"coveralls": "^3.1.0",
|
|
41
|
+
"eslint": "^7.6.0",
|
|
42
|
+
"grunt": "^1.2.1",
|
|
43
|
+
"grunt-browserify": "^5.3.0",
|
|
44
|
+
"grunt-cli": "^1.3.2",
|
|
45
|
+
"grunt-contrib-connect": "^3.0.0",
|
|
46
|
+
"grunt-contrib-copy": "^1.0.0",
|
|
47
|
+
"grunt-contrib-uglify": "^5.0.0",
|
|
48
|
+
"grunt-mocha-istanbul": "^5.0.2",
|
|
49
|
+
"grunt-saucelabs": "^9.0.1",
|
|
50
|
+
"istanbul": "^0.4.5",
|
|
51
|
+
"mocha": "^8.0.1"
|
|
34
52
|
}
|
|
35
53
|
}
|
|
@@ -452,16 +452,16 @@
|
|
|
452
452
|
var w = this.words[i];
|
|
453
453
|
var word = (((w << off) | carry) & 0xffffff).toString(16);
|
|
454
454
|
carry = (w >>> (24 - off)) & 0xffffff;
|
|
455
|
-
if (carry !== 0 || i !== this.length - 1) {
|
|
456
|
-
out = zeros[6 - word.length] + word + out;
|
|
457
|
-
} else {
|
|
458
|
-
out = word + out;
|
|
459
|
-
}
|
|
460
455
|
off += 2;
|
|
461
456
|
if (off >= 26) {
|
|
462
457
|
off -= 26;
|
|
463
458
|
i--;
|
|
464
459
|
}
|
|
460
|
+
if (carry !== 0 || i !== this.length - 1) {
|
|
461
|
+
out = zeros[6 - word.length] + word + out;
|
|
462
|
+
} else {
|
|
463
|
+
out = word + out;
|
|
464
|
+
}
|
|
465
465
|
}
|
|
466
466
|
if (carry !== 0) {
|
|
467
467
|
out = carry.toString(16) + out;
|
|
@@ -1921,6 +1921,7 @@
|
|
|
1921
1921
|
this.words[i] = carry;
|
|
1922
1922
|
this.length++;
|
|
1923
1923
|
}
|
|
1924
|
+
this.length = num === 0 ? 1 : this.length;
|
|
1924
1925
|
|
|
1925
1926
|
return this;
|
|
1926
1927
|
};
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
// NOTE: This could be potentionally used to generate loop-less multiplications
|
|
4
|
+
function genCombMulTo (alen, blen) {
|
|
5
|
+
var len = alen + blen - 1;
|
|
6
|
+
var src = [
|
|
7
|
+
'var a = self.words;',
|
|
8
|
+
'var b = num.words;',
|
|
9
|
+
'var o = out.words;',
|
|
10
|
+
'var c = 0;',
|
|
11
|
+
'var lo;',
|
|
12
|
+
'var mid;',
|
|
13
|
+
'var hi;'
|
|
14
|
+
];
|
|
15
|
+
for (var i = 0; i < alen; i++) {
|
|
16
|
+
src.push('var a' + i + ' = a[' + i + '] | 0;');
|
|
17
|
+
src.push('var al' + i + ' = a' + i + ' & 0x1fff;');
|
|
18
|
+
src.push('var ah' + i + ' = a' + i + ' >>> 13;');
|
|
19
|
+
}
|
|
20
|
+
for (i = 0; i < blen; i++) {
|
|
21
|
+
src.push('var b' + i + ' = b[' + i + '] | 0;');
|
|
22
|
+
src.push('var bl' + i + ' = b' + i + ' & 0x1fff;');
|
|
23
|
+
src.push('var bh' + i + ' = b' + i + ' >>> 13;');
|
|
24
|
+
}
|
|
25
|
+
src.push('');
|
|
26
|
+
src.push('out.negative = self.negative ^ num.negative;');
|
|
27
|
+
src.push('out.length = ' + len + ';');
|
|
28
|
+
|
|
29
|
+
for (var k = 0; k < len; k++) {
|
|
30
|
+
var minJ = Math.max(0, k - alen + 1);
|
|
31
|
+
var maxJ = Math.min(k, blen - 1);
|
|
32
|
+
|
|
33
|
+
src.push('\/* k = ' + k + ' *\/');
|
|
34
|
+
src.push('var w' + k + ' = c;');
|
|
35
|
+
src.push('c = 0;');
|
|
36
|
+
for (var j = minJ; j <= maxJ; j++) {
|
|
37
|
+
i = k - j;
|
|
38
|
+
|
|
39
|
+
src.push('lo = Math.imul(al' + i + ', bl' + j + ');');
|
|
40
|
+
src.push('mid = Math.imul(al' + i + ', bh' + j + ');');
|
|
41
|
+
src.push('mid = (mid + Math.imul(ah' + i + ', bl' + j + ')) | 0;');
|
|
42
|
+
src.push('hi = Math.imul(ah' + i + ', bh' + j + ');');
|
|
43
|
+
|
|
44
|
+
src.push('w' + k + ' = (w' + k + ' + lo) | 0;');
|
|
45
|
+
src.push('w' + k + ' = (w' + k + ' + ((mid & 0x1fff) << 13)) | 0;');
|
|
46
|
+
src.push('c = (c + hi) | 0;');
|
|
47
|
+
src.push('c = (c + (mid >>> 13)) | 0;');
|
|
48
|
+
src.push('c = (c + (w' + k + ' >>> 26)) | 0;');
|
|
49
|
+
src.push('w' + k + ' &= 0x3ffffff;');
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
// Store in separate step for better memory access
|
|
53
|
+
for (k = 0; k < len; k++) {
|
|
54
|
+
src.push('o[' + k + '] = w' + k + ';');
|
|
55
|
+
}
|
|
56
|
+
src.push('if (c !== 0) {',
|
|
57
|
+
' o[' + k + '] = c;',
|
|
58
|
+
' out.length++;',
|
|
59
|
+
'}',
|
|
60
|
+
'return out;');
|
|
61
|
+
|
|
62
|
+
return src.join('\n');
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
console.log(genCombMulTo(10, 10));
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
function genCombMulTo (alen, blen) {
|
|
4
|
+
var len = alen + blen - 1;
|
|
5
|
+
var src = [
|
|
6
|
+
'var a = self.words;',
|
|
7
|
+
'var b = num.words;',
|
|
8
|
+
'var o = out.words;',
|
|
9
|
+
'var c = 0;',
|
|
10
|
+
'var lo;',
|
|
11
|
+
'var mid;',
|
|
12
|
+
'var hi;'
|
|
13
|
+
];
|
|
14
|
+
for (var i = 0; i < alen; i++) {
|
|
15
|
+
src.push('var a' + i + ' = a[' + i + '] | 0;');
|
|
16
|
+
src.push('var al' + i + ' = a' + i + ' & 0x1fff;');
|
|
17
|
+
src.push('var ah' + i + ' = a' + i + ' >>> 13;');
|
|
18
|
+
}
|
|
19
|
+
for (i = 0; i < blen; i++) {
|
|
20
|
+
src.push('var b' + i + ' = b[' + i + '] | 0;');
|
|
21
|
+
src.push('var bl' + i + ' = b' + i + ' & 0x1fff;');
|
|
22
|
+
src.push('var bh' + i + ' = b' + i + ' >>> 13;');
|
|
23
|
+
}
|
|
24
|
+
src.push('');
|
|
25
|
+
src.push('out.negative = self.negative ^ num.negative;');
|
|
26
|
+
src.push('out.length = ' + len + ';');
|
|
27
|
+
|
|
28
|
+
for (var k = 0; k < len; k++) {
|
|
29
|
+
var minJ = Math.max(0, k - alen + 1);
|
|
30
|
+
var maxJ = Math.min(k, blen - 1);
|
|
31
|
+
|
|
32
|
+
src.push('\/* k = ' + k + ' *\/');
|
|
33
|
+
src.push('lo = Math.imul(al' + (k - minJ) + ', bl' + minJ + ');');
|
|
34
|
+
src.push('mid = Math.imul(al' + (k - minJ) + ', bh' + minJ + ');');
|
|
35
|
+
src.push(
|
|
36
|
+
'mid = (mid + Math.imul(ah' + (k - minJ) + ', bl' + minJ + ')) | 0;');
|
|
37
|
+
src.push('hi = Math.imul(ah' + (k - minJ) + ', bh' + minJ + ');');
|
|
38
|
+
|
|
39
|
+
for (var j = minJ + 1; j <= maxJ; j++) {
|
|
40
|
+
i = k - j;
|
|
41
|
+
|
|
42
|
+
src.push('lo = (lo + Math.imul(al' + i + ', bl' + j + ')) | 0;');
|
|
43
|
+
src.push('mid = (mid + Math.imul(al' + i + ', bh' + j + ')) | 0;');
|
|
44
|
+
src.push('mid = (mid + Math.imul(ah' + i + ', bl' + j + ')) | 0;');
|
|
45
|
+
src.push('hi = (hi + Math.imul(ah' + i + ', bh' + j + ')) | 0;');
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
src.push('var w' + k + ' = (((c + lo) | 0) + ((mid & 0x1fff) << 13)) | 0;');
|
|
49
|
+
src.push('c = (((hi + (mid >>> 13)) | 0) + (w' + k + ' >>> 26)) | 0;');
|
|
50
|
+
src.push('w' + k + ' &= 0x3ffffff;');
|
|
51
|
+
}
|
|
52
|
+
// Store in separate step for better memory access
|
|
53
|
+
for (k = 0; k < len; k++) {
|
|
54
|
+
src.push('o[' + k + '] = w' + k + ';');
|
|
55
|
+
}
|
|
56
|
+
src.push('if (c !== 0) {',
|
|
57
|
+
' o[' + k + '] = c;',
|
|
58
|
+
' out.length++;',
|
|
59
|
+
'}',
|
|
60
|
+
'return out;');
|
|
61
|
+
|
|
62
|
+
return src.join('\n');
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
console.log(genCombMulTo(10, 10));
|
|
@@ -5,6 +5,27 @@ All notable changes to this project will be documented in this file.
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|
6
6
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
7
|
|
|
8
|
+
## [v1.0.7](https://github.com/inspect-js/available-typed-arrays/compare/v1.0.6...v1.0.7) - 2024-02-19
|
|
9
|
+
|
|
10
|
+
### Commits
|
|
11
|
+
|
|
12
|
+
- [Refactor] use `possible-typed-array-names` [`ac86abf`](https://github.com/inspect-js/available-typed-arrays/commit/ac86abfd64c4b633fd6523cc4193f1913fd22666)
|
|
13
|
+
|
|
14
|
+
## [v1.0.6](https://github.com/inspect-js/available-typed-arrays/compare/v1.0.5...v1.0.6) - 2024-01-31
|
|
15
|
+
|
|
16
|
+
### Commits
|
|
17
|
+
|
|
18
|
+
- [actions] reuse common workflows [`1850353`](https://github.com/inspect-js/available-typed-arrays/commit/1850353ded0ceb4d02d9d05649da5b7f3a28c89f)
|
|
19
|
+
- [meta] use `npmignore` to autogenerate an npmignore file [`5c7de12`](https://github.com/inspect-js/available-typed-arrays/commit/5c7de120d22a5c35f703ba3f0b5287e5c5f38af6)
|
|
20
|
+
- [patch] add types [`fcfb0ea`](https://github.com/inspect-js/available-typed-arrays/commit/fcfb0ea21c9dc8459d68f8bb26679abb0bec71ca)
|
|
21
|
+
- [actions] update codecov uploader [`d844945`](https://github.com/inspect-js/available-typed-arrays/commit/d84494596881a298aabde9bd87e538ce10c6cd01)
|
|
22
|
+
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `array.prototype.every`, `safe-publish-latest`, `tape` [`a2be6f4`](https://github.com/inspect-js/available-typed-arrays/commit/a2be6f482010e920692d8f65fe1f193dbb73004d)
|
|
23
|
+
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `auto-changelog`, `tape` [`b283a3e`](https://github.com/inspect-js/available-typed-arrays/commit/b283a3e2176fbe8e431a27e20df21c831f216d5a)
|
|
24
|
+
- [actions] update rebase action to use reusable workflow [`0ad1f2d`](https://github.com/inspect-js/available-typed-arrays/commit/0ad1f2d82b11713ee48d9b37cb73fcc891bd9f4a)
|
|
25
|
+
- [Dev Deps] update `@ljharb/eslint-config`, `array.prototype.every`, `aud`, `tape` [`cd36e81`](https://github.com/inspect-js/available-typed-arrays/commit/cd36e8131076dd4e67a88b259f829067fa56c139)
|
|
26
|
+
- [meta] simplify "exports" [`f696e5f`](https://github.com/inspect-js/available-typed-arrays/commit/f696e5ff9ded838e192ade4e8550a890c4f35eb0)
|
|
27
|
+
- [Dev Deps] update `aud`, `npmignore`, `tape` [`bf20080`](https://github.com/inspect-js/available-typed-arrays/commit/bf200809aea3107b31fc8817122c693e099be30e)
|
|
28
|
+
|
|
8
29
|
## [v1.0.5](https://github.com/inspect-js/available-typed-arrays/compare/v1.0.4...v1.0.5) - 2021-08-30
|
|
9
30
|
|
|
10
31
|
### Fixed
|
|
@@ -17,19 +17,22 @@ Returns an array of Typed Array names that are available in the current environm
|
|
|
17
17
|
var availableTypedArrays = require('available-typed-arrays');
|
|
18
18
|
var assert = require('assert');
|
|
19
19
|
|
|
20
|
-
assert.deepStrictEqual(
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
20
|
+
assert.deepStrictEqual(
|
|
21
|
+
availableTypedArrays().sort(),
|
|
22
|
+
[
|
|
23
|
+
'Int8Array',
|
|
24
|
+
'Uint8Array',
|
|
25
|
+
'Uint8ClampedArray',
|
|
26
|
+
'Int16Array',
|
|
27
|
+
'Uint16Array',
|
|
28
|
+
'Int32Array',
|
|
29
|
+
'Uint32Array',
|
|
30
|
+
'Float32Array',
|
|
31
|
+
'Float64Array',
|
|
32
|
+
'BigInt64Array',
|
|
33
|
+
'BigUint64Array'
|
|
34
|
+
].sort()
|
|
35
|
+
);
|
|
33
36
|
```
|
|
34
37
|
|
|
35
38
|
## Tests
|
|
@@ -1,25 +1,15 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var possibleNames =
|
|
4
|
-
'BigInt64Array',
|
|
5
|
-
'BigUint64Array',
|
|
6
|
-
'Float32Array',
|
|
7
|
-
'Float64Array',
|
|
8
|
-
'Int16Array',
|
|
9
|
-
'Int32Array',
|
|
10
|
-
'Int8Array',
|
|
11
|
-
'Uint16Array',
|
|
12
|
-
'Uint32Array',
|
|
13
|
-
'Uint8Array',
|
|
14
|
-
'Uint8ClampedArray'
|
|
15
|
-
];
|
|
3
|
+
var possibleNames = require('possible-typed-array-names');
|
|
16
4
|
|
|
17
5
|
var g = typeof globalThis === 'undefined' ? global : globalThis;
|
|
18
6
|
|
|
7
|
+
/** @type {import('.')} */
|
|
19
8
|
module.exports = function availableTypedArrays() {
|
|
20
|
-
var out = [];
|
|
9
|
+
var /** @type {ReturnType<typeof availableTypedArrays>} */ out = [];
|
|
21
10
|
for (var i = 0; i < possibleNames.length; i++) {
|
|
22
11
|
if (typeof g[possibleNames[i]] === 'function') {
|
|
12
|
+
// @ts-expect-error
|
|
23
13
|
out[out.length] = possibleNames[i];
|
|
24
14
|
}
|
|
25
15
|
}
|
|
@@ -1,25 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "available-typed-arrays",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.7",
|
|
4
4
|
"description": "Returns an array of Typed Array names that are available in the current environment",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "commonjs",
|
|
7
7
|
"exports": {
|
|
8
|
-
".":
|
|
9
|
-
{
|
|
10
|
-
"default": "./index.js"
|
|
11
|
-
},
|
|
12
|
-
"./index.js"
|
|
13
|
-
],
|
|
14
|
-
"./package": "./package.json",
|
|
8
|
+
".": "./index.js",
|
|
15
9
|
"./package.json": "./package.json"
|
|
16
10
|
},
|
|
11
|
+
"types": "./index.d.ts",
|
|
17
12
|
"sideEffects": false,
|
|
18
13
|
"scripts": {
|
|
14
|
+
"prepack": "npmignore --auto --commentLines=autogenerated",
|
|
19
15
|
"prepublish": "not-in-publish || npm run prepublishOnly",
|
|
20
16
|
"prepublishOnly": "safe-publish-latest",
|
|
21
17
|
"prelint": "evalmd README.md",
|
|
22
18
|
"lint": "eslint --ext=js,mjs .",
|
|
19
|
+
"postlint": "tsc -p .",
|
|
23
20
|
"pretest": "npm run lint",
|
|
24
21
|
"tests-only": "nyc tape 'test/**/*.js'",
|
|
25
22
|
"test:harmony": "nyc node --harmony --es-staging test",
|
|
@@ -60,16 +57,22 @@
|
|
|
60
57
|
"node": ">= 0.4"
|
|
61
58
|
},
|
|
62
59
|
"devDependencies": {
|
|
63
|
-
"@ljharb/eslint-config": "^
|
|
64
|
-
"array.prototype.every": "^1.1.
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
"
|
|
60
|
+
"@ljharb/eslint-config": "^21.1.0",
|
|
61
|
+
"@types/array.prototype.every": "^1.1.1",
|
|
62
|
+
"@types/isarray": "^2.0.2",
|
|
63
|
+
"@types/tape": "^5.6.4",
|
|
64
|
+
"array.prototype.every": "^1.1.5",
|
|
65
|
+
"aud": "^2.0.4",
|
|
66
|
+
"auto-changelog": "^2.4.0",
|
|
67
|
+
"eslint": "=8.8.0",
|
|
68
68
|
"evalmd": "^0.0.19",
|
|
69
|
+
"in-publish": "^2.0.1",
|
|
69
70
|
"isarray": "^2.0.5",
|
|
71
|
+
"npmignore": "^0.3.1",
|
|
70
72
|
"nyc": "^10.3.2",
|
|
71
|
-
"safe-publish-latest": "^
|
|
72
|
-
"tape": "^5.
|
|
73
|
+
"safe-publish-latest": "^2.0.0",
|
|
74
|
+
"tape": "^5.7.4",
|
|
75
|
+
"typescript": "^5.4.0-dev.20240131"
|
|
73
76
|
},
|
|
74
77
|
"auto-changelog": {
|
|
75
78
|
"output": "CHANGELOG.md",
|
|
@@ -78,5 +81,13 @@
|
|
|
78
81
|
"commitLimit": false,
|
|
79
82
|
"backfillLimit": false,
|
|
80
83
|
"hideCredit": true
|
|
84
|
+
},
|
|
85
|
+
"publishConfig": {
|
|
86
|
+
"ignore": [
|
|
87
|
+
".github/workflows"
|
|
88
|
+
]
|
|
89
|
+
},
|
|
90
|
+
"dependencies": {
|
|
91
|
+
"possible-typed-array-names": "^1.0.0"
|
|
81
92
|
}
|
|
82
93
|
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
/* Visit https://aka.ms/tsconfig to read more about this file */
|
|
4
|
+
|
|
5
|
+
/* Projects */
|
|
6
|
+
|
|
7
|
+
/* Language and Environment */
|
|
8
|
+
"target": "es2016", /* Set the JavaScript language version for emitted JavaScript and include compatible library declarations. */
|
|
9
|
+
// "lib": [], /* Specify a set of bundled library declaration files that describe the target runtime environment. */
|
|
10
|
+
// "noLib": true, /* Disable including any library files, including the default lib.d.ts. */
|
|
11
|
+
"useDefineForClassFields": true, /* Emit ECMAScript-standard-compliant class fields. */
|
|
12
|
+
// "moduleDetection": "auto", /* Control what method is used to detect module-format JS files. */
|
|
13
|
+
|
|
14
|
+
/* Modules */
|
|
15
|
+
"module": "commonjs", /* Specify what module code is generated. */
|
|
16
|
+
// "rootDir": "./", /* Specify the root folder within your source files. */
|
|
17
|
+
// "moduleResolution": "node10", /* Specify how TypeScript looks up a file from a given module specifier. */
|
|
18
|
+
// "baseUrl": "./", /* Specify the base directory to resolve non-relative module names. */
|
|
19
|
+
// "paths": {}, /* Specify a set of entries that re-map imports to additional lookup locations. */
|
|
20
|
+
// "rootDirs": [], /* Allow multiple folders to be treated as one when resolving modules. */
|
|
21
|
+
"typeRoots": ["types"], /* Specify multiple folders that act like './node_modules/@types'. */
|
|
22
|
+
"resolveJsonModule": true, /* Enable importing .json files. */
|
|
23
|
+
// "allowArbitraryExtensions": true, /* Enable importing files with any extension, provided a declaration file is present. */
|
|
24
|
+
|
|
25
|
+
/* JavaScript Support */
|
|
26
|
+
"allowJs": true, /* Allow JavaScript files to be a part of your program. Use the 'checkJS' option to get errors from these files. */
|
|
27
|
+
"checkJs": true, /* Enable error reporting in type-checked JavaScript files. */
|
|
28
|
+
"maxNodeModuleJsDepth": 1, /* Specify the maximum folder depth used for checking JavaScript files from 'node_modules'. Only applicable with 'allowJs'. */
|
|
29
|
+
|
|
30
|
+
/* Emit */
|
|
31
|
+
"declaration": true, /* Generate .d.ts files from TypeScript and JavaScript files in your project. */
|
|
32
|
+
"declarationMap": true, /* Create sourcemaps for d.ts files. */
|
|
33
|
+
"noEmit": true, /* Disable emitting files from a compilation. */
|
|
34
|
+
|
|
35
|
+
/* Interop Constraints */
|
|
36
|
+
"allowSyntheticDefaultImports": true, /* Allow 'import x from y' when a module doesn't have a default export. */
|
|
37
|
+
"esModuleInterop": true, /* Emit additional JavaScript to ease support for importing CommonJS modules. This enables 'allowSyntheticDefaultImports' for type compatibility. */
|
|
38
|
+
"forceConsistentCasingInFileNames": true, /* Ensure that casing is correct in imports. */
|
|
39
|
+
|
|
40
|
+
/* Type Checking */
|
|
41
|
+
"strict": true, /* Enable all strict type-checking options. */
|
|
42
|
+
|
|
43
|
+
/* Completeness */
|
|
44
|
+
//"skipLibCheck": true /* Skip type checking all .d.ts files. */
|
|
45
|
+
},
|
|
46
|
+
"exclude": [
|
|
47
|
+
"coverage"
|
|
48
|
+
]
|
|
49
|
+
}
|
|
@@ -21,11 +21,17 @@ console.log(res.toString(10)); // 57047
|
|
|
21
21
|
|
|
22
22
|
**Note**: decimals are not supported in this library.
|
|
23
23
|
|
|
24
|
+
## Sponsors
|
|
25
|
+
|
|
26
|
+
[](https://scoutapm.com/)
|
|
27
|
+
My Open Source work is supported by [Scout APM](https://scoutapm.com/) and
|
|
28
|
+
[other sponsors](https://github.com/sponsors/indutny).
|
|
29
|
+
|
|
24
30
|
## Notation
|
|
25
31
|
|
|
26
32
|
### Prefixes
|
|
27
33
|
|
|
28
|
-
There are several prefixes to instructions that affect the way
|
|
34
|
+
There are several prefixes to instructions that affect the way they work. Here
|
|
29
35
|
is the list of them in the order of appearance in the function name:
|
|
30
36
|
|
|
31
37
|
* `i` - perform operation in-place, storing the result in the host object (on
|
|
@@ -38,7 +44,7 @@ is the list of them in the order of appearance in the function name:
|
|
|
38
44
|
### Postfixes
|
|
39
45
|
|
|
40
46
|
* `n` - the argument of the function must be a plain JavaScript
|
|
41
|
-
Number. Decimals are not supported.
|
|
47
|
+
Number. Decimals are not supported. The number passed must be smaller than 0x4000000 (67_108_864). Otherwise, an error is thrown.
|
|
42
48
|
* `rn` - both argument and return value of the function are plain JavaScript
|
|
43
49
|
Numbers. Decimals are not supported.
|
|
44
50
|
|
|
@@ -50,7 +56,7 @@ is the list of them in the order of appearance in the function name:
|
|
|
50
56
|
|
|
51
57
|
## Instructions
|
|
52
58
|
|
|
53
|
-
Prefixes/postfixes are put in parens at the of the line. `endian` - could be
|
|
59
|
+
Prefixes/postfixes are put in parens at the end of the line. `endian` - could be
|
|
54
60
|
either `le` (little-endian) or `be` (big-endian).
|
|
55
61
|
|
|
56
62
|
### Utilities
|
|
@@ -63,7 +69,7 @@ either `le` (little-endian) or `be` (big-endian).
|
|
|
63
69
|
pad to length, throwing if already exceeding
|
|
64
70
|
* `a.toArrayLike(type, endian, length)` - convert to an instance of `type`,
|
|
65
71
|
which must behave like an `Array`
|
|
66
|
-
* `a.toBuffer(endian, length)` - convert to Node.js Buffer (if available). For
|
|
72
|
+
* `a.toBuffer(endian, length)` - convert to Node.js Buffer (if available). `length` in bytes. For
|
|
67
73
|
compatibility with browserify and similar tools, use this instead:
|
|
68
74
|
`a.toArrayLike(Buffer, endian, length)`
|
|
69
75
|
* `a.bitLength()` - get number of bits occupied
|
|
@@ -129,7 +135,7 @@ for [Mersenne Prime][1].
|
|
|
129
135
|
|
|
130
136
|
### Reduction context
|
|
131
137
|
|
|
132
|
-
To enable this
|
|
138
|
+
To enable this trick one should create a reduction context:
|
|
133
139
|
|
|
134
140
|
```js
|
|
135
141
|
var red = BN.red(num);
|
|
@@ -480,16 +480,16 @@
|
|
|
480
480
|
var w = this.words[i];
|
|
481
481
|
var word = (((w << off) | carry) & 0xffffff).toString(16);
|
|
482
482
|
carry = (w >>> (24 - off)) & 0xffffff;
|
|
483
|
-
if (carry !== 0 || i !== this.length - 1) {
|
|
484
|
-
out = zeros[6 - word.length] + word + out;
|
|
485
|
-
} else {
|
|
486
|
-
out = word + out;
|
|
487
|
-
}
|
|
488
483
|
off += 2;
|
|
489
484
|
if (off >= 26) {
|
|
490
485
|
off -= 26;
|
|
491
486
|
i--;
|
|
492
487
|
}
|
|
488
|
+
if (carry !== 0 || i !== this.length - 1) {
|
|
489
|
+
out = zeros[6 - word.length] + word + out;
|
|
490
|
+
} else {
|
|
491
|
+
out = word + out;
|
|
492
|
+
}
|
|
493
493
|
}
|
|
494
494
|
if (carry !== 0) {
|
|
495
495
|
out = carry.toString(16) + out;
|
|
@@ -2008,6 +2008,7 @@
|
|
|
2008
2008
|
this.words[i] = carry;
|
|
2009
2009
|
this.length++;
|
|
2010
2010
|
}
|
|
2011
|
+
this.length = num === 0 ? 1 : this.length;
|
|
2011
2012
|
|
|
2012
2013
|
return isNegNum ? this.ineg() : this;
|
|
2013
2014
|
};
|