speaker-calibration 2.1.3 → 2.1.5
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/dist/example/listener.html +29 -39
- package/dist/example/server.js +6 -4
- package/dist/example/speakerUI.js +7 -1
- package/dist/main.js +912 -912
- package/dist/node_modules/.bin/mime +12 -0
- package/dist/node_modules/.bin/mime.cmd +17 -0
- package/dist/node_modules/.bin/mime.ps1 +28 -0
- package/dist/node_modules/.package-lock.json +584 -0
- package/dist/node_modules/accepts/HISTORY.md +243 -0
- package/dist/node_modules/accepts/LICENSE +23 -0
- package/dist/node_modules/accepts/README.md +140 -0
- package/dist/node_modules/accepts/index.js +238 -0
- package/dist/node_modules/accepts/package.json +47 -0
- package/dist/node_modules/array-flatten/LICENSE +21 -0
- package/dist/node_modules/array-flatten/README.md +43 -0
- package/dist/node_modules/array-flatten/array-flatten.js +64 -0
- package/dist/node_modules/array-flatten/package.json +39 -0
- package/dist/node_modules/body-parser/HISTORY.md +657 -0
- package/dist/node_modules/body-parser/LICENSE +23 -0
- package/dist/node_modules/body-parser/README.md +464 -0
- package/dist/node_modules/body-parser/SECURITY.md +25 -0
- package/dist/node_modules/body-parser/index.js +156 -0
- package/dist/node_modules/body-parser/lib/read.js +205 -0
- package/dist/node_modules/body-parser/lib/types/json.js +236 -0
- package/dist/node_modules/body-parser/lib/types/raw.js +101 -0
- package/dist/node_modules/body-parser/lib/types/text.js +121 -0
- package/dist/node_modules/body-parser/lib/types/urlencoded.js +284 -0
- package/dist/node_modules/body-parser/package.json +56 -0
- package/dist/node_modules/bytes/History.md +97 -0
- package/dist/node_modules/bytes/LICENSE +23 -0
- package/dist/node_modules/bytes/Readme.md +152 -0
- package/dist/node_modules/bytes/index.js +170 -0
- package/dist/node_modules/bytes/package.json +42 -0
- package/dist/node_modules/call-bind/.eslintignore +1 -0
- package/dist/node_modules/call-bind/.eslintrc +17 -0
- package/dist/node_modules/call-bind/.github/FUNDING.yml +12 -0
- package/dist/node_modules/call-bind/.nycrc +13 -0
- package/dist/node_modules/call-bind/CHANGELOG.md +42 -0
- package/dist/node_modules/call-bind/LICENSE +21 -0
- package/dist/node_modules/call-bind/README.md +2 -0
- package/dist/node_modules/call-bind/callBound.js +15 -0
- package/dist/node_modules/call-bind/index.js +47 -0
- package/dist/node_modules/call-bind/package.json +80 -0
- package/dist/node_modules/call-bind/test/callBound.js +55 -0
- package/dist/node_modules/call-bind/test/index.js +66 -0
- package/dist/node_modules/content-disposition/HISTORY.md +60 -0
- package/dist/node_modules/content-disposition/LICENSE +22 -0
- package/dist/node_modules/content-disposition/README.md +142 -0
- package/dist/node_modules/content-disposition/index.js +458 -0
- package/dist/node_modules/content-disposition/package.json +44 -0
- package/dist/node_modules/content-type/HISTORY.md +24 -0
- package/dist/node_modules/content-type/LICENSE +22 -0
- package/dist/node_modules/content-type/README.md +92 -0
- package/dist/node_modules/content-type/index.js +222 -0
- package/dist/node_modules/content-type/package.json +40 -0
- package/dist/node_modules/cookie/HISTORY.md +142 -0
- package/dist/node_modules/cookie/LICENSE +24 -0
- package/dist/node_modules/cookie/README.md +302 -0
- package/dist/node_modules/cookie/SECURITY.md +25 -0
- package/dist/node_modules/cookie/index.js +270 -0
- package/dist/node_modules/cookie/package.json +44 -0
- package/dist/node_modules/cookie-signature/History.md +38 -0
- package/dist/node_modules/cookie-signature/Readme.md +42 -0
- package/dist/node_modules/cookie-signature/index.js +51 -0
- package/dist/node_modules/cookie-signature/package.json +18 -0
- package/dist/node_modules/debug/.coveralls.yml +1 -0
- package/dist/node_modules/debug/.eslintrc +11 -0
- package/dist/node_modules/debug/.travis.yml +14 -0
- package/dist/node_modules/debug/CHANGELOG.md +362 -0
- package/dist/node_modules/debug/LICENSE +19 -0
- package/dist/node_modules/debug/Makefile +50 -0
- package/dist/node_modules/debug/README.md +312 -0
- package/dist/node_modules/debug/component.json +19 -0
- package/dist/node_modules/debug/karma.conf.js +70 -0
- package/dist/node_modules/debug/node.js +1 -0
- package/dist/node_modules/debug/package.json +49 -0
- package/dist/node_modules/debug/src/browser.js +185 -0
- package/dist/node_modules/debug/src/debug.js +202 -0
- package/dist/node_modules/debug/src/index.js +10 -0
- package/dist/node_modules/debug/src/inspector-log.js +15 -0
- package/dist/node_modules/debug/src/node.js +248 -0
- package/dist/node_modules/depd/History.md +103 -0
- package/dist/node_modules/depd/LICENSE +22 -0
- package/dist/node_modules/depd/Readme.md +280 -0
- package/dist/node_modules/depd/index.js +538 -0
- package/dist/node_modules/depd/lib/browser/index.js +77 -0
- package/dist/node_modules/depd/package.json +45 -0
- package/dist/node_modules/destroy/LICENSE +23 -0
- package/dist/node_modules/destroy/README.md +63 -0
- package/dist/node_modules/destroy/index.js +209 -0
- package/dist/node_modules/destroy/package.json +48 -0
- package/dist/node_modules/ee-first/LICENSE +22 -0
- package/dist/node_modules/ee-first/README.md +80 -0
- package/dist/node_modules/ee-first/index.js +95 -0
- package/dist/node_modules/ee-first/package.json +29 -0
- package/dist/node_modules/encodeurl/HISTORY.md +14 -0
- package/dist/node_modules/encodeurl/LICENSE +22 -0
- package/dist/node_modules/encodeurl/README.md +128 -0
- package/dist/node_modules/encodeurl/index.js +60 -0
- package/dist/node_modules/encodeurl/package.json +40 -0
- package/dist/node_modules/escape-html/LICENSE +24 -0
- package/dist/node_modules/escape-html/Readme.md +43 -0
- package/dist/node_modules/escape-html/index.js +78 -0
- package/dist/node_modules/escape-html/package.json +24 -0
- package/dist/node_modules/etag/HISTORY.md +83 -0
- package/dist/node_modules/etag/LICENSE +22 -0
- package/dist/node_modules/etag/README.md +159 -0
- package/dist/node_modules/etag/index.js +131 -0
- package/dist/node_modules/etag/package.json +47 -0
- package/dist/node_modules/express/History.md +3588 -0
- package/dist/node_modules/express/LICENSE +24 -0
- package/dist/node_modules/express/Readme.md +166 -0
- package/dist/node_modules/express/index.js +11 -0
- package/dist/node_modules/express/lib/application.js +661 -0
- package/dist/node_modules/express/lib/express.js +116 -0
- package/dist/node_modules/express/lib/middleware/init.js +43 -0
- package/dist/node_modules/express/lib/middleware/query.js +47 -0
- package/dist/node_modules/express/lib/request.js +525 -0
- package/dist/node_modules/express/lib/response.js +1169 -0
- package/dist/node_modules/express/lib/router/index.js +673 -0
- package/dist/node_modules/express/lib/router/layer.js +181 -0
- package/dist/node_modules/express/lib/router/route.js +225 -0
- package/dist/node_modules/express/lib/utils.js +304 -0
- package/dist/node_modules/express/lib/view.js +182 -0
- package/dist/node_modules/express/package.json +99 -0
- package/dist/node_modules/finalhandler/HISTORY.md +195 -0
- package/dist/node_modules/finalhandler/LICENSE +22 -0
- package/dist/node_modules/finalhandler/README.md +147 -0
- package/dist/node_modules/finalhandler/SECURITY.md +25 -0
- package/dist/node_modules/finalhandler/index.js +336 -0
- package/dist/node_modules/finalhandler/package.json +46 -0
- package/dist/node_modules/forwarded/HISTORY.md +21 -0
- package/dist/node_modules/forwarded/LICENSE +22 -0
- package/dist/node_modules/forwarded/README.md +57 -0
- package/dist/node_modules/forwarded/index.js +90 -0
- package/dist/node_modules/forwarded/package.json +45 -0
- package/dist/node_modules/fresh/HISTORY.md +70 -0
- package/dist/node_modules/fresh/LICENSE +23 -0
- package/dist/node_modules/fresh/README.md +119 -0
- package/dist/node_modules/fresh/index.js +137 -0
- package/dist/node_modules/fresh/package.json +46 -0
- package/dist/node_modules/function-bind/.editorconfig +20 -0
- package/dist/node_modules/function-bind/.eslintrc +15 -0
- package/dist/node_modules/function-bind/.jscs.json +176 -0
- package/dist/node_modules/function-bind/.travis.yml +168 -0
- package/dist/node_modules/function-bind/LICENSE +20 -0
- package/dist/node_modules/function-bind/README.md +48 -0
- package/dist/node_modules/function-bind/implementation.js +52 -0
- package/dist/node_modules/function-bind/index.js +5 -0
- package/dist/node_modules/function-bind/package.json +63 -0
- package/dist/node_modules/function-bind/test/.eslintrc +9 -0
- package/dist/node_modules/function-bind/test/index.js +252 -0
- package/dist/node_modules/get-intrinsic/.eslintrc +37 -0
- package/dist/node_modules/get-intrinsic/.github/FUNDING.yml +12 -0
- package/dist/node_modules/get-intrinsic/.nycrc +9 -0
- package/dist/node_modules/get-intrinsic/CHANGELOG.md +98 -0
- package/dist/node_modules/get-intrinsic/LICENSE +21 -0
- package/dist/node_modules/get-intrinsic/README.md +71 -0
- package/dist/node_modules/get-intrinsic/index.js +334 -0
- package/dist/node_modules/get-intrinsic/package.json +91 -0
- package/dist/node_modules/get-intrinsic/test/GetIntrinsic.js +274 -0
- package/dist/node_modules/has/LICENSE-MIT +22 -0
- package/dist/node_modules/has/README.md +18 -0
- package/dist/node_modules/has/package.json +48 -0
- package/dist/node_modules/has/src/index.js +5 -0
- package/dist/node_modules/has/test/index.js +10 -0
- package/dist/node_modules/has-symbols/.eslintrc +11 -0
- package/dist/node_modules/has-symbols/.github/FUNDING.yml +12 -0
- package/dist/node_modules/has-symbols/.nycrc +9 -0
- package/dist/node_modules/has-symbols/CHANGELOG.md +75 -0
- package/dist/node_modules/has-symbols/LICENSE +21 -0
- package/dist/node_modules/has-symbols/README.md +46 -0
- package/dist/node_modules/has-symbols/index.js +13 -0
- package/dist/node_modules/has-symbols/package.json +101 -0
- package/dist/node_modules/has-symbols/shams.js +42 -0
- package/dist/node_modules/has-symbols/test/index.js +22 -0
- package/dist/node_modules/has-symbols/test/shams/core-js.js +28 -0
- package/dist/node_modules/has-symbols/test/shams/get-own-property-symbols.js +28 -0
- package/dist/node_modules/has-symbols/test/tests.js +56 -0
- package/dist/node_modules/http-errors/HISTORY.md +180 -0
- package/dist/node_modules/http-errors/LICENSE +23 -0
- package/dist/node_modules/http-errors/README.md +169 -0
- package/dist/node_modules/http-errors/index.js +289 -0
- package/dist/node_modules/http-errors/package.json +50 -0
- package/dist/node_modules/iconv-lite/Changelog.md +162 -0
- package/dist/node_modules/iconv-lite/LICENSE +21 -0
- package/dist/node_modules/iconv-lite/README.md +156 -0
- package/dist/node_modules/iconv-lite/encodings/dbcs-codec.js +555 -0
- package/dist/node_modules/iconv-lite/encodings/dbcs-data.js +176 -0
- package/dist/node_modules/iconv-lite/encodings/index.js +22 -0
- package/dist/node_modules/iconv-lite/encodings/internal.js +188 -0
- package/dist/node_modules/iconv-lite/encodings/sbcs-codec.js +72 -0
- package/dist/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
- package/dist/node_modules/iconv-lite/encodings/sbcs-data.js +174 -0
- package/dist/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
- package/dist/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
- package/dist/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
- package/dist/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
- package/dist/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
- package/dist/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
- package/dist/node_modules/iconv-lite/encodings/tables/gbk-added.json +55 -0
- package/dist/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
- package/dist/node_modules/iconv-lite/encodings/utf16.js +177 -0
- package/dist/node_modules/iconv-lite/encodings/utf7.js +290 -0
- package/dist/node_modules/iconv-lite/lib/bom-handling.js +52 -0
- package/dist/node_modules/iconv-lite/lib/extend-node.js +217 -0
- package/dist/node_modules/iconv-lite/lib/index.d.ts +24 -0
- package/dist/node_modules/iconv-lite/lib/index.js +153 -0
- package/dist/node_modules/iconv-lite/lib/streams.js +121 -0
- package/dist/node_modules/iconv-lite/package.json +46 -0
- package/dist/node_modules/inherits/LICENSE +16 -0
- package/dist/node_modules/inherits/README.md +42 -0
- package/dist/node_modules/inherits/inherits.js +9 -0
- package/dist/node_modules/inherits/inherits_browser.js +27 -0
- package/dist/node_modules/inherits/package.json +29 -0
- package/dist/node_modules/ipaddr.js/LICENSE +19 -0
- package/dist/node_modules/ipaddr.js/README.md +233 -0
- package/dist/node_modules/ipaddr.js/ipaddr.min.js +1 -0
- package/dist/node_modules/ipaddr.js/lib/ipaddr.js +673 -0
- package/dist/node_modules/ipaddr.js/lib/ipaddr.js.d.ts +68 -0
- package/dist/node_modules/ipaddr.js/package.json +35 -0
- package/dist/node_modules/media-typer/HISTORY.md +22 -0
- package/dist/node_modules/media-typer/LICENSE +22 -0
- package/dist/node_modules/media-typer/README.md +81 -0
- package/dist/node_modules/media-typer/index.js +270 -0
- package/dist/node_modules/media-typer/package.json +26 -0
- package/dist/node_modules/merge-descriptors/HISTORY.md +21 -0
- package/dist/node_modules/merge-descriptors/LICENSE +23 -0
- package/dist/node_modules/merge-descriptors/README.md +48 -0
- package/dist/node_modules/merge-descriptors/index.js +60 -0
- package/dist/node_modules/merge-descriptors/package.json +32 -0
- package/dist/node_modules/methods/HISTORY.md +29 -0
- package/dist/node_modules/methods/LICENSE +24 -0
- package/dist/node_modules/methods/README.md +51 -0
- package/dist/node_modules/methods/index.js +69 -0
- package/dist/node_modules/methods/package.json +36 -0
- package/dist/node_modules/mime/CHANGELOG.md +164 -0
- package/dist/node_modules/mime/LICENSE +21 -0
- package/dist/node_modules/mime/README.md +90 -0
- package/dist/node_modules/mime/cli.js +8 -0
- package/dist/node_modules/mime/mime.js +108 -0
- package/dist/node_modules/mime/package.json +44 -0
- package/dist/node_modules/mime/src/build.js +53 -0
- package/dist/node_modules/mime/src/test.js +60 -0
- package/dist/node_modules/mime/types.json +1 -0
- package/dist/node_modules/mime-db/HISTORY.md +507 -0
- package/dist/node_modules/mime-db/LICENSE +23 -0
- package/dist/node_modules/mime-db/README.md +100 -0
- package/dist/node_modules/mime-db/db.json +8519 -0
- package/dist/node_modules/mime-db/index.js +12 -0
- package/dist/node_modules/mime-db/package.json +60 -0
- package/dist/node_modules/mime-types/HISTORY.md +397 -0
- package/dist/node_modules/mime-types/LICENSE +23 -0
- package/dist/node_modules/mime-types/README.md +113 -0
- package/dist/node_modules/mime-types/index.js +188 -0
- package/dist/node_modules/mime-types/package.json +44 -0
- package/dist/node_modules/ms/index.js +152 -0
- package/dist/node_modules/ms/license.md +21 -0
- package/dist/node_modules/ms/package.json +37 -0
- package/dist/node_modules/ms/readme.md +51 -0
- package/dist/node_modules/negotiator/HISTORY.md +108 -0
- package/dist/node_modules/negotiator/LICENSE +24 -0
- package/dist/node_modules/negotiator/README.md +203 -0
- package/dist/node_modules/negotiator/index.js +82 -0
- package/dist/node_modules/negotiator/lib/charset.js +169 -0
- package/dist/node_modules/negotiator/lib/encoding.js +184 -0
- package/dist/node_modules/negotiator/lib/language.js +179 -0
- package/dist/node_modules/negotiator/lib/mediaType.js +294 -0
- package/dist/node_modules/negotiator/package.json +42 -0
- package/dist/node_modules/object-inspect/.eslintrc +53 -0
- package/dist/node_modules/object-inspect/.github/FUNDING.yml +12 -0
- package/dist/node_modules/object-inspect/.nycrc +13 -0
- package/dist/node_modules/object-inspect/CHANGELOG.md +360 -0
- package/dist/node_modules/object-inspect/LICENSE +21 -0
- package/dist/node_modules/object-inspect/example/all.js +23 -0
- package/dist/node_modules/object-inspect/example/circular.js +6 -0
- package/dist/node_modules/object-inspect/example/fn.js +5 -0
- package/dist/node_modules/object-inspect/example/inspect.js +10 -0
- package/dist/node_modules/object-inspect/index.js +512 -0
- package/dist/node_modules/object-inspect/package-support.json +20 -0
- package/dist/node_modules/object-inspect/package.json +94 -0
- package/dist/node_modules/object-inspect/readme.markdown +86 -0
- package/dist/node_modules/object-inspect/test/bigint.js +58 -0
- package/dist/node_modules/object-inspect/test/browser/dom.js +15 -0
- package/dist/node_modules/object-inspect/test/circular.js +16 -0
- package/dist/node_modules/object-inspect/test/deep.js +12 -0
- package/dist/node_modules/object-inspect/test/element.js +53 -0
- package/dist/node_modules/object-inspect/test/err.js +48 -0
- package/dist/node_modules/object-inspect/test/fakes.js +29 -0
- package/dist/node_modules/object-inspect/test/fn.js +76 -0
- package/dist/node_modules/object-inspect/test/has.js +15 -0
- package/dist/node_modules/object-inspect/test/holes.js +15 -0
- package/dist/node_modules/object-inspect/test/indent-option.js +271 -0
- package/dist/node_modules/object-inspect/test/inspect.js +139 -0
- package/dist/node_modules/object-inspect/test/lowbyte.js +12 -0
- package/dist/node_modules/object-inspect/test/number.js +58 -0
- package/dist/node_modules/object-inspect/test/quoteStyle.js +17 -0
- package/dist/node_modules/object-inspect/test/toStringTag.js +40 -0
- package/dist/node_modules/object-inspect/test/undef.js +12 -0
- package/dist/node_modules/object-inspect/test/values.js +211 -0
- package/dist/node_modules/object-inspect/test-core-js.js +26 -0
- package/dist/node_modules/object-inspect/util.inspect.js +1 -0
- package/dist/node_modules/on-finished/HISTORY.md +98 -0
- package/dist/node_modules/on-finished/LICENSE +23 -0
- package/dist/node_modules/on-finished/README.md +162 -0
- package/dist/node_modules/on-finished/index.js +234 -0
- package/dist/node_modules/on-finished/package.json +39 -0
- package/dist/node_modules/parseurl/HISTORY.md +58 -0
- package/dist/node_modules/parseurl/LICENSE +24 -0
- package/dist/node_modules/parseurl/README.md +133 -0
- package/dist/node_modules/parseurl/index.js +158 -0
- package/dist/node_modules/parseurl/package.json +40 -0
- package/dist/node_modules/path-to-regexp/History.md +36 -0
- package/dist/node_modules/path-to-regexp/LICENSE +21 -0
- package/dist/node_modules/path-to-regexp/Readme.md +35 -0
- package/dist/node_modules/path-to-regexp/index.js +129 -0
- package/dist/node_modules/path-to-regexp/package.json +30 -0
- package/dist/node_modules/proxy-addr/HISTORY.md +161 -0
- package/dist/node_modules/proxy-addr/LICENSE +22 -0
- package/dist/node_modules/proxy-addr/README.md +139 -0
- package/dist/node_modules/proxy-addr/index.js +327 -0
- package/dist/node_modules/proxy-addr/package.json +47 -0
- package/dist/node_modules/qs/.editorconfig +43 -0
- package/dist/node_modules/qs/.eslintrc +38 -0
- package/dist/node_modules/qs/.github/FUNDING.yml +12 -0
- package/dist/node_modules/qs/.nycrc +13 -0
- package/dist/node_modules/qs/CHANGELOG.md +546 -0
- package/dist/node_modules/qs/LICENSE.md +29 -0
- package/dist/node_modules/qs/README.md +625 -0
- package/dist/node_modules/qs/dist/qs.js +2054 -0
- package/dist/node_modules/qs/lib/formats.js +23 -0
- package/dist/node_modules/qs/lib/index.js +11 -0
- package/dist/node_modules/qs/lib/parse.js +263 -0
- package/dist/node_modules/qs/lib/stringify.js +326 -0
- package/dist/node_modules/qs/lib/utils.js +252 -0
- package/dist/node_modules/qs/package.json +77 -0
- package/dist/node_modules/qs/test/parse.js +855 -0
- package/dist/node_modules/qs/test/stringify.js +909 -0
- package/dist/node_modules/qs/test/utils.js +136 -0
- package/dist/node_modules/range-parser/HISTORY.md +56 -0
- package/dist/node_modules/range-parser/LICENSE +23 -0
- package/dist/node_modules/range-parser/README.md +84 -0
- package/dist/node_modules/range-parser/index.js +162 -0
- package/dist/node_modules/range-parser/package.json +44 -0
- package/dist/node_modules/raw-body/HISTORY.md +303 -0
- package/dist/node_modules/raw-body/LICENSE +22 -0
- package/dist/node_modules/raw-body/README.md +223 -0
- package/dist/node_modules/raw-body/SECURITY.md +24 -0
- package/dist/node_modules/raw-body/index.d.ts +87 -0
- package/dist/node_modules/raw-body/index.js +329 -0
- package/dist/node_modules/raw-body/package.json +49 -0
- package/dist/node_modules/safe-buffer/LICENSE +21 -0
- package/dist/node_modules/safe-buffer/README.md +584 -0
- package/dist/node_modules/safe-buffer/index.d.ts +187 -0
- package/dist/node_modules/safe-buffer/index.js +65 -0
- package/dist/node_modules/safe-buffer/package.json +51 -0
- package/dist/node_modules/safer-buffer/LICENSE +21 -0
- package/dist/node_modules/safer-buffer/Porting-Buffer.md +268 -0
- package/dist/node_modules/safer-buffer/Readme.md +156 -0
- package/dist/node_modules/safer-buffer/dangerous.js +58 -0
- package/dist/node_modules/safer-buffer/package.json +34 -0
- package/dist/node_modules/safer-buffer/safer.js +77 -0
- package/dist/node_modules/safer-buffer/tests.js +406 -0
- package/dist/node_modules/send/HISTORY.md +521 -0
- package/dist/node_modules/send/LICENSE +23 -0
- package/dist/node_modules/send/README.md +327 -0
- package/dist/node_modules/send/SECURITY.md +24 -0
- package/dist/node_modules/send/index.js +1143 -0
- package/dist/node_modules/send/node_modules/ms/index.js +162 -0
- package/dist/node_modules/send/node_modules/ms/license.md +21 -0
- package/dist/node_modules/send/node_modules/ms/package.json +38 -0
- package/dist/node_modules/send/node_modules/ms/readme.md +59 -0
- package/dist/node_modules/send/package.json +62 -0
- package/dist/node_modules/serve-static/HISTORY.md +471 -0
- package/dist/node_modules/serve-static/LICENSE +25 -0
- package/dist/node_modules/serve-static/README.md +257 -0
- package/dist/node_modules/serve-static/index.js +210 -0
- package/dist/node_modules/serve-static/package.json +42 -0
- package/dist/node_modules/setprototypeof/LICENSE +13 -0
- package/dist/node_modules/setprototypeof/README.md +31 -0
- package/dist/node_modules/setprototypeof/index.d.ts +2 -0
- package/dist/node_modules/setprototypeof/index.js +17 -0
- package/dist/node_modules/setprototypeof/package.json +38 -0
- package/dist/node_modules/setprototypeof/test/index.js +24 -0
- package/dist/node_modules/side-channel/.eslintignore +1 -0
- package/dist/node_modules/side-channel/.eslintrc +11 -0
- package/dist/node_modules/side-channel/.github/FUNDING.yml +12 -0
- package/dist/node_modules/side-channel/.nycrc +13 -0
- package/dist/node_modules/side-channel/CHANGELOG.md +65 -0
- package/dist/node_modules/side-channel/LICENSE +21 -0
- package/dist/node_modules/side-channel/README.md +2 -0
- package/dist/node_modules/side-channel/index.js +124 -0
- package/dist/node_modules/side-channel/package.json +67 -0
- package/dist/node_modules/side-channel/test/index.js +78 -0
- package/dist/node_modules/statuses/HISTORY.md +82 -0
- package/dist/node_modules/statuses/LICENSE +23 -0
- package/dist/node_modules/statuses/README.md +136 -0
- package/dist/node_modules/statuses/codes.json +65 -0
- package/dist/node_modules/statuses/index.js +146 -0
- package/dist/node_modules/statuses/package.json +49 -0
- package/dist/node_modules/toidentifier/HISTORY.md +9 -0
- package/dist/node_modules/toidentifier/LICENSE +21 -0
- package/dist/node_modules/toidentifier/README.md +61 -0
- package/dist/node_modules/toidentifier/index.js +32 -0
- package/dist/node_modules/toidentifier/package.json +38 -0
- package/dist/node_modules/type-is/HISTORY.md +259 -0
- package/dist/node_modules/type-is/LICENSE +23 -0
- package/dist/node_modules/type-is/README.md +170 -0
- package/dist/node_modules/type-is/index.js +266 -0
- package/dist/node_modules/type-is/package.json +45 -0
- package/dist/node_modules/unpipe/HISTORY.md +4 -0
- package/dist/node_modules/unpipe/LICENSE +22 -0
- package/dist/node_modules/unpipe/README.md +43 -0
- package/dist/node_modules/unpipe/index.js +69 -0
- package/dist/node_modules/unpipe/package.json +27 -0
- package/dist/node_modules/utils-merge/LICENSE +20 -0
- package/dist/node_modules/utils-merge/README.md +34 -0
- package/dist/node_modules/utils-merge/index.js +23 -0
- package/dist/node_modules/utils-merge/package.json +40 -0
- package/dist/node_modules/vary/HISTORY.md +39 -0
- package/dist/node_modules/vary/LICENSE +22 -0
- package/dist/node_modules/vary/README.md +101 -0
- package/dist/node_modules/vary/index.js +149 -0
- package/dist/node_modules/vary/package.json +43 -0
- package/dist/package-lock.json +1018 -0
- package/dist/package.json +18 -0
- package/makefile +74 -0
- package/package.json +1 -1
- package/src/peer-connection/audioPeer.js +1 -1
- package/src/peer-connection/speaker.js +8 -4
- package/src/server/PythonServerAPI.js +5 -2
- package/src/tasks/audioCalibrator.js +4 -3
- package/src/tasks/volume/volume.js +35 -36
- package/.gitignore +0 -78
|
@@ -0,0 +1,170 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* bytes
|
|
3
|
+
* Copyright(c) 2012-2014 TJ Holowaychuk
|
|
4
|
+
* Copyright(c) 2015 Jed Watson
|
|
5
|
+
* MIT Licensed
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
'use strict';
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* Module exports.
|
|
12
|
+
* @public
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
module.exports = bytes;
|
|
16
|
+
module.exports.format = format;
|
|
17
|
+
module.exports.parse = parse;
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* Module variables.
|
|
21
|
+
* @private
|
|
22
|
+
*/
|
|
23
|
+
|
|
24
|
+
var formatThousandsRegExp = /\B(?=(\d{3})+(?!\d))/g;
|
|
25
|
+
|
|
26
|
+
var formatDecimalsRegExp = /(?:\.0*|(\.[^0]+)0+)$/;
|
|
27
|
+
|
|
28
|
+
var map = {
|
|
29
|
+
b: 1,
|
|
30
|
+
kb: 1 << 10,
|
|
31
|
+
mb: 1 << 20,
|
|
32
|
+
gb: 1 << 30,
|
|
33
|
+
tb: Math.pow(1024, 4),
|
|
34
|
+
pb: Math.pow(1024, 5),
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
var parseRegExp = /^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb|pb)$/i;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Convert the given value in bytes into a string or parse to string to an integer in bytes.
|
|
41
|
+
*
|
|
42
|
+
* @param {string|number} value
|
|
43
|
+
* @param {{
|
|
44
|
+
* case: [string],
|
|
45
|
+
* decimalPlaces: [number]
|
|
46
|
+
* fixedDecimals: [boolean]
|
|
47
|
+
* thousandsSeparator: [string]
|
|
48
|
+
* unitSeparator: [string]
|
|
49
|
+
* }} [options] bytes options.
|
|
50
|
+
*
|
|
51
|
+
* @returns {string|number|null}
|
|
52
|
+
*/
|
|
53
|
+
|
|
54
|
+
function bytes(value, options) {
|
|
55
|
+
if (typeof value === 'string') {
|
|
56
|
+
return parse(value);
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
if (typeof value === 'number') {
|
|
60
|
+
return format(value, options);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
return null;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* Format the given value in bytes into a string.
|
|
68
|
+
*
|
|
69
|
+
* If the value is negative, it is kept as such. If it is a float,
|
|
70
|
+
* it is rounded.
|
|
71
|
+
*
|
|
72
|
+
* @param {number} value
|
|
73
|
+
* @param {object} [options]
|
|
74
|
+
* @param {number} [options.decimalPlaces=2]
|
|
75
|
+
* @param {number} [options.fixedDecimals=false]
|
|
76
|
+
* @param {string} [options.thousandsSeparator=]
|
|
77
|
+
* @param {string} [options.unit=]
|
|
78
|
+
* @param {string} [options.unitSeparator=]
|
|
79
|
+
*
|
|
80
|
+
* @returns {string|null}
|
|
81
|
+
* @public
|
|
82
|
+
*/
|
|
83
|
+
|
|
84
|
+
function format(value, options) {
|
|
85
|
+
if (!Number.isFinite(value)) {
|
|
86
|
+
return null;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
var mag = Math.abs(value);
|
|
90
|
+
var thousandsSeparator = (options && options.thousandsSeparator) || '';
|
|
91
|
+
var unitSeparator = (options && options.unitSeparator) || '';
|
|
92
|
+
var decimalPlaces = (options && options.decimalPlaces !== undefined) ? options.decimalPlaces : 2;
|
|
93
|
+
var fixedDecimals = Boolean(options && options.fixedDecimals);
|
|
94
|
+
var unit = (options && options.unit) || '';
|
|
95
|
+
|
|
96
|
+
if (!unit || !map[unit.toLowerCase()]) {
|
|
97
|
+
if (mag >= map.pb) {
|
|
98
|
+
unit = 'PB';
|
|
99
|
+
} else if (mag >= map.tb) {
|
|
100
|
+
unit = 'TB';
|
|
101
|
+
} else if (mag >= map.gb) {
|
|
102
|
+
unit = 'GB';
|
|
103
|
+
} else if (mag >= map.mb) {
|
|
104
|
+
unit = 'MB';
|
|
105
|
+
} else if (mag >= map.kb) {
|
|
106
|
+
unit = 'KB';
|
|
107
|
+
} else {
|
|
108
|
+
unit = 'B';
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
var val = value / map[unit.toLowerCase()];
|
|
113
|
+
var str = val.toFixed(decimalPlaces);
|
|
114
|
+
|
|
115
|
+
if (!fixedDecimals) {
|
|
116
|
+
str = str.replace(formatDecimalsRegExp, '$1');
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
if (thousandsSeparator) {
|
|
120
|
+
str = str.split('.').map(function (s, i) {
|
|
121
|
+
return i === 0
|
|
122
|
+
? s.replace(formatThousandsRegExp, thousandsSeparator)
|
|
123
|
+
: s
|
|
124
|
+
}).join('.');
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
return str + unitSeparator + unit;
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Parse the string value into an integer in bytes.
|
|
132
|
+
*
|
|
133
|
+
* If no unit is given, it is assumed the value is in bytes.
|
|
134
|
+
*
|
|
135
|
+
* @param {number|string} val
|
|
136
|
+
*
|
|
137
|
+
* @returns {number|null}
|
|
138
|
+
* @public
|
|
139
|
+
*/
|
|
140
|
+
|
|
141
|
+
function parse(val) {
|
|
142
|
+
if (typeof val === 'number' && !isNaN(val)) {
|
|
143
|
+
return val;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
if (typeof val !== 'string') {
|
|
147
|
+
return null;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// Test if the string passed is valid
|
|
151
|
+
var results = parseRegExp.exec(val);
|
|
152
|
+
var floatValue;
|
|
153
|
+
var unit = 'b';
|
|
154
|
+
|
|
155
|
+
if (!results) {
|
|
156
|
+
// Nothing could be extracted from the given string
|
|
157
|
+
floatValue = parseInt(val, 10);
|
|
158
|
+
unit = 'b'
|
|
159
|
+
} else {
|
|
160
|
+
// Retrieve the value and the unit
|
|
161
|
+
floatValue = parseFloat(results[1]);
|
|
162
|
+
unit = results[4].toLowerCase();
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
if (isNaN(floatValue)) {
|
|
166
|
+
return null;
|
|
167
|
+
}
|
|
168
|
+
|
|
169
|
+
return Math.floor(map[unit] * floatValue);
|
|
170
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "bytes",
|
|
3
|
+
"description": "Utility to parse a string bytes to bytes and vice-versa",
|
|
4
|
+
"version": "3.1.2",
|
|
5
|
+
"author": "TJ Holowaychuk <tj@vision-media.ca> (http://tjholowaychuk.com)",
|
|
6
|
+
"contributors": [
|
|
7
|
+
"Jed Watson <jed.watson@me.com>",
|
|
8
|
+
"Théo FIDRY <theo.fidry@gmail.com>"
|
|
9
|
+
],
|
|
10
|
+
"license": "MIT",
|
|
11
|
+
"keywords": [
|
|
12
|
+
"byte",
|
|
13
|
+
"bytes",
|
|
14
|
+
"utility",
|
|
15
|
+
"parse",
|
|
16
|
+
"parser",
|
|
17
|
+
"convert",
|
|
18
|
+
"converter"
|
|
19
|
+
],
|
|
20
|
+
"repository": "visionmedia/bytes.js",
|
|
21
|
+
"devDependencies": {
|
|
22
|
+
"eslint": "7.32.0",
|
|
23
|
+
"eslint-plugin-markdown": "2.2.1",
|
|
24
|
+
"mocha": "9.2.0",
|
|
25
|
+
"nyc": "15.1.0"
|
|
26
|
+
},
|
|
27
|
+
"files": [
|
|
28
|
+
"History.md",
|
|
29
|
+
"LICENSE",
|
|
30
|
+
"Readme.md",
|
|
31
|
+
"index.js"
|
|
32
|
+
],
|
|
33
|
+
"engines": {
|
|
34
|
+
"node": ">= 0.8"
|
|
35
|
+
},
|
|
36
|
+
"scripts": {
|
|
37
|
+
"lint": "eslint .",
|
|
38
|
+
"test": "mocha --check-leaks --reporter spec",
|
|
39
|
+
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
|
|
40
|
+
"test-cov": "nyc --reporter=html --reporter=text npm test"
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
coverage/
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
{
|
|
2
|
+
"root": true,
|
|
3
|
+
|
|
4
|
+
"extends": "@ljharb",
|
|
5
|
+
|
|
6
|
+
"rules": {
|
|
7
|
+
"func-name-matching": 0,
|
|
8
|
+
"id-length": 0,
|
|
9
|
+
"new-cap": [2, {
|
|
10
|
+
"capIsNewExceptions": [
|
|
11
|
+
"GetIntrinsic",
|
|
12
|
+
],
|
|
13
|
+
}],
|
|
14
|
+
"no-magic-numbers": 0,
|
|
15
|
+
"operator-linebreak": [2, "before"],
|
|
16
|
+
},
|
|
17
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# These are supported funding model platforms
|
|
2
|
+
|
|
3
|
+
github: [ljharb]
|
|
4
|
+
patreon: # Replace with a single Patreon username
|
|
5
|
+
open_collective: # Replace with a single Open Collective username
|
|
6
|
+
ko_fi: # Replace with a single Ko-fi username
|
|
7
|
+
tidelift: npm/call-bind
|
|
8
|
+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
|
9
|
+
liberapay: # Replace with a single Liberapay username
|
|
10
|
+
issuehunt: # Replace with a single IssueHunt username
|
|
11
|
+
otechie: # Replace with a single Otechie username
|
|
12
|
+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
## [v1.0.2](https://github.com/ljharb/call-bind/compare/v1.0.1...v1.0.2) - 2021-01-11
|
|
9
|
+
|
|
10
|
+
### Commits
|
|
11
|
+
|
|
12
|
+
- [Fix] properly include the receiver in the bound length [`dbae7bc`](https://github.com/ljharb/call-bind/commit/dbae7bc676c079a0d33c0a43e9ef92cb7b01345d)
|
|
13
|
+
|
|
14
|
+
## [v1.0.1](https://github.com/ljharb/call-bind/compare/v1.0.0...v1.0.1) - 2021-01-08
|
|
15
|
+
|
|
16
|
+
### Commits
|
|
17
|
+
|
|
18
|
+
- [Tests] migrate tests to Github Actions [`b6db284`](https://github.com/ljharb/call-bind/commit/b6db284c36f8ccd195b88a6764fe84b7223a0da1)
|
|
19
|
+
- [meta] do not publish github action workflow files [`ec7fe46`](https://github.com/ljharb/call-bind/commit/ec7fe46e60cfa4764ee943d2755f5e5a366e578e)
|
|
20
|
+
- [Fix] preserve original function’s length when possible [`adbceaa`](https://github.com/ljharb/call-bind/commit/adbceaa3cac4b41ea78bb19d7ccdbaaf7e0bdadb)
|
|
21
|
+
- [Tests] gather coverage data on every job [`d69e23c`](https://github.com/ljharb/call-bind/commit/d69e23cc65f101ba1d4c19bb07fa8eb0ec624be8)
|
|
22
|
+
- [Dev Deps] update `eslint`, `@ljharb/eslint-config`, `aud`, `tape` [`2fd3586`](https://github.com/ljharb/call-bind/commit/2fd3586c5d47b335364c14293114c6b625ae1f71)
|
|
23
|
+
- [Deps] update `get-intrinsic` [`f23e931`](https://github.com/ljharb/call-bind/commit/f23e9318cc271c2add8bb38cfded85ee7baf8eee)
|
|
24
|
+
- [Deps] update `get-intrinsic` [`72d9f44`](https://github.com/ljharb/call-bind/commit/72d9f44e184465ba8dd3fb48260bbcff234985f2)
|
|
25
|
+
- [meta] fix FUNDING.yml [`e723573`](https://github.com/ljharb/call-bind/commit/e723573438c5a68dcec31fb5d96ea6b7e4a93be8)
|
|
26
|
+
- [eslint] ignore coverage output [`15e76d2`](https://github.com/ljharb/call-bind/commit/15e76d28a5f43e504696401e5b31ebb78ee1b532)
|
|
27
|
+
- [meta] add Automatic Rebase and Require Allow Edits workflows [`8fa4dab`](https://github.com/ljharb/call-bind/commit/8fa4dabb23ba3dd7bb92c9571c1241c08b56e4b6)
|
|
28
|
+
|
|
29
|
+
## v1.0.0 - 2020-10-30
|
|
30
|
+
|
|
31
|
+
### Commits
|
|
32
|
+
|
|
33
|
+
- Initial commit [`306cf98`](https://github.com/ljharb/call-bind/commit/306cf98c7ec9e7ef66b653ec152277ac1381eb50)
|
|
34
|
+
- Tests [`e10d0bb`](https://github.com/ljharb/call-bind/commit/e10d0bbdadc7a10ecedc9a1c035112d3e368b8df)
|
|
35
|
+
- Implementation [`43852ed`](https://github.com/ljharb/call-bind/commit/43852eda0f187327b7fad2423ca972149a52bd65)
|
|
36
|
+
- npm init [`408f860`](https://github.com/ljharb/call-bind/commit/408f860b773a2f610805fd3613d0d71bac1b6249)
|
|
37
|
+
- [meta] add Automatic Rebase and Require Allow Edits workflows [`fb349b2`](https://github.com/ljharb/call-bind/commit/fb349b2e48defbec8b5ec8a8395cc8f69f220b13)
|
|
38
|
+
- [meta] add `auto-changelog` [`c4001fc`](https://github.com/ljharb/call-bind/commit/c4001fc43031799ef908211c98d3b0fb2b60fde4)
|
|
39
|
+
- [meta] add "funding"; create `FUNDING.yml` [`d4d6d29`](https://github.com/ljharb/call-bind/commit/d4d6d2974a14bc2e98830468eda7fe6d6a776717)
|
|
40
|
+
- [Tests] add `npm run lint` [`dedfb98`](https://github.com/ljharb/call-bind/commit/dedfb98bd0ecefb08ddb9a94061bd10cde4332af)
|
|
41
|
+
- Only apps should have lockfiles [`54ac776`](https://github.com/ljharb/call-bind/commit/54ac77653db45a7361dc153d2f478e743f110650)
|
|
42
|
+
- [meta] add `safe-publish-latest` [`9ea8e43`](https://github.com/ljharb/call-bind/commit/9ea8e435b950ce9b705559cd651039f9bf40140f)
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 Jordan Harband
|
|
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.
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var GetIntrinsic = require('get-intrinsic');
|
|
4
|
+
|
|
5
|
+
var callBind = require('./');
|
|
6
|
+
|
|
7
|
+
var $indexOf = callBind(GetIntrinsic('String.prototype.indexOf'));
|
|
8
|
+
|
|
9
|
+
module.exports = function callBoundIntrinsic(name, allowMissing) {
|
|
10
|
+
var intrinsic = GetIntrinsic(name, !!allowMissing);
|
|
11
|
+
if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
|
|
12
|
+
return callBind(intrinsic);
|
|
13
|
+
}
|
|
14
|
+
return intrinsic;
|
|
15
|
+
};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var bind = require('function-bind');
|
|
4
|
+
var GetIntrinsic = require('get-intrinsic');
|
|
5
|
+
|
|
6
|
+
var $apply = GetIntrinsic('%Function.prototype.apply%');
|
|
7
|
+
var $call = GetIntrinsic('%Function.prototype.call%');
|
|
8
|
+
var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
|
|
9
|
+
|
|
10
|
+
var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
|
|
11
|
+
var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
|
|
12
|
+
var $max = GetIntrinsic('%Math.max%');
|
|
13
|
+
|
|
14
|
+
if ($defineProperty) {
|
|
15
|
+
try {
|
|
16
|
+
$defineProperty({}, 'a', { value: 1 });
|
|
17
|
+
} catch (e) {
|
|
18
|
+
// IE 8 has a broken defineProperty
|
|
19
|
+
$defineProperty = null;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
module.exports = function callBind(originalFunction) {
|
|
24
|
+
var func = $reflectApply(bind, $call, arguments);
|
|
25
|
+
if ($gOPD && $defineProperty) {
|
|
26
|
+
var desc = $gOPD(func, 'length');
|
|
27
|
+
if (desc.configurable) {
|
|
28
|
+
// original length, plus the receiver, minus any additional arguments (after the receiver)
|
|
29
|
+
$defineProperty(
|
|
30
|
+
func,
|
|
31
|
+
'length',
|
|
32
|
+
{ value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
return func;
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
var applyBind = function applyBind() {
|
|
40
|
+
return $reflectApply(bind, $apply, arguments);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
if ($defineProperty) {
|
|
44
|
+
$defineProperty(module.exports, 'apply', { value: applyBind });
|
|
45
|
+
} else {
|
|
46
|
+
module.exports.apply = applyBind;
|
|
47
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "call-bind",
|
|
3
|
+
"version": "1.0.2",
|
|
4
|
+
"description": "Robustly `.call.bind()` a function",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"exports": {
|
|
7
|
+
".": [
|
|
8
|
+
{
|
|
9
|
+
"default": "./index.js"
|
|
10
|
+
},
|
|
11
|
+
"./index.js"
|
|
12
|
+
],
|
|
13
|
+
"./callBound": [
|
|
14
|
+
{
|
|
15
|
+
"default": "./callBound.js"
|
|
16
|
+
},
|
|
17
|
+
"./callBound.js"
|
|
18
|
+
],
|
|
19
|
+
"./package.json": "./package.json"
|
|
20
|
+
},
|
|
21
|
+
"scripts": {
|
|
22
|
+
"prepublish": "safe-publish-latest",
|
|
23
|
+
"lint": "eslint --ext=.js,.mjs .",
|
|
24
|
+
"pretest": "npm run lint",
|
|
25
|
+
"tests-only": "nyc tape 'test/*'",
|
|
26
|
+
"test": "npm run tests-only",
|
|
27
|
+
"posttest": "aud --production",
|
|
28
|
+
"version": "auto-changelog && git add CHANGELOG.md",
|
|
29
|
+
"postversion": "auto-changelog && git add CHANGELOG.md && git commit --no-edit --amend && git tag -f \"v$(node -e \"console.log(require('./package.json').version)\")\""
|
|
30
|
+
},
|
|
31
|
+
"repository": {
|
|
32
|
+
"type": "git",
|
|
33
|
+
"url": "git+https://github.com/ljharb/call-bind.git"
|
|
34
|
+
},
|
|
35
|
+
"keywords": [
|
|
36
|
+
"javascript",
|
|
37
|
+
"ecmascript",
|
|
38
|
+
"es",
|
|
39
|
+
"js",
|
|
40
|
+
"callbind",
|
|
41
|
+
"callbound",
|
|
42
|
+
"call",
|
|
43
|
+
"bind",
|
|
44
|
+
"bound",
|
|
45
|
+
"call-bind",
|
|
46
|
+
"call-bound",
|
|
47
|
+
"function",
|
|
48
|
+
"es-abstract"
|
|
49
|
+
],
|
|
50
|
+
"author": "Jordan Harband <ljharb@gmail.com>",
|
|
51
|
+
"funding": {
|
|
52
|
+
"url": "https://github.com/sponsors/ljharb"
|
|
53
|
+
},
|
|
54
|
+
"license": "MIT",
|
|
55
|
+
"bugs": {
|
|
56
|
+
"url": "https://github.com/ljharb/call-bind/issues"
|
|
57
|
+
},
|
|
58
|
+
"homepage": "https://github.com/ljharb/call-bind#readme",
|
|
59
|
+
"devDependencies": {
|
|
60
|
+
"@ljharb/eslint-config": "^17.3.0",
|
|
61
|
+
"aud": "^1.1.3",
|
|
62
|
+
"auto-changelog": "^2.2.1",
|
|
63
|
+
"eslint": "^7.17.0",
|
|
64
|
+
"nyc": "^10.3.2",
|
|
65
|
+
"safe-publish-latest": "^1.1.4",
|
|
66
|
+
"tape": "^5.1.1"
|
|
67
|
+
},
|
|
68
|
+
"dependencies": {
|
|
69
|
+
"function-bind": "^1.1.1",
|
|
70
|
+
"get-intrinsic": "^1.0.2"
|
|
71
|
+
},
|
|
72
|
+
"auto-changelog": {
|
|
73
|
+
"output": "CHANGELOG.md",
|
|
74
|
+
"template": "keepachangelog",
|
|
75
|
+
"unreleased": false,
|
|
76
|
+
"commitLimit": false,
|
|
77
|
+
"backfillLimit": false,
|
|
78
|
+
"hideCredit": true
|
|
79
|
+
}
|
|
80
|
+
}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var test = require('tape');
|
|
4
|
+
|
|
5
|
+
var callBound = require('../callBound');
|
|
6
|
+
|
|
7
|
+
test('callBound', function (t) {
|
|
8
|
+
// static primitive
|
|
9
|
+
t.equal(callBound('Array.length'), Array.length, 'Array.length yields itself');
|
|
10
|
+
t.equal(callBound('%Array.length%'), Array.length, '%Array.length% yields itself');
|
|
11
|
+
|
|
12
|
+
// static non-function object
|
|
13
|
+
t.equal(callBound('Array.prototype'), Array.prototype, 'Array.prototype yields itself');
|
|
14
|
+
t.equal(callBound('%Array.prototype%'), Array.prototype, '%Array.prototype% yields itself');
|
|
15
|
+
t.equal(callBound('Array.constructor'), Array.constructor, 'Array.constructor yields itself');
|
|
16
|
+
t.equal(callBound('%Array.constructor%'), Array.constructor, '%Array.constructor% yields itself');
|
|
17
|
+
|
|
18
|
+
// static function
|
|
19
|
+
t.equal(callBound('Date.parse'), Date.parse, 'Date.parse yields itself');
|
|
20
|
+
t.equal(callBound('%Date.parse%'), Date.parse, '%Date.parse% yields itself');
|
|
21
|
+
|
|
22
|
+
// prototype primitive
|
|
23
|
+
t.equal(callBound('Error.prototype.message'), Error.prototype.message, 'Error.prototype.message yields itself');
|
|
24
|
+
t.equal(callBound('%Error.prototype.message%'), Error.prototype.message, '%Error.prototype.message% yields itself');
|
|
25
|
+
|
|
26
|
+
// prototype function
|
|
27
|
+
t.notEqual(callBound('Object.prototype.toString'), Object.prototype.toString, 'Object.prototype.toString does not yield itself');
|
|
28
|
+
t.notEqual(callBound('%Object.prototype.toString%'), Object.prototype.toString, '%Object.prototype.toString% does not yield itself');
|
|
29
|
+
t.equal(callBound('Object.prototype.toString')(true), Object.prototype.toString.call(true), 'call-bound Object.prototype.toString calls into the original');
|
|
30
|
+
t.equal(callBound('%Object.prototype.toString%')(true), Object.prototype.toString.call(true), 'call-bound %Object.prototype.toString% calls into the original');
|
|
31
|
+
|
|
32
|
+
t['throws'](
|
|
33
|
+
function () { callBound('does not exist'); },
|
|
34
|
+
SyntaxError,
|
|
35
|
+
'nonexistent intrinsic throws'
|
|
36
|
+
);
|
|
37
|
+
t['throws'](
|
|
38
|
+
function () { callBound('does not exist', true); },
|
|
39
|
+
SyntaxError,
|
|
40
|
+
'allowMissing arg still throws for unknown intrinsic'
|
|
41
|
+
);
|
|
42
|
+
|
|
43
|
+
/* globals WeakRef: false */
|
|
44
|
+
t.test('real but absent intrinsic', { skip: typeof WeakRef !== 'undefined' }, function (st) {
|
|
45
|
+
st['throws'](
|
|
46
|
+
function () { callBound('WeakRef'); },
|
|
47
|
+
TypeError,
|
|
48
|
+
'real but absent intrinsic throws'
|
|
49
|
+
);
|
|
50
|
+
st.equal(callBound('WeakRef', true), undefined, 'allowMissing arg avoids exception');
|
|
51
|
+
st.end();
|
|
52
|
+
});
|
|
53
|
+
|
|
54
|
+
t.end();
|
|
55
|
+
});
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var callBind = require('../');
|
|
4
|
+
var bind = require('function-bind');
|
|
5
|
+
|
|
6
|
+
var test = require('tape');
|
|
7
|
+
|
|
8
|
+
/*
|
|
9
|
+
* older engines have length nonconfigurable
|
|
10
|
+
* in io.js v3, it is configurable except on bound functions, hence the .bind()
|
|
11
|
+
*/
|
|
12
|
+
var functionsHaveConfigurableLengths = !!(
|
|
13
|
+
Object.getOwnPropertyDescriptor
|
|
14
|
+
&& Object.getOwnPropertyDescriptor(bind.call(function () {}), 'length').configurable
|
|
15
|
+
);
|
|
16
|
+
|
|
17
|
+
test('callBind', function (t) {
|
|
18
|
+
var sentinel = { sentinel: true };
|
|
19
|
+
var func = function (a, b) {
|
|
20
|
+
// eslint-disable-next-line no-invalid-this
|
|
21
|
+
return [this, a, b];
|
|
22
|
+
};
|
|
23
|
+
t.equal(func.length, 2, 'original function length is 2');
|
|
24
|
+
t.deepEqual(func(), [undefined, undefined, undefined], 'unbound func with too few args');
|
|
25
|
+
t.deepEqual(func(1, 2), [undefined, 1, 2], 'unbound func with right args');
|
|
26
|
+
t.deepEqual(func(1, 2, 3), [undefined, 1, 2], 'unbound func with too many args');
|
|
27
|
+
|
|
28
|
+
var bound = callBind(func);
|
|
29
|
+
t.equal(bound.length, func.length + 1, 'function length is preserved', { skip: !functionsHaveConfigurableLengths });
|
|
30
|
+
t.deepEqual(bound(), [undefined, undefined, undefined], 'bound func with too few args');
|
|
31
|
+
t.deepEqual(bound(1, 2), [1, 2, undefined], 'bound func with right args');
|
|
32
|
+
t.deepEqual(bound(1, 2, 3), [1, 2, 3], 'bound func with too many args');
|
|
33
|
+
|
|
34
|
+
var boundR = callBind(func, sentinel);
|
|
35
|
+
t.equal(boundR.length, func.length, 'function length is preserved', { skip: !functionsHaveConfigurableLengths });
|
|
36
|
+
t.deepEqual(boundR(), [sentinel, undefined, undefined], 'bound func with receiver, with too few args');
|
|
37
|
+
t.deepEqual(boundR(1, 2), [sentinel, 1, 2], 'bound func with receiver, with right args');
|
|
38
|
+
t.deepEqual(boundR(1, 2, 3), [sentinel, 1, 2], 'bound func with receiver, with too many args');
|
|
39
|
+
|
|
40
|
+
var boundArg = callBind(func, sentinel, 1);
|
|
41
|
+
t.equal(boundArg.length, func.length - 1, 'function length is preserved', { skip: !functionsHaveConfigurableLengths });
|
|
42
|
+
t.deepEqual(boundArg(), [sentinel, 1, undefined], 'bound func with receiver and arg, with too few args');
|
|
43
|
+
t.deepEqual(boundArg(2), [sentinel, 1, 2], 'bound func with receiver and arg, with right arg');
|
|
44
|
+
t.deepEqual(boundArg(2, 3), [sentinel, 1, 2], 'bound func with receiver and arg, with too many args');
|
|
45
|
+
|
|
46
|
+
t.test('callBind.apply', function (st) {
|
|
47
|
+
var aBound = callBind.apply(func);
|
|
48
|
+
st.deepEqual(aBound(sentinel), [sentinel, undefined, undefined], 'apply-bound func with no args');
|
|
49
|
+
st.deepEqual(aBound(sentinel, [1], 4), [sentinel, 1, undefined], 'apply-bound func with too few args');
|
|
50
|
+
st.deepEqual(aBound(sentinel, [1, 2], 4), [sentinel, 1, 2], 'apply-bound func with right args');
|
|
51
|
+
|
|
52
|
+
var aBoundArg = callBind.apply(func);
|
|
53
|
+
st.deepEqual(aBoundArg(sentinel, [1, 2, 3], 4), [sentinel, 1, 2], 'apply-bound func with too many args');
|
|
54
|
+
st.deepEqual(aBoundArg(sentinel, [1, 2], 4), [sentinel, 1, 2], 'apply-bound func with right args');
|
|
55
|
+
st.deepEqual(aBoundArg(sentinel, [1], 4), [sentinel, 1, undefined], 'apply-bound func with too few args');
|
|
56
|
+
|
|
57
|
+
var aBoundR = callBind.apply(func, sentinel);
|
|
58
|
+
st.deepEqual(aBoundR([1, 2, 3], 4), [sentinel, 1, 2], 'apply-bound func with receiver and too many args');
|
|
59
|
+
st.deepEqual(aBoundR([1, 2], 4), [sentinel, 1, 2], 'apply-bound func with receiver and right args');
|
|
60
|
+
st.deepEqual(aBoundR([1], 4), [sentinel, 1, undefined], 'apply-bound func with receiver and too few args');
|
|
61
|
+
|
|
62
|
+
st.end();
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
t.end();
|
|
66
|
+
});
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
0.5.4 / 2021-12-10
|
|
2
|
+
==================
|
|
3
|
+
|
|
4
|
+
* deps: safe-buffer@5.2.1
|
|
5
|
+
|
|
6
|
+
0.5.3 / 2018-12-17
|
|
7
|
+
==================
|
|
8
|
+
|
|
9
|
+
* Use `safe-buffer` for improved Buffer API
|
|
10
|
+
|
|
11
|
+
0.5.2 / 2016-12-08
|
|
12
|
+
==================
|
|
13
|
+
|
|
14
|
+
* Fix `parse` to accept any linear whitespace character
|
|
15
|
+
|
|
16
|
+
0.5.1 / 2016-01-17
|
|
17
|
+
==================
|
|
18
|
+
|
|
19
|
+
* perf: enable strict mode
|
|
20
|
+
|
|
21
|
+
0.5.0 / 2014-10-11
|
|
22
|
+
==================
|
|
23
|
+
|
|
24
|
+
* Add `parse` function
|
|
25
|
+
|
|
26
|
+
0.4.0 / 2014-09-21
|
|
27
|
+
==================
|
|
28
|
+
|
|
29
|
+
* Expand non-Unicode `filename` to the full ISO-8859-1 charset
|
|
30
|
+
|
|
31
|
+
0.3.0 / 2014-09-20
|
|
32
|
+
==================
|
|
33
|
+
|
|
34
|
+
* Add `fallback` option
|
|
35
|
+
* Add `type` option
|
|
36
|
+
|
|
37
|
+
0.2.0 / 2014-09-19
|
|
38
|
+
==================
|
|
39
|
+
|
|
40
|
+
* Reduce ambiguity of file names with hex escape in buggy browsers
|
|
41
|
+
|
|
42
|
+
0.1.2 / 2014-09-19
|
|
43
|
+
==================
|
|
44
|
+
|
|
45
|
+
* Fix periodic invalid Unicode filename header
|
|
46
|
+
|
|
47
|
+
0.1.1 / 2014-09-19
|
|
48
|
+
==================
|
|
49
|
+
|
|
50
|
+
* Fix invalid characters appearing in `filename*` parameter
|
|
51
|
+
|
|
52
|
+
0.1.0 / 2014-09-18
|
|
53
|
+
==================
|
|
54
|
+
|
|
55
|
+
* Make the `filename` argument optional
|
|
56
|
+
|
|
57
|
+
0.0.0 / 2014-09-18
|
|
58
|
+
==================
|
|
59
|
+
|
|
60
|
+
* Initial release
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
(The MIT License)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2014-2017 Douglas Christopher Wilson
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
a copy of this software and associated documentation files (the
|
|
7
|
+
'Software'), to deal in the Software without restriction, including
|
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
+
the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be
|
|
14
|
+
included in all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
|
19
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
|
20
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
|
21
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
|
22
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|