crabatool 1.0.2 → 1.0.3
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/index.js +23 -2
- package/ngp/config.js +2 -2
- package/ngp/node_modules/.bin/mime +12 -0
- package/ngp/node_modules/.bin/mime.cmd +17 -0
- package/ngp/node_modules/.bin/mime.ps1 +28 -0
- package/ngp/node_modules/.bin/uglifyjs +12 -0
- package/ngp/node_modules/.bin/uglifyjs.cmd +17 -0
- package/ngp/node_modules/.bin/uglifyjs.ps1 +28 -0
- package/ngp/node_modules/.package-lock.json +863 -0
- package/ngp/node_modules/accepts/HISTORY.md +243 -0
- package/ngp/node_modules/accepts/LICENSE +23 -0
- package/ngp/node_modules/accepts/README.md +140 -0
- package/ngp/node_modules/accepts/index.js +238 -0
- package/ngp/node_modules/accepts/package.json +47 -0
- package/ngp/node_modules/anymatch/LICENSE +15 -0
- package/ngp/node_modules/anymatch/README.md +87 -0
- package/ngp/node_modules/anymatch/index.d.ts +19 -0
- package/ngp/node_modules/anymatch/index.js +104 -0
- package/ngp/node_modules/anymatch/package.json +48 -0
- package/ngp/node_modules/array-flatten/LICENSE +21 -0
- package/ngp/node_modules/array-flatten/README.md +43 -0
- package/ngp/node_modules/array-flatten/array-flatten.js +64 -0
- package/ngp/node_modules/array-flatten/package.json +39 -0
- package/ngp/node_modules/binary-extensions/binary-extensions.json +260 -0
- package/ngp/node_modules/binary-extensions/binary-extensions.json.d.ts +3 -0
- package/ngp/node_modules/binary-extensions/index.d.ts +14 -0
- package/ngp/node_modules/binary-extensions/index.js +1 -0
- package/ngp/node_modules/binary-extensions/license +9 -0
- package/ngp/node_modules/binary-extensions/package.json +38 -0
- package/ngp/node_modules/binary-extensions/readme.md +41 -0
- package/ngp/node_modules/body-parser/HISTORY.md +651 -0
- package/ngp/node_modules/body-parser/LICENSE +23 -0
- package/ngp/node_modules/body-parser/README.md +464 -0
- package/ngp/node_modules/body-parser/SECURITY.md +25 -0
- package/ngp/node_modules/body-parser/index.js +157 -0
- package/ngp/node_modules/body-parser/lib/read.js +205 -0
- package/ngp/node_modules/body-parser/lib/types/json.js +236 -0
- package/ngp/node_modules/body-parser/lib/types/raw.js +101 -0
- package/ngp/node_modules/body-parser/lib/types/text.js +121 -0
- package/ngp/node_modules/body-parser/lib/types/urlencoded.js +284 -0
- package/ngp/node_modules/body-parser/node_modules/bytes/History.md +97 -0
- package/ngp/node_modules/body-parser/node_modules/bytes/LICENSE +23 -0
- package/ngp/node_modules/body-parser/node_modules/bytes/Readme.md +152 -0
- package/ngp/node_modules/body-parser/node_modules/bytes/index.js +170 -0
- package/ngp/node_modules/body-parser/node_modules/bytes/package.json +42 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/Changelog.md +162 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/LICENSE +21 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/README.md +156 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/encodings/dbcs-codec.js +555 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/encodings/dbcs-data.js +176 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/encodings/index.js +22 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/encodings/internal.js +188 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/encodings/sbcs-codec.js +72 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/encodings/sbcs-data.js +174 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/gbk-added.json +55 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/encodings/utf16.js +177 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/encodings/utf7.js +290 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/lib/bom-handling.js +52 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/lib/extend-node.js +217 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/lib/index.d.ts +24 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/lib/index.js +153 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/lib/streams.js +121 -0
- package/ngp/node_modules/body-parser/node_modules/iconv-lite/package.json +46 -0
- package/ngp/node_modules/body-parser/package.json +56 -0
- package/ngp/node_modules/braces/CHANGELOG.md +184 -0
- package/ngp/node_modules/braces/LICENSE +21 -0
- package/ngp/node_modules/braces/README.md +593 -0
- package/ngp/node_modules/braces/index.js +170 -0
- package/ngp/node_modules/braces/lib/compile.js +57 -0
- package/ngp/node_modules/braces/lib/constants.js +57 -0
- package/ngp/node_modules/braces/lib/expand.js +113 -0
- package/ngp/node_modules/braces/lib/parse.js +333 -0
- package/ngp/node_modules/braces/lib/stringify.js +32 -0
- package/ngp/node_modules/braces/lib/utils.js +112 -0
- package/ngp/node_modules/braces/package.json +77 -0
- package/ngp/node_modules/bytes/History.md +82 -0
- package/ngp/node_modules/bytes/LICENSE +23 -0
- package/ngp/node_modules/bytes/Readme.md +125 -0
- package/ngp/node_modules/bytes/index.js +159 -0
- package/ngp/node_modules/bytes/package.json +39 -0
- package/ngp/node_modules/call-bind/.eslintignore +1 -0
- package/ngp/node_modules/call-bind/.eslintrc +17 -0
- package/ngp/node_modules/call-bind/.github/FUNDING.yml +12 -0
- package/ngp/node_modules/call-bind/.nycrc +13 -0
- package/ngp/node_modules/call-bind/CHANGELOG.md +42 -0
- package/ngp/node_modules/call-bind/LICENSE +21 -0
- package/ngp/node_modules/call-bind/README.md +2 -0
- package/ngp/node_modules/call-bind/callBound.js +15 -0
- package/ngp/node_modules/call-bind/index.js +47 -0
- package/ngp/node_modules/call-bind/package.json +80 -0
- package/ngp/node_modules/call-bind/test/callBound.js +55 -0
- package/ngp/node_modules/call-bind/test/index.js +66 -0
- package/ngp/node_modules/chokidar/LICENSE +21 -0
- package/ngp/node_modules/chokidar/README.md +308 -0
- package/ngp/node_modules/chokidar/index.js +973 -0
- package/ngp/node_modules/chokidar/lib/constants.js +65 -0
- package/ngp/node_modules/chokidar/lib/fsevents-handler.js +524 -0
- package/ngp/node_modules/chokidar/lib/nodefs-handler.js +654 -0
- package/ngp/node_modules/chokidar/package.json +85 -0
- package/ngp/node_modules/chokidar/types/index.d.ts +188 -0
- package/ngp/node_modules/compressible/HISTORY.md +111 -0
- package/ngp/node_modules/compressible/LICENSE +24 -0
- package/ngp/node_modules/compressible/README.md +61 -0
- package/ngp/node_modules/compressible/index.js +58 -0
- package/ngp/node_modules/compressible/package.json +48 -0
- package/ngp/node_modules/compression/HISTORY.md +307 -0
- package/ngp/node_modules/compression/LICENSE +23 -0
- package/ngp/node_modules/compression/README.md +240 -0
- package/ngp/node_modules/compression/index.js +288 -0
- package/ngp/node_modules/compression/package.json +47 -0
- package/ngp/node_modules/content-disposition/HISTORY.md +60 -0
- package/ngp/node_modules/content-disposition/LICENSE +22 -0
- package/ngp/node_modules/content-disposition/README.md +142 -0
- package/ngp/node_modules/content-disposition/index.js +458 -0
- package/ngp/node_modules/content-disposition/node_modules/safe-buffer/LICENSE +21 -0
- package/ngp/node_modules/content-disposition/node_modules/safe-buffer/README.md +584 -0
- package/ngp/node_modules/content-disposition/node_modules/safe-buffer/index.d.ts +187 -0
- package/ngp/node_modules/content-disposition/node_modules/safe-buffer/index.js +65 -0
- package/ngp/node_modules/content-disposition/node_modules/safe-buffer/package.json +51 -0
- package/ngp/node_modules/content-disposition/package.json +44 -0
- package/ngp/node_modules/content-type/HISTORY.md +24 -0
- package/ngp/node_modules/content-type/LICENSE +22 -0
- package/ngp/node_modules/content-type/README.md +92 -0
- package/ngp/node_modules/content-type/index.js +222 -0
- package/ngp/node_modules/content-type/package.json +40 -0
- package/ngp/node_modules/cookie/HISTORY.md +142 -0
- package/ngp/node_modules/cookie/LICENSE +24 -0
- package/ngp/node_modules/cookie/README.md +302 -0
- package/ngp/node_modules/cookie/SECURITY.md +25 -0
- package/ngp/node_modules/cookie/index.js +270 -0
- package/ngp/node_modules/cookie/package.json +44 -0
- package/ngp/node_modules/cookie-signature/History.md +38 -0
- package/ngp/node_modules/cookie-signature/Readme.md +42 -0
- package/ngp/node_modules/cookie-signature/index.js +51 -0
- package/ngp/node_modules/cookie-signature/package.json +18 -0
- package/ngp/node_modules/crabatool/index.js +28 -0
- package/ngp/node_modules/crabatool/ngp/config.js +25 -0
- package/ngp/node_modules/crabatool/ngp/ngp.js +3 -0
- package/ngp/node_modules/crabatool/ngp/package.json +15 -0
- package/ngp/node_modules/crabatool/ngp/readme.md +4 -0
- package/ngp/node_modules/crabatool/package.json +25 -0
- package/ngp/node_modules/crabatool/readme.md +12 -0
- package/ngp/node_modules/crabatool/server.js +124 -0
- package/ngp/node_modules/debug/.coveralls.yml +1 -0
- package/ngp/node_modules/debug/.eslintrc +11 -0
- package/ngp/node_modules/debug/.travis.yml +14 -0
- package/ngp/node_modules/debug/CHANGELOG.md +362 -0
- package/ngp/node_modules/debug/LICENSE +19 -0
- package/ngp/node_modules/debug/Makefile +50 -0
- package/ngp/node_modules/debug/README.md +312 -0
- package/ngp/node_modules/debug/component.json +19 -0
- package/ngp/node_modules/debug/karma.conf.js +70 -0
- package/ngp/node_modules/debug/node.js +1 -0
- package/ngp/node_modules/debug/package.json +49 -0
- package/ngp/node_modules/debug/src/browser.js +185 -0
- package/ngp/node_modules/debug/src/debug.js +202 -0
- package/ngp/node_modules/debug/src/index.js +10 -0
- package/ngp/node_modules/debug/src/inspector-log.js +15 -0
- package/ngp/node_modules/debug/src/node.js +248 -0
- package/ngp/node_modules/depd/History.md +103 -0
- package/ngp/node_modules/depd/LICENSE +22 -0
- package/ngp/node_modules/depd/Readme.md +280 -0
- package/ngp/node_modules/depd/index.js +538 -0
- package/ngp/node_modules/depd/lib/browser/index.js +77 -0
- package/ngp/node_modules/depd/package.json +45 -0
- package/ngp/node_modules/destroy/LICENSE +23 -0
- package/ngp/node_modules/destroy/README.md +63 -0
- package/ngp/node_modules/destroy/index.js +209 -0
- package/ngp/node_modules/destroy/package.json +48 -0
- package/ngp/node_modules/ee-first/LICENSE +22 -0
- package/ngp/node_modules/ee-first/README.md +80 -0
- package/ngp/node_modules/ee-first/index.js +95 -0
- package/ngp/node_modules/ee-first/package.json +29 -0
- package/ngp/node_modules/encodeurl/HISTORY.md +14 -0
- package/ngp/node_modules/encodeurl/LICENSE +22 -0
- package/ngp/node_modules/encodeurl/README.md +128 -0
- package/ngp/node_modules/encodeurl/index.js +60 -0
- package/ngp/node_modules/encodeurl/package.json +40 -0
- package/ngp/node_modules/escape-html/LICENSE +24 -0
- package/ngp/node_modules/escape-html/Readme.md +43 -0
- package/ngp/node_modules/escape-html/index.js +78 -0
- package/ngp/node_modules/escape-html/package.json +24 -0
- package/ngp/node_modules/etag/HISTORY.md +83 -0
- package/ngp/node_modules/etag/LICENSE +22 -0
- package/ngp/node_modules/etag/README.md +159 -0
- package/ngp/node_modules/etag/index.js +131 -0
- package/ngp/node_modules/etag/package.json +47 -0
- package/ngp/node_modules/express/History.md +3579 -0
- package/ngp/node_modules/express/LICENSE +24 -0
- package/ngp/node_modules/express/Readme.md +166 -0
- package/ngp/node_modules/express/index.js +11 -0
- package/ngp/node_modules/express/lib/application.js +661 -0
- package/ngp/node_modules/express/lib/express.js +116 -0
- package/ngp/node_modules/express/lib/middleware/init.js +43 -0
- package/ngp/node_modules/express/lib/middleware/query.js +47 -0
- package/ngp/node_modules/express/lib/request.js +525 -0
- package/ngp/node_modules/express/lib/response.js +1169 -0
- package/ngp/node_modules/express/lib/router/index.js +673 -0
- package/ngp/node_modules/express/lib/router/layer.js +181 -0
- package/ngp/node_modules/express/lib/router/route.js +225 -0
- package/ngp/node_modules/express/lib/utils.js +304 -0
- package/ngp/node_modules/express/lib/view.js +182 -0
- package/ngp/node_modules/express/node_modules/safe-buffer/LICENSE +21 -0
- package/ngp/node_modules/express/node_modules/safe-buffer/README.md +584 -0
- package/ngp/node_modules/express/node_modules/safe-buffer/index.d.ts +187 -0
- package/ngp/node_modules/express/node_modules/safe-buffer/index.js +65 -0
- package/ngp/node_modules/express/node_modules/safe-buffer/package.json +51 -0
- package/ngp/node_modules/express/package.json +99 -0
- package/ngp/node_modules/fill-range/LICENSE +21 -0
- package/ngp/node_modules/fill-range/README.md +237 -0
- package/ngp/node_modules/fill-range/index.js +249 -0
- package/ngp/node_modules/fill-range/package.json +69 -0
- package/ngp/node_modules/finalhandler/HISTORY.md +195 -0
- package/ngp/node_modules/finalhandler/LICENSE +22 -0
- package/ngp/node_modules/finalhandler/README.md +147 -0
- package/ngp/node_modules/finalhandler/SECURITY.md +25 -0
- package/ngp/node_modules/finalhandler/index.js +336 -0
- package/ngp/node_modules/finalhandler/package.json +46 -0
- package/ngp/node_modules/forwarded/HISTORY.md +21 -0
- package/ngp/node_modules/forwarded/LICENSE +22 -0
- package/ngp/node_modules/forwarded/README.md +57 -0
- package/ngp/node_modules/forwarded/index.js +90 -0
- package/ngp/node_modules/forwarded/package.json +45 -0
- package/ngp/node_modules/fresh/HISTORY.md +70 -0
- package/ngp/node_modules/fresh/LICENSE +23 -0
- package/ngp/node_modules/fresh/README.md +119 -0
- package/ngp/node_modules/fresh/index.js +137 -0
- package/ngp/node_modules/fresh/package.json +46 -0
- package/ngp/node_modules/function-bind/.editorconfig +20 -0
- package/ngp/node_modules/function-bind/.eslintrc +15 -0
- package/ngp/node_modules/function-bind/.jscs.json +176 -0
- package/ngp/node_modules/function-bind/.travis.yml +168 -0
- package/ngp/node_modules/function-bind/LICENSE +20 -0
- package/ngp/node_modules/function-bind/README.md +48 -0
- package/ngp/node_modules/function-bind/implementation.js +52 -0
- package/ngp/node_modules/function-bind/index.js +5 -0
- package/ngp/node_modules/function-bind/package.json +63 -0
- package/ngp/node_modules/function-bind/test/.eslintrc +9 -0
- package/ngp/node_modules/function-bind/test/index.js +252 -0
- package/ngp/node_modules/get-intrinsic/.eslintignore +1 -0
- package/ngp/node_modules/get-intrinsic/.eslintrc +43 -0
- package/ngp/node_modules/get-intrinsic/.github/FUNDING.yml +12 -0
- package/ngp/node_modules/get-intrinsic/.nycrc +13 -0
- package/ngp/node_modules/get-intrinsic/CHANGELOG.md +64 -0
- package/ngp/node_modules/get-intrinsic/LICENSE +21 -0
- package/ngp/node_modules/get-intrinsic/README.md +65 -0
- package/ngp/node_modules/get-intrinsic/index.js +330 -0
- package/ngp/node_modules/get-intrinsic/package.json +78 -0
- package/ngp/node_modules/get-intrinsic/test/GetIntrinsic.js +260 -0
- package/ngp/node_modules/glob-parent/CHANGELOG.md +110 -0
- package/ngp/node_modules/glob-parent/LICENSE +15 -0
- package/ngp/node_modules/glob-parent/README.md +137 -0
- package/ngp/node_modules/glob-parent/index.js +42 -0
- package/ngp/node_modules/glob-parent/package.json +48 -0
- package/ngp/node_modules/has/LICENSE-MIT +22 -0
- package/ngp/node_modules/has/README.md +18 -0
- package/ngp/node_modules/has/package.json +48 -0
- package/ngp/node_modules/has/src/index.js +5 -0
- package/ngp/node_modules/has/test/index.js +10 -0
- package/ngp/node_modules/has-symbols/.eslintrc +11 -0
- package/ngp/node_modules/has-symbols/.github/FUNDING.yml +12 -0
- package/ngp/node_modules/has-symbols/.nycrc +9 -0
- package/ngp/node_modules/has-symbols/CHANGELOG.md +75 -0
- package/ngp/node_modules/has-symbols/LICENSE +21 -0
- package/ngp/node_modules/has-symbols/README.md +46 -0
- package/ngp/node_modules/has-symbols/index.js +13 -0
- package/ngp/node_modules/has-symbols/package.json +101 -0
- package/ngp/node_modules/has-symbols/shams.js +42 -0
- package/ngp/node_modules/has-symbols/test/index.js +22 -0
- package/ngp/node_modules/has-symbols/test/shams/core-js.js +28 -0
- package/ngp/node_modules/has-symbols/test/shams/get-own-property-symbols.js +28 -0
- package/ngp/node_modules/has-symbols/test/tests.js +56 -0
- package/ngp/node_modules/http-errors/HISTORY.md +180 -0
- package/ngp/node_modules/http-errors/LICENSE +23 -0
- package/ngp/node_modules/http-errors/README.md +169 -0
- package/ngp/node_modules/http-errors/index.js +289 -0
- package/ngp/node_modules/http-errors/package.json +50 -0
- package/ngp/node_modules/iconv-lite/Changelog.md +184 -0
- package/ngp/node_modules/iconv-lite/LICENSE +21 -0
- package/ngp/node_modules/iconv-lite/README.md +166 -0
- package/ngp/node_modules/iconv-lite/encodings/dbcs-codec.js +555 -0
- package/ngp/node_modules/iconv-lite/encodings/dbcs-data.js +176 -0
- package/ngp/node_modules/iconv-lite/encodings/index.js +23 -0
- package/ngp/node_modules/iconv-lite/encodings/internal.js +188 -0
- package/ngp/node_modules/iconv-lite/encodings/sbcs-codec.js +72 -0
- package/ngp/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
- package/ngp/node_modules/iconv-lite/encodings/sbcs-data.js +179 -0
- package/ngp/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
- package/ngp/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
- package/ngp/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
- package/ngp/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
- package/ngp/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
- package/ngp/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
- package/ngp/node_modules/iconv-lite/encodings/tables/gbk-added.json +55 -0
- package/ngp/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
- package/ngp/node_modules/iconv-lite/encodings/utf16.js +177 -0
- package/ngp/node_modules/iconv-lite/encodings/utf32.js +281 -0
- package/ngp/node_modules/iconv-lite/encodings/utf7.js +290 -0
- package/ngp/node_modules/iconv-lite/lib/bom-handling.js +52 -0
- package/ngp/node_modules/iconv-lite/lib/extend-node.js +217 -0
- package/ngp/node_modules/iconv-lite/lib/index.d.ts +41 -0
- package/ngp/node_modules/iconv-lite/lib/index.js +153 -0
- package/ngp/node_modules/iconv-lite/lib/streams.js +121 -0
- package/ngp/node_modules/iconv-lite/package.json +45 -0
- package/ngp/node_modules/inherits/LICENSE +16 -0
- package/ngp/node_modules/inherits/README.md +42 -0
- package/ngp/node_modules/inherits/inherits.js +9 -0
- package/ngp/node_modules/inherits/inherits_browser.js +27 -0
- package/ngp/node_modules/inherits/package.json +29 -0
- package/ngp/node_modules/ipaddr.js/LICENSE +19 -0
- package/ngp/node_modules/ipaddr.js/README.md +233 -0
- package/ngp/node_modules/ipaddr.js/ipaddr.min.js +1 -0
- package/ngp/node_modules/ipaddr.js/lib/ipaddr.js +673 -0
- package/ngp/node_modules/ipaddr.js/lib/ipaddr.js.d.ts +68 -0
- package/ngp/node_modules/ipaddr.js/package.json +35 -0
- package/ngp/node_modules/is-binary-path/index.d.ts +17 -0
- package/ngp/node_modules/is-binary-path/index.js +7 -0
- package/ngp/node_modules/is-binary-path/license +9 -0
- package/ngp/node_modules/is-binary-path/package.json +40 -0
- package/ngp/node_modules/is-binary-path/readme.md +34 -0
- package/ngp/node_modules/is-extglob/LICENSE +21 -0
- package/ngp/node_modules/is-extglob/README.md +107 -0
- package/ngp/node_modules/is-extglob/index.js +20 -0
- package/ngp/node_modules/is-extglob/package.json +69 -0
- package/ngp/node_modules/is-glob/LICENSE +21 -0
- package/ngp/node_modules/is-glob/README.md +206 -0
- package/ngp/node_modules/is-glob/index.js +150 -0
- package/ngp/node_modules/is-glob/package.json +81 -0
- package/ngp/node_modules/is-number/LICENSE +21 -0
- package/ngp/node_modules/is-number/README.md +187 -0
- package/ngp/node_modules/is-number/index.js +18 -0
- package/ngp/node_modules/is-number/package.json +82 -0
- package/ngp/node_modules/media-typer/HISTORY.md +22 -0
- package/ngp/node_modules/media-typer/LICENSE +22 -0
- package/ngp/node_modules/media-typer/README.md +81 -0
- package/ngp/node_modules/media-typer/index.js +270 -0
- package/ngp/node_modules/media-typer/package.json +26 -0
- package/ngp/node_modules/merge-descriptors/HISTORY.md +21 -0
- package/ngp/node_modules/merge-descriptors/LICENSE +23 -0
- package/ngp/node_modules/merge-descriptors/README.md +48 -0
- package/ngp/node_modules/merge-descriptors/index.js +60 -0
- package/ngp/node_modules/merge-descriptors/package.json +32 -0
- package/ngp/node_modules/methods/HISTORY.md +29 -0
- package/ngp/node_modules/methods/LICENSE +24 -0
- package/ngp/node_modules/methods/README.md +51 -0
- package/ngp/node_modules/methods/index.js +69 -0
- package/ngp/node_modules/methods/package.json +36 -0
- package/ngp/node_modules/mime/CHANGELOG.md +164 -0
- package/ngp/node_modules/mime/LICENSE +21 -0
- package/ngp/node_modules/mime/README.md +90 -0
- package/ngp/node_modules/mime/cli.js +8 -0
- package/ngp/node_modules/mime/mime.js +108 -0
- package/ngp/node_modules/mime/package.json +44 -0
- package/ngp/node_modules/mime/src/build.js +53 -0
- package/ngp/node_modules/mime/src/test.js +60 -0
- package/ngp/node_modules/mime/types.json +1 -0
- package/ngp/node_modules/mime-db/HISTORY.md +507 -0
- package/ngp/node_modules/mime-db/LICENSE +23 -0
- package/ngp/node_modules/mime-db/README.md +100 -0
- package/ngp/node_modules/mime-db/db.json +8519 -0
- package/ngp/node_modules/mime-db/index.js +12 -0
- package/ngp/node_modules/mime-db/package.json +60 -0
- package/ngp/node_modules/mime-types/HISTORY.md +397 -0
- package/ngp/node_modules/mime-types/LICENSE +23 -0
- package/ngp/node_modules/mime-types/README.md +113 -0
- package/ngp/node_modules/mime-types/index.js +188 -0
- package/ngp/node_modules/mime-types/package.json +44 -0
- package/ngp/node_modules/ms/index.js +152 -0
- package/ngp/node_modules/ms/license.md +21 -0
- package/ngp/node_modules/ms/package.json +37 -0
- package/ngp/node_modules/ms/readme.md +51 -0
- package/ngp/node_modules/negotiator/HISTORY.md +108 -0
- package/ngp/node_modules/negotiator/LICENSE +24 -0
- package/ngp/node_modules/negotiator/README.md +203 -0
- package/ngp/node_modules/negotiator/index.js +82 -0
- package/ngp/node_modules/negotiator/lib/charset.js +169 -0
- package/ngp/node_modules/negotiator/lib/encoding.js +184 -0
- package/ngp/node_modules/negotiator/lib/language.js +179 -0
- package/ngp/node_modules/negotiator/lib/mediaType.js +294 -0
- package/ngp/node_modules/negotiator/package.json +42 -0
- package/ngp/node_modules/normalize-path/LICENSE +21 -0
- package/ngp/node_modules/normalize-path/README.md +127 -0
- package/ngp/node_modules/normalize-path/index.js +35 -0
- package/ngp/node_modules/normalize-path/package.json +77 -0
- package/ngp/node_modules/object-inspect/.eslintrc +53 -0
- package/ngp/node_modules/object-inspect/.github/FUNDING.yml +12 -0
- package/ngp/node_modules/object-inspect/.nycrc +13 -0
- package/ngp/node_modules/object-inspect/CHANGELOG.md +360 -0
- package/ngp/node_modules/object-inspect/LICENSE +21 -0
- package/ngp/node_modules/object-inspect/example/all.js +23 -0
- package/ngp/node_modules/object-inspect/example/circular.js +6 -0
- package/ngp/node_modules/object-inspect/example/fn.js +5 -0
- package/ngp/node_modules/object-inspect/example/inspect.js +10 -0
- package/ngp/node_modules/object-inspect/index.js +512 -0
- package/ngp/node_modules/object-inspect/package-support.json +20 -0
- package/ngp/node_modules/object-inspect/package.json +94 -0
- package/ngp/node_modules/object-inspect/readme.markdown +86 -0
- package/ngp/node_modules/object-inspect/test/bigint.js +58 -0
- package/ngp/node_modules/object-inspect/test/browser/dom.js +15 -0
- package/ngp/node_modules/object-inspect/test/circular.js +16 -0
- package/ngp/node_modules/object-inspect/test/deep.js +12 -0
- package/ngp/node_modules/object-inspect/test/element.js +53 -0
- package/ngp/node_modules/object-inspect/test/err.js +48 -0
- package/ngp/node_modules/object-inspect/test/fakes.js +29 -0
- package/ngp/node_modules/object-inspect/test/fn.js +76 -0
- package/ngp/node_modules/object-inspect/test/has.js +15 -0
- package/ngp/node_modules/object-inspect/test/holes.js +15 -0
- package/ngp/node_modules/object-inspect/test/indent-option.js +271 -0
- package/ngp/node_modules/object-inspect/test/inspect.js +139 -0
- package/ngp/node_modules/object-inspect/test/lowbyte.js +12 -0
- package/ngp/node_modules/object-inspect/test/number.js +58 -0
- package/ngp/node_modules/object-inspect/test/quoteStyle.js +17 -0
- package/ngp/node_modules/object-inspect/test/toStringTag.js +40 -0
- package/ngp/node_modules/object-inspect/test/undef.js +12 -0
- package/ngp/node_modules/object-inspect/test/values.js +211 -0
- package/ngp/node_modules/object-inspect/test-core-js.js +26 -0
- package/ngp/node_modules/object-inspect/util.inspect.js +1 -0
- package/ngp/node_modules/on-finished/HISTORY.md +98 -0
- package/ngp/node_modules/on-finished/LICENSE +23 -0
- package/ngp/node_modules/on-finished/README.md +162 -0
- package/ngp/node_modules/on-finished/index.js +234 -0
- package/ngp/node_modules/on-finished/package.json +39 -0
- package/ngp/node_modules/on-headers/HISTORY.md +21 -0
- package/ngp/node_modules/on-headers/LICENSE +22 -0
- package/ngp/node_modules/on-headers/README.md +81 -0
- package/ngp/node_modules/on-headers/index.js +132 -0
- package/ngp/node_modules/on-headers/package.json +42 -0
- package/ngp/node_modules/parseurl/HISTORY.md +58 -0
- package/ngp/node_modules/parseurl/LICENSE +24 -0
- package/ngp/node_modules/parseurl/README.md +133 -0
- package/ngp/node_modules/parseurl/index.js +158 -0
- package/ngp/node_modules/parseurl/package.json +40 -0
- package/ngp/node_modules/path-to-regexp/History.md +36 -0
- package/ngp/node_modules/path-to-regexp/LICENSE +21 -0
- package/ngp/node_modules/path-to-regexp/Readme.md +35 -0
- package/ngp/node_modules/path-to-regexp/index.js +129 -0
- package/ngp/node_modules/path-to-regexp/package.json +30 -0
- package/ngp/node_modules/picomatch/CHANGELOG.md +136 -0
- package/ngp/node_modules/picomatch/LICENSE +21 -0
- package/ngp/node_modules/picomatch/README.md +708 -0
- package/ngp/node_modules/picomatch/index.js +3 -0
- package/ngp/node_modules/picomatch/lib/constants.js +179 -0
- package/ngp/node_modules/picomatch/lib/parse.js +1091 -0
- package/ngp/node_modules/picomatch/lib/picomatch.js +342 -0
- package/ngp/node_modules/picomatch/lib/scan.js +391 -0
- package/ngp/node_modules/picomatch/lib/utils.js +64 -0
- package/ngp/node_modules/picomatch/package.json +81 -0
- package/ngp/node_modules/proxy-addr/HISTORY.md +161 -0
- package/ngp/node_modules/proxy-addr/LICENSE +22 -0
- package/ngp/node_modules/proxy-addr/README.md +139 -0
- package/ngp/node_modules/proxy-addr/index.js +327 -0
- package/ngp/node_modules/proxy-addr/package.json +47 -0
- package/ngp/node_modules/qs/.editorconfig +40 -0
- package/ngp/node_modules/qs/.eslintrc +38 -0
- package/ngp/node_modules/qs/.github/FUNDING.yml +12 -0
- package/ngp/node_modules/qs/.nycrc +13 -0
- package/ngp/node_modules/qs/CHANGELOG.md +388 -0
- package/ngp/node_modules/qs/LICENSE.md +29 -0
- package/ngp/node_modules/qs/README.md +623 -0
- package/ngp/node_modules/qs/dist/qs.js +2044 -0
- package/ngp/node_modules/qs/lib/formats.js +23 -0
- package/ngp/node_modules/qs/lib/index.js +11 -0
- package/ngp/node_modules/qs/lib/parse.js +263 -0
- package/ngp/node_modules/qs/lib/stringify.js +317 -0
- package/ngp/node_modules/qs/lib/utils.js +252 -0
- package/ngp/node_modules/qs/package.json +73 -0
- package/ngp/node_modules/qs/test/parse.js +841 -0
- package/ngp/node_modules/qs/test/stringify.js +865 -0
- package/ngp/node_modules/qs/test/utils.js +136 -0
- package/ngp/node_modules/range-parser/HISTORY.md +56 -0
- package/ngp/node_modules/range-parser/LICENSE +23 -0
- package/ngp/node_modules/range-parser/README.md +84 -0
- package/ngp/node_modules/range-parser/index.js +162 -0
- package/ngp/node_modules/range-parser/package.json +44 -0
- package/ngp/node_modules/raw-body/HISTORY.md +303 -0
- package/ngp/node_modules/raw-body/LICENSE +22 -0
- package/ngp/node_modules/raw-body/README.md +223 -0
- package/ngp/node_modules/raw-body/SECURITY.md +24 -0
- package/ngp/node_modules/raw-body/index.d.ts +87 -0
- package/ngp/node_modules/raw-body/index.js +329 -0
- package/ngp/node_modules/raw-body/node_modules/bytes/History.md +97 -0
- package/ngp/node_modules/raw-body/node_modules/bytes/LICENSE +23 -0
- package/ngp/node_modules/raw-body/node_modules/bytes/Readme.md +152 -0
- package/ngp/node_modules/raw-body/node_modules/bytes/index.js +170 -0
- package/ngp/node_modules/raw-body/node_modules/bytes/package.json +42 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/Changelog.md +162 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/LICENSE +21 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/README.md +156 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/encodings/dbcs-codec.js +555 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/encodings/dbcs-data.js +176 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/encodings/index.js +22 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/encodings/internal.js +188 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/encodings/sbcs-codec.js +72 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/encodings/sbcs-data-generated.js +451 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/encodings/sbcs-data.js +174 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/encodings/tables/big5-added.json +122 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/encodings/tables/cp936.json +264 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/encodings/tables/cp949.json +273 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/encodings/tables/cp950.json +177 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/encodings/tables/eucjp.json +182 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/encodings/tables/gb18030-ranges.json +1 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/encodings/tables/gbk-added.json +55 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/encodings/tables/shiftjis.json +125 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/encodings/utf16.js +177 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/encodings/utf7.js +290 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/lib/bom-handling.js +52 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/lib/extend-node.js +217 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/lib/index.d.ts +24 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/lib/index.js +153 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/lib/streams.js +121 -0
- package/ngp/node_modules/raw-body/node_modules/iconv-lite/package.json +46 -0
- package/ngp/node_modules/raw-body/package.json +49 -0
- package/ngp/node_modules/readdirp/LICENSE +21 -0
- package/ngp/node_modules/readdirp/README.md +122 -0
- package/ngp/node_modules/readdirp/index.d.ts +43 -0
- package/ngp/node_modules/readdirp/index.js +287 -0
- package/ngp/node_modules/readdirp/package.json +122 -0
- package/ngp/node_modules/safe-buffer/LICENSE +21 -0
- package/ngp/node_modules/safe-buffer/README.md +584 -0
- package/ngp/node_modules/safe-buffer/index.d.ts +187 -0
- package/ngp/node_modules/safe-buffer/index.js +62 -0
- package/ngp/node_modules/safe-buffer/package.json +37 -0
- package/ngp/node_modules/safer-buffer/LICENSE +21 -0
- package/ngp/node_modules/safer-buffer/Porting-Buffer.md +268 -0
- package/ngp/node_modules/safer-buffer/Readme.md +156 -0
- package/ngp/node_modules/safer-buffer/dangerous.js +58 -0
- package/ngp/node_modules/safer-buffer/package.json +34 -0
- package/ngp/node_modules/safer-buffer/safer.js +77 -0
- package/ngp/node_modules/safer-buffer/tests.js +406 -0
- package/ngp/node_modules/send/HISTORY.md +521 -0
- package/ngp/node_modules/send/LICENSE +23 -0
- package/ngp/node_modules/send/README.md +327 -0
- package/ngp/node_modules/send/SECURITY.md +24 -0
- package/ngp/node_modules/send/index.js +1143 -0
- package/ngp/node_modules/send/node_modules/ms/index.js +162 -0
- package/ngp/node_modules/send/node_modules/ms/license.md +21 -0
- package/ngp/node_modules/send/node_modules/ms/package.json +38 -0
- package/ngp/node_modules/send/node_modules/ms/readme.md +59 -0
- package/ngp/node_modules/send/package.json +62 -0
- package/ngp/node_modules/serve-static/HISTORY.md +471 -0
- package/ngp/node_modules/serve-static/LICENSE +25 -0
- package/ngp/node_modules/serve-static/README.md +257 -0
- package/ngp/node_modules/serve-static/index.js +210 -0
- package/ngp/node_modules/serve-static/package.json +42 -0
- package/ngp/node_modules/setprototypeof/LICENSE +13 -0
- package/ngp/node_modules/setprototypeof/README.md +31 -0
- package/ngp/node_modules/setprototypeof/index.d.ts +2 -0
- package/ngp/node_modules/setprototypeof/index.js +17 -0
- package/ngp/node_modules/setprototypeof/package.json +38 -0
- package/ngp/node_modules/setprototypeof/test/index.js +24 -0
- package/ngp/node_modules/side-channel/.eslintignore +1 -0
- package/ngp/node_modules/side-channel/.eslintrc +11 -0
- package/ngp/node_modules/side-channel/.github/FUNDING.yml +12 -0
- package/ngp/node_modules/side-channel/.nycrc +13 -0
- package/ngp/node_modules/side-channel/CHANGELOG.md +65 -0
- package/ngp/node_modules/side-channel/LICENSE +21 -0
- package/ngp/node_modules/side-channel/README.md +2 -0
- package/ngp/node_modules/side-channel/index.js +124 -0
- package/ngp/node_modules/side-channel/package.json +67 -0
- package/ngp/node_modules/side-channel/test/index.js +78 -0
- package/ngp/node_modules/statuses/HISTORY.md +82 -0
- package/ngp/node_modules/statuses/LICENSE +23 -0
- package/ngp/node_modules/statuses/README.md +136 -0
- package/ngp/node_modules/statuses/codes.json +65 -0
- package/ngp/node_modules/statuses/index.js +146 -0
- package/ngp/node_modules/statuses/package.json +49 -0
- package/ngp/node_modules/to-regex-range/LICENSE +21 -0
- package/ngp/node_modules/to-regex-range/README.md +305 -0
- package/ngp/node_modules/to-regex-range/index.js +288 -0
- package/ngp/node_modules/to-regex-range/package.json +88 -0
- package/ngp/node_modules/toidentifier/HISTORY.md +9 -0
- package/ngp/node_modules/toidentifier/LICENSE +21 -0
- package/ngp/node_modules/toidentifier/README.md +61 -0
- package/ngp/node_modules/toidentifier/index.js +32 -0
- package/ngp/node_modules/toidentifier/package.json +38 -0
- package/ngp/node_modules/type-is/HISTORY.md +259 -0
- package/ngp/node_modules/type-is/LICENSE +23 -0
- package/ngp/node_modules/type-is/README.md +170 -0
- package/ngp/node_modules/type-is/index.js +266 -0
- package/ngp/node_modules/type-is/package.json +45 -0
- package/ngp/node_modules/uglify-js/LICENSE +29 -0
- package/ngp/node_modules/uglify-js/README.md +1423 -0
- package/ngp/node_modules/uglify-js/bin/uglifyjs +603 -0
- package/ngp/node_modules/uglify-js/lib/ast.js +2132 -0
- package/ngp/node_modules/uglify-js/lib/compress.js +13762 -0
- package/ngp/node_modules/uglify-js/lib/minify.js +277 -0
- package/ngp/node_modules/uglify-js/lib/mozilla-ast.js +1274 -0
- package/ngp/node_modules/uglify-js/lib/output.js +1936 -0
- package/ngp/node_modules/uglify-js/lib/parse.js +2559 -0
- package/ngp/node_modules/uglify-js/lib/propmangle.js +259 -0
- package/ngp/node_modules/uglify-js/lib/scope.js +860 -0
- package/ngp/node_modules/uglify-js/lib/sourcemap.js +195 -0
- package/ngp/node_modules/uglify-js/lib/transform.js +250 -0
- package/ngp/node_modules/uglify-js/lib/utils.js +285 -0
- package/ngp/node_modules/uglify-js/package.json +56 -0
- package/ngp/node_modules/uglify-js/tools/domprops.html +456 -0
- package/ngp/node_modules/uglify-js/tools/domprops.json +8325 -0
- package/ngp/node_modules/uglify-js/tools/exports.js +8 -0
- package/ngp/node_modules/uglify-js/tools/node.js +110 -0
- package/ngp/node_modules/uglify-js/tools/tty.js +22 -0
- package/ngp/node_modules/unpipe/HISTORY.md +4 -0
- package/ngp/node_modules/unpipe/LICENSE +22 -0
- package/ngp/node_modules/unpipe/README.md +43 -0
- package/ngp/node_modules/unpipe/index.js +69 -0
- package/ngp/node_modules/unpipe/package.json +27 -0
- package/ngp/node_modules/utils-merge/LICENSE +20 -0
- package/ngp/node_modules/utils-merge/README.md +34 -0
- package/ngp/node_modules/utils-merge/index.js +23 -0
- package/ngp/node_modules/utils-merge/package.json +40 -0
- package/ngp/node_modules/vary/HISTORY.md +39 -0
- package/ngp/node_modules/vary/LICENSE +22 -0
- package/ngp/node_modules/vary/README.md +101 -0
- package/ngp/node_modules/vary/index.js +149 -0
- package/ngp/node_modules/vary/package.json +43 -0
- package/ngp/package-lock.json +1508 -0
- package/package.json +3 -2
- package/readme.md +0 -4
|
@@ -0,0 +1,260 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var GetIntrinsic = require('../');
|
|
4
|
+
|
|
5
|
+
var test = require('tape');
|
|
6
|
+
var forEach = require('foreach');
|
|
7
|
+
var debug = require('object-inspect');
|
|
8
|
+
var generatorFns = require('make-generator-function')();
|
|
9
|
+
var asyncFns = require('make-async-function').list();
|
|
10
|
+
var asyncGenFns = require('make-async-generator-function')();
|
|
11
|
+
|
|
12
|
+
var callBound = require('call-bind/callBound');
|
|
13
|
+
var v = require('es-value-fixtures');
|
|
14
|
+
var $gOPD = require('es-abstract/helpers/getOwnPropertyDescriptor');
|
|
15
|
+
var defineProperty = require('es-abstract/test/helpers/defineProperty');
|
|
16
|
+
|
|
17
|
+
var $isProto = callBound('%Object.prototype.isPrototypeOf%');
|
|
18
|
+
|
|
19
|
+
test('export', function (t) {
|
|
20
|
+
t.equal(typeof GetIntrinsic, 'function', 'it is a function');
|
|
21
|
+
t.equal(GetIntrinsic.length, 2, 'function has length of 2');
|
|
22
|
+
|
|
23
|
+
t.end();
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
test('throws', function (t) {
|
|
27
|
+
t['throws'](
|
|
28
|
+
function () { GetIntrinsic('not an intrinsic'); },
|
|
29
|
+
SyntaxError,
|
|
30
|
+
'nonexistent intrinsic throws a syntax error'
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
t['throws'](
|
|
34
|
+
function () { GetIntrinsic(''); },
|
|
35
|
+
TypeError,
|
|
36
|
+
'empty string intrinsic throws a type error'
|
|
37
|
+
);
|
|
38
|
+
|
|
39
|
+
t['throws'](
|
|
40
|
+
function () { GetIntrinsic('.'); },
|
|
41
|
+
SyntaxError,
|
|
42
|
+
'"just a dot" intrinsic throws a syntax error'
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
t['throws'](
|
|
46
|
+
function () { GetIntrinsic('%String'); },
|
|
47
|
+
SyntaxError,
|
|
48
|
+
'Leading % without trailing % throws a syntax error'
|
|
49
|
+
);
|
|
50
|
+
|
|
51
|
+
t['throws'](
|
|
52
|
+
function () { GetIntrinsic('String%'); },
|
|
53
|
+
SyntaxError,
|
|
54
|
+
'Trailing % without leading % throws a syntax error'
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
t['throws'](
|
|
58
|
+
function () { GetIntrinsic("String['prototype]"); },
|
|
59
|
+
SyntaxError,
|
|
60
|
+
'Dynamic property access is disallowed for intrinsics (unterminated string)'
|
|
61
|
+
);
|
|
62
|
+
|
|
63
|
+
t['throws'](
|
|
64
|
+
function () { GetIntrinsic('%Proxy.prototype.undefined%'); },
|
|
65
|
+
TypeError,
|
|
66
|
+
"Throws when middle part doesn't exist (%Proxy.prototype.undefined%)"
|
|
67
|
+
);
|
|
68
|
+
|
|
69
|
+
forEach(v.nonStrings, function (nonString) {
|
|
70
|
+
t['throws'](
|
|
71
|
+
function () { GetIntrinsic(nonString); },
|
|
72
|
+
TypeError,
|
|
73
|
+
debug(nonString) + ' is not a String'
|
|
74
|
+
);
|
|
75
|
+
});
|
|
76
|
+
|
|
77
|
+
forEach(v.nonBooleans, function (nonBoolean) {
|
|
78
|
+
t['throws'](
|
|
79
|
+
function () { GetIntrinsic('%', nonBoolean); },
|
|
80
|
+
TypeError,
|
|
81
|
+
debug(nonBoolean) + ' is not a Boolean'
|
|
82
|
+
);
|
|
83
|
+
});
|
|
84
|
+
|
|
85
|
+
forEach([
|
|
86
|
+
'toString',
|
|
87
|
+
'propertyIsEnumerable',
|
|
88
|
+
'hasOwnProperty'
|
|
89
|
+
], function (objectProtoMember) {
|
|
90
|
+
t['throws'](
|
|
91
|
+
function () { GetIntrinsic(objectProtoMember); },
|
|
92
|
+
SyntaxError,
|
|
93
|
+
debug(objectProtoMember) + ' is not an intrinsic'
|
|
94
|
+
);
|
|
95
|
+
});
|
|
96
|
+
|
|
97
|
+
t.end();
|
|
98
|
+
});
|
|
99
|
+
|
|
100
|
+
test('base intrinsics', function (t) {
|
|
101
|
+
t.equal(GetIntrinsic('%Object%'), Object, '%Object% yields Object');
|
|
102
|
+
t.equal(GetIntrinsic('Object'), Object, 'Object yields Object');
|
|
103
|
+
t.equal(GetIntrinsic('%Array%'), Array, '%Array% yields Array');
|
|
104
|
+
t.equal(GetIntrinsic('Array'), Array, 'Array yields Array');
|
|
105
|
+
|
|
106
|
+
t.end();
|
|
107
|
+
});
|
|
108
|
+
|
|
109
|
+
test('dotted paths', function (t) {
|
|
110
|
+
t.equal(GetIntrinsic('%Object.prototype.toString%'), Object.prototype.toString, '%Object.prototype.toString% yields Object.prototype.toString');
|
|
111
|
+
t.equal(GetIntrinsic('Object.prototype.toString'), Object.prototype.toString, 'Object.prototype.toString yields Object.prototype.toString');
|
|
112
|
+
t.equal(GetIntrinsic('%Array.prototype.push%'), Array.prototype.push, '%Array.prototype.push% yields Array.prototype.push');
|
|
113
|
+
t.equal(GetIntrinsic('Array.prototype.push'), Array.prototype.push, 'Array.prototype.push yields Array.prototype.push');
|
|
114
|
+
|
|
115
|
+
test('underscore paths are aliases for dotted paths', { skip: !Object.isFrozen || Object.isFrozen(Object.prototype) }, function (st) {
|
|
116
|
+
var original = GetIntrinsic('%ObjProto_toString%');
|
|
117
|
+
|
|
118
|
+
forEach([
|
|
119
|
+
'%Object.prototype.toString%',
|
|
120
|
+
'Object.prototype.toString',
|
|
121
|
+
'%ObjectPrototype.toString%',
|
|
122
|
+
'ObjectPrototype.toString',
|
|
123
|
+
'%ObjProto_toString%',
|
|
124
|
+
'ObjProto_toString'
|
|
125
|
+
], function (name) {
|
|
126
|
+
defineProperty(Object.prototype, 'toString', {
|
|
127
|
+
value: function toString() {
|
|
128
|
+
return original.apply(this, arguments);
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
st.equal(GetIntrinsic(name), original, name + ' yields original Object.prototype.toString');
|
|
132
|
+
});
|
|
133
|
+
|
|
134
|
+
defineProperty(Object.prototype, 'toString', { value: original });
|
|
135
|
+
st.end();
|
|
136
|
+
});
|
|
137
|
+
|
|
138
|
+
test('dotted paths cache', { skip: !Object.isFrozen || Object.isFrozen(Object.prototype) }, function (st) {
|
|
139
|
+
var original = GetIntrinsic('%Object.prototype.propertyIsEnumerable%');
|
|
140
|
+
|
|
141
|
+
forEach([
|
|
142
|
+
'%Object.prototype.propertyIsEnumerable%',
|
|
143
|
+
'Object.prototype.propertyIsEnumerable',
|
|
144
|
+
'%ObjectPrototype.propertyIsEnumerable%',
|
|
145
|
+
'ObjectPrototype.propertyIsEnumerable'
|
|
146
|
+
], function (name) {
|
|
147
|
+
// eslint-disable-next-line no-extend-native
|
|
148
|
+
Object.prototype.propertyIsEnumerable = function propertyIsEnumerable() {
|
|
149
|
+
return original.apply(this, arguments);
|
|
150
|
+
};
|
|
151
|
+
st.equal(GetIntrinsic(name), original, name + ' yields cached Object.prototype.propertyIsEnumerable');
|
|
152
|
+
});
|
|
153
|
+
|
|
154
|
+
// eslint-disable-next-line no-extend-native
|
|
155
|
+
Object.prototype.propertyIsEnumerable = original;
|
|
156
|
+
st.end();
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
test('dotted path reports correct error', function (st) {
|
|
160
|
+
st['throws'](function () {
|
|
161
|
+
GetIntrinsic('%NonExistentIntrinsic.prototype.property%');
|
|
162
|
+
}, /%NonExistentIntrinsic%/, 'The base intrinsic of %NonExistentIntrinsic.prototype.property% is %NonExistentIntrinsic%');
|
|
163
|
+
|
|
164
|
+
st['throws'](function () {
|
|
165
|
+
GetIntrinsic('%NonExistentIntrinsicPrototype.property%');
|
|
166
|
+
}, /%NonExistentIntrinsicPrototype%/, 'The base intrinsic of %NonExistentIntrinsicPrototype.property% is %NonExistentIntrinsicPrototype%');
|
|
167
|
+
|
|
168
|
+
st.end();
|
|
169
|
+
});
|
|
170
|
+
|
|
171
|
+
t.end();
|
|
172
|
+
});
|
|
173
|
+
|
|
174
|
+
test('accessors', { skip: !$gOPD || typeof Map !== 'function' }, function (t) {
|
|
175
|
+
var actual = $gOPD(Map.prototype, 'size');
|
|
176
|
+
t.ok(actual, 'Map.prototype.size has a descriptor');
|
|
177
|
+
t.equal(typeof actual.get, 'function', 'Map.prototype.size has a getter function');
|
|
178
|
+
t.equal(GetIntrinsic('%Map.prototype.size%'), actual.get, '%Map.prototype.size% yields the getter for it');
|
|
179
|
+
t.equal(GetIntrinsic('Map.prototype.size'), actual.get, 'Map.prototype.size yields the getter for it');
|
|
180
|
+
|
|
181
|
+
t.end();
|
|
182
|
+
});
|
|
183
|
+
|
|
184
|
+
test('generator functions', { skip: !generatorFns.length }, function (t) {
|
|
185
|
+
var $GeneratorFunction = GetIntrinsic('%GeneratorFunction%');
|
|
186
|
+
var $GeneratorFunctionPrototype = GetIntrinsic('%Generator%');
|
|
187
|
+
var $GeneratorPrototype = GetIntrinsic('%GeneratorPrototype%');
|
|
188
|
+
|
|
189
|
+
forEach(generatorFns, function (genFn) {
|
|
190
|
+
var fnName = genFn.name;
|
|
191
|
+
fnName = fnName ? "'" + fnName + "'" : 'genFn';
|
|
192
|
+
|
|
193
|
+
t.ok(genFn instanceof $GeneratorFunction, fnName + ' instanceof %GeneratorFunction%');
|
|
194
|
+
t.ok($isProto($GeneratorFunctionPrototype, genFn), '%Generator% is prototype of ' + fnName);
|
|
195
|
+
t.ok($isProto($GeneratorPrototype, genFn.prototype), '%GeneratorPrototype% is prototype of ' + fnName + '.prototype');
|
|
196
|
+
});
|
|
197
|
+
|
|
198
|
+
t.end();
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
test('async functions', { skip: !asyncFns.length }, function (t) {
|
|
202
|
+
var $AsyncFunction = GetIntrinsic('%AsyncFunction%');
|
|
203
|
+
var $AsyncFunctionPrototype = GetIntrinsic('%AsyncFunctionPrototype%');
|
|
204
|
+
|
|
205
|
+
forEach(asyncFns, function (asyncFn) {
|
|
206
|
+
var fnName = asyncFn.name;
|
|
207
|
+
fnName = fnName ? "'" + fnName + "'" : 'asyncFn';
|
|
208
|
+
|
|
209
|
+
t.ok(asyncFn instanceof $AsyncFunction, fnName + ' instanceof %AsyncFunction%');
|
|
210
|
+
t.ok($isProto($AsyncFunctionPrototype, asyncFn), '%AsyncFunctionPrototype% is prototype of ' + fnName);
|
|
211
|
+
});
|
|
212
|
+
|
|
213
|
+
t.end();
|
|
214
|
+
});
|
|
215
|
+
|
|
216
|
+
test('async generator functions', { skip: asyncGenFns.length === 0 }, function (t) {
|
|
217
|
+
var $AsyncGeneratorFunction = GetIntrinsic('%AsyncGeneratorFunction%');
|
|
218
|
+
var $AsyncGeneratorFunctionPrototype = GetIntrinsic('%AsyncGenerator%');
|
|
219
|
+
var $AsyncGeneratorPrototype = GetIntrinsic('%AsyncGeneratorPrototype%');
|
|
220
|
+
|
|
221
|
+
forEach(asyncGenFns, function (asyncGenFn) {
|
|
222
|
+
var fnName = asyncGenFn.name;
|
|
223
|
+
fnName = fnName ? "'" + fnName + "'" : 'asyncGenFn';
|
|
224
|
+
|
|
225
|
+
t.ok(asyncGenFn instanceof $AsyncGeneratorFunction, fnName + ' instanceof %AsyncGeneratorFunction%');
|
|
226
|
+
t.ok($isProto($AsyncGeneratorFunctionPrototype, asyncGenFn), '%AsyncGenerator% is prototype of ' + fnName);
|
|
227
|
+
t.ok($isProto($AsyncGeneratorPrototype, asyncGenFn.prototype), '%AsyncGeneratorPrototype% is prototype of ' + fnName + '.prototype');
|
|
228
|
+
});
|
|
229
|
+
|
|
230
|
+
t.end();
|
|
231
|
+
});
|
|
232
|
+
|
|
233
|
+
test('%ThrowTypeError%', function (t) {
|
|
234
|
+
var $ThrowTypeError = GetIntrinsic('%ThrowTypeError%');
|
|
235
|
+
|
|
236
|
+
t.equal(typeof $ThrowTypeError, 'function', 'is a function');
|
|
237
|
+
t['throws'](
|
|
238
|
+
$ThrowTypeError,
|
|
239
|
+
TypeError,
|
|
240
|
+
'%ThrowTypeError% throws a TypeError'
|
|
241
|
+
);
|
|
242
|
+
|
|
243
|
+
t.end();
|
|
244
|
+
});
|
|
245
|
+
|
|
246
|
+
test('allowMissing', { skip: asyncGenFns.length > 0 }, function (t) {
|
|
247
|
+
t['throws'](
|
|
248
|
+
function () { GetIntrinsic('%AsyncGeneratorPrototype%'); },
|
|
249
|
+
TypeError,
|
|
250
|
+
'throws when missing'
|
|
251
|
+
);
|
|
252
|
+
|
|
253
|
+
t.equal(
|
|
254
|
+
GetIntrinsic('%AsyncGeneratorPrototype%', true),
|
|
255
|
+
undefined,
|
|
256
|
+
'does not throw when allowMissing'
|
|
257
|
+
);
|
|
258
|
+
|
|
259
|
+
t.end();
|
|
260
|
+
});
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
### [5.1.2](https://github.com/gulpjs/glob-parent/compare/v5.1.1...v5.1.2) (2021-03-06)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* eliminate ReDoS ([#36](https://github.com/gulpjs/glob-parent/issues/36)) ([f923116](https://github.com/gulpjs/glob-parent/commit/f9231168b0041fea3f8f954b3cceb56269fc6366))
|
|
7
|
+
|
|
8
|
+
### [5.1.1](https://github.com/gulpjs/glob-parent/compare/v5.1.0...v5.1.1) (2021-01-27)
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* unescape exclamation mark ([#26](https://github.com/gulpjs/glob-parent/issues/26)) ([a98874f](https://github.com/gulpjs/glob-parent/commit/a98874f1a59e407f4fb1beb0db4efa8392da60bb))
|
|
14
|
+
|
|
15
|
+
## [5.1.0](https://github.com/gulpjs/glob-parent/compare/v5.0.0...v5.1.0) (2021-01-27)
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
* add `flipBackslashes` option to disable auto conversion of slashes (closes [#24](https://github.com/gulpjs/glob-parent/issues/24)) ([#25](https://github.com/gulpjs/glob-parent/issues/25)) ([eecf91d](https://github.com/gulpjs/glob-parent/commit/eecf91d5e3834ed78aee39c4eaaae654d76b87b3))
|
|
21
|
+
|
|
22
|
+
## [5.0.0](https://github.com/gulpjs/glob-parent/compare/v4.0.0...v5.0.0) (2021-01-27)
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
### ⚠ BREAKING CHANGES
|
|
26
|
+
|
|
27
|
+
* Drop support for node <6 & bump dependencies
|
|
28
|
+
|
|
29
|
+
### Miscellaneous Chores
|
|
30
|
+
|
|
31
|
+
* Drop support for node <6 & bump dependencies ([896c0c0](https://github.com/gulpjs/glob-parent/commit/896c0c00b4e7362f60b96e7fc295ae929245255a))
|
|
32
|
+
|
|
33
|
+
## [4.0.0](https://github.com/gulpjs/glob-parent/compare/v3.1.0...v4.0.0) (2021-01-27)
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
### ⚠ BREAKING CHANGES
|
|
37
|
+
|
|
38
|
+
* question marks are valid path characters on Windows so avoid flagging as a glob when alone
|
|
39
|
+
* Update is-glob dependency
|
|
40
|
+
|
|
41
|
+
### Features
|
|
42
|
+
|
|
43
|
+
* hoist regexps and strings for performance gains ([4a80667](https://github.com/gulpjs/glob-parent/commit/4a80667c69355c76a572a5892b0f133c8e1f457e))
|
|
44
|
+
* question marks are valid path characters on Windows so avoid flagging as a glob when alone ([2a551dd](https://github.com/gulpjs/glob-parent/commit/2a551dd0dc3235e78bf3c94843d4107072d17841))
|
|
45
|
+
* Update is-glob dependency ([e41fcd8](https://github.com/gulpjs/glob-parent/commit/e41fcd895d1f7bc617dba45c9d935a7949b9c281))
|
|
46
|
+
|
|
47
|
+
## [3.1.0](https://github.com/gulpjs/glob-parent/compare/v3.0.1...v3.1.0) (2021-01-27)
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
### Features
|
|
51
|
+
|
|
52
|
+
* allow basic win32 backslash use ([272afa5](https://github.com/gulpjs/glob-parent/commit/272afa5fd070fc0f796386a5993d4ee4a846988b))
|
|
53
|
+
* handle extglobs (parentheses) containing separators ([7db1bdb](https://github.com/gulpjs/glob-parent/commit/7db1bdb0756e55fd14619e8ce31aa31b17b117fd))
|
|
54
|
+
* new approach to braces/brackets handling ([8269bd8](https://github.com/gulpjs/glob-parent/commit/8269bd89290d99fac9395a354fb56fdcdb80f0be))
|
|
55
|
+
* pre-process braces/brackets sections ([9ef8a87](https://github.com/gulpjs/glob-parent/commit/9ef8a87f66b1a43d0591e7a8e4fc5a18415ee388))
|
|
56
|
+
* preserve escaped brace/bracket at end of string ([8cfb0ba](https://github.com/gulpjs/glob-parent/commit/8cfb0ba84202d51571340dcbaf61b79d16a26c76))
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
### Bug Fixes
|
|
60
|
+
|
|
61
|
+
* trailing escaped square brackets ([99ec9fe](https://github.com/gulpjs/glob-parent/commit/99ec9fecc60ee488ded20a94dd4f18b4f55c4ccf))
|
|
62
|
+
|
|
63
|
+
### [3.0.1](https://github.com/gulpjs/glob-parent/compare/v3.0.0...v3.0.1) (2021-01-27)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
### Features
|
|
67
|
+
|
|
68
|
+
* use path-dirname ponyfill ([cdbea5f](https://github.com/gulpjs/glob-parent/commit/cdbea5f32a58a54e001a75ddd7c0fccd4776aacc))
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
### Bug Fixes
|
|
72
|
+
|
|
73
|
+
* unescape glob-escaped dirnames on output ([598c533](https://github.com/gulpjs/glob-parent/commit/598c533bdf49c1428bc063aa9b8db40c5a86b030))
|
|
74
|
+
|
|
75
|
+
## [3.0.0](https://github.com/gulpjs/glob-parent/compare/v2.0.0...v3.0.0) (2021-01-27)
|
|
76
|
+
|
|
77
|
+
|
|
78
|
+
### ⚠ BREAKING CHANGES
|
|
79
|
+
|
|
80
|
+
* update is-glob dependency
|
|
81
|
+
|
|
82
|
+
### Features
|
|
83
|
+
|
|
84
|
+
* update is-glob dependency ([5c5f8ef](https://github.com/gulpjs/glob-parent/commit/5c5f8efcee362a8e7638cf8220666acd8784f6bd))
|
|
85
|
+
|
|
86
|
+
## [2.0.0](https://github.com/gulpjs/glob-parent/compare/v1.3.0...v2.0.0) (2021-01-27)
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
### Features
|
|
90
|
+
|
|
91
|
+
* move up to dirname regardless of glob characters ([f97fb83](https://github.com/gulpjs/glob-parent/commit/f97fb83be2e0a9fc8d3b760e789d2ecadd6aa0c2))
|
|
92
|
+
|
|
93
|
+
## [1.3.0](https://github.com/gulpjs/glob-parent/compare/v1.2.0...v1.3.0) (2021-01-27)
|
|
94
|
+
|
|
95
|
+
## [1.2.0](https://github.com/gulpjs/glob-parent/compare/v1.1.0...v1.2.0) (2021-01-27)
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
### Reverts
|
|
99
|
+
|
|
100
|
+
* feat: make regex test strings smaller ([dc80fa9](https://github.com/gulpjs/glob-parent/commit/dc80fa9658dca20549cfeba44bbd37d5246fcce0))
|
|
101
|
+
|
|
102
|
+
## [1.1.0](https://github.com/gulpjs/glob-parent/compare/v1.0.0...v1.1.0) (2021-01-27)
|
|
103
|
+
|
|
104
|
+
|
|
105
|
+
### Features
|
|
106
|
+
|
|
107
|
+
* make regex test strings smaller ([cd83220](https://github.com/gulpjs/glob-parent/commit/cd832208638f45169f986d80fcf66e401f35d233))
|
|
108
|
+
|
|
109
|
+
## 1.0.0 (2021-01-27)
|
|
110
|
+
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
The ISC License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2015, 2019 Elan Shanker
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
7
|
+
copyright notice and this permission notice appear in all copies.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
10
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
11
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
12
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
13
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
14
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
|
15
|
+
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<a href="https://gulpjs.com">
|
|
3
|
+
<img height="257" width="114" src="https://raw.githubusercontent.com/gulpjs/artwork/master/gulp-2x.png">
|
|
4
|
+
</a>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
# glob-parent
|
|
8
|
+
|
|
9
|
+
[![NPM version][npm-image]][npm-url] [![Downloads][downloads-image]][npm-url] [![Azure Pipelines Build Status][azure-pipelines-image]][azure-pipelines-url] [![Travis Build Status][travis-image]][travis-url] [![AppVeyor Build Status][appveyor-image]][appveyor-url] [![Coveralls Status][coveralls-image]][coveralls-url] [![Gitter chat][gitter-image]][gitter-url]
|
|
10
|
+
|
|
11
|
+
Extract the non-magic parent path from a glob string.
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```js
|
|
16
|
+
var globParent = require('glob-parent');
|
|
17
|
+
|
|
18
|
+
globParent('path/to/*.js'); // 'path/to'
|
|
19
|
+
globParent('/root/path/to/*.js'); // '/root/path/to'
|
|
20
|
+
globParent('/*.js'); // '/'
|
|
21
|
+
globParent('*.js'); // '.'
|
|
22
|
+
globParent('**/*.js'); // '.'
|
|
23
|
+
globParent('path/{to,from}'); // 'path'
|
|
24
|
+
globParent('path/!(to|from)'); // 'path'
|
|
25
|
+
globParent('path/?(to|from)'); // 'path'
|
|
26
|
+
globParent('path/+(to|from)'); // 'path'
|
|
27
|
+
globParent('path/*(to|from)'); // 'path'
|
|
28
|
+
globParent('path/@(to|from)'); // 'path'
|
|
29
|
+
globParent('path/**/*'); // 'path'
|
|
30
|
+
|
|
31
|
+
// if provided a non-glob path, returns the nearest dir
|
|
32
|
+
globParent('path/foo/bar.js'); // 'path/foo'
|
|
33
|
+
globParent('path/foo/'); // 'path/foo'
|
|
34
|
+
globParent('path/foo'); // 'path' (see issue #3 for details)
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## API
|
|
38
|
+
|
|
39
|
+
### `globParent(maybeGlobString, [options])`
|
|
40
|
+
|
|
41
|
+
Takes a string and returns the part of the path before the glob begins. Be aware of Escaping rules and Limitations below.
|
|
42
|
+
|
|
43
|
+
#### options
|
|
44
|
+
|
|
45
|
+
```js
|
|
46
|
+
{
|
|
47
|
+
// Disables the automatic conversion of slashes for Windows
|
|
48
|
+
flipBackslashes: true
|
|
49
|
+
}
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
## Escaping
|
|
53
|
+
|
|
54
|
+
The following characters have special significance in glob patterns and must be escaped if you want them to be treated as regular path characters:
|
|
55
|
+
|
|
56
|
+
- `?` (question mark) unless used as a path segment alone
|
|
57
|
+
- `*` (asterisk)
|
|
58
|
+
- `|` (pipe)
|
|
59
|
+
- `(` (opening parenthesis)
|
|
60
|
+
- `)` (closing parenthesis)
|
|
61
|
+
- `{` (opening curly brace)
|
|
62
|
+
- `}` (closing curly brace)
|
|
63
|
+
- `[` (opening bracket)
|
|
64
|
+
- `]` (closing bracket)
|
|
65
|
+
|
|
66
|
+
**Example**
|
|
67
|
+
|
|
68
|
+
```js
|
|
69
|
+
globParent('foo/[bar]/') // 'foo'
|
|
70
|
+
globParent('foo/\\[bar]/') // 'foo/[bar]'
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
## Limitations
|
|
74
|
+
|
|
75
|
+
### Braces & Brackets
|
|
76
|
+
This library attempts a quick and imperfect method of determining which path
|
|
77
|
+
parts have glob magic without fully parsing/lexing the pattern. There are some
|
|
78
|
+
advanced use cases that can trip it up, such as nested braces where the outer
|
|
79
|
+
pair is escaped and the inner one contains a path separator. If you find
|
|
80
|
+
yourself in the unlikely circumstance of being affected by this or need to
|
|
81
|
+
ensure higher-fidelity glob handling in your library, it is recommended that you
|
|
82
|
+
pre-process your input with [expand-braces] and/or [expand-brackets].
|
|
83
|
+
|
|
84
|
+
### Windows
|
|
85
|
+
Backslashes are not valid path separators for globs. If a path with backslashes
|
|
86
|
+
is provided anyway, for simple cases, glob-parent will replace the path
|
|
87
|
+
separator for you and return the non-glob parent path (now with
|
|
88
|
+
forward-slashes, which are still valid as Windows path separators).
|
|
89
|
+
|
|
90
|
+
This cannot be used in conjunction with escape characters.
|
|
91
|
+
|
|
92
|
+
```js
|
|
93
|
+
// BAD
|
|
94
|
+
globParent('C:\\Program Files \\(x86\\)\\*.ext') // 'C:/Program Files /(x86/)'
|
|
95
|
+
|
|
96
|
+
// GOOD
|
|
97
|
+
globParent('C:/Program Files\\(x86\\)/*.ext') // 'C:/Program Files (x86)'
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
If you are using escape characters for a pattern without path parts (i.e.
|
|
101
|
+
relative to `cwd`), prefix with `./` to avoid confusing glob-parent.
|
|
102
|
+
|
|
103
|
+
```js
|
|
104
|
+
// BAD
|
|
105
|
+
globParent('foo \\[bar]') // 'foo '
|
|
106
|
+
globParent('foo \\[bar]*') // 'foo '
|
|
107
|
+
|
|
108
|
+
// GOOD
|
|
109
|
+
globParent('./foo \\[bar]') // 'foo [bar]'
|
|
110
|
+
globParent('./foo \\[bar]*') // '.'
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
## License
|
|
114
|
+
|
|
115
|
+
ISC
|
|
116
|
+
|
|
117
|
+
[expand-braces]: https://github.com/jonschlinkert/expand-braces
|
|
118
|
+
[expand-brackets]: https://github.com/jonschlinkert/expand-brackets
|
|
119
|
+
|
|
120
|
+
[downloads-image]: https://img.shields.io/npm/dm/glob-parent.svg
|
|
121
|
+
[npm-url]: https://www.npmjs.com/package/glob-parent
|
|
122
|
+
[npm-image]: https://img.shields.io/npm/v/glob-parent.svg
|
|
123
|
+
|
|
124
|
+
[azure-pipelines-url]: https://dev.azure.com/gulpjs/gulp/_build/latest?definitionId=2&branchName=master
|
|
125
|
+
[azure-pipelines-image]: https://dev.azure.com/gulpjs/gulp/_apis/build/status/glob-parent?branchName=master
|
|
126
|
+
|
|
127
|
+
[travis-url]: https://travis-ci.org/gulpjs/glob-parent
|
|
128
|
+
[travis-image]: https://img.shields.io/travis/gulpjs/glob-parent.svg?label=travis-ci
|
|
129
|
+
|
|
130
|
+
[appveyor-url]: https://ci.appveyor.com/project/gulpjs/glob-parent
|
|
131
|
+
[appveyor-image]: https://img.shields.io/appveyor/ci/gulpjs/glob-parent.svg?label=appveyor
|
|
132
|
+
|
|
133
|
+
[coveralls-url]: https://coveralls.io/r/gulpjs/glob-parent
|
|
134
|
+
[coveralls-image]: https://img.shields.io/coveralls/gulpjs/glob-parent/master.svg
|
|
135
|
+
|
|
136
|
+
[gitter-url]: https://gitter.im/gulpjs/gulp
|
|
137
|
+
[gitter-image]: https://badges.gitter.im/gulpjs/gulp.svg
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
var isGlob = require('is-glob');
|
|
4
|
+
var pathPosixDirname = require('path').posix.dirname;
|
|
5
|
+
var isWin32 = require('os').platform() === 'win32';
|
|
6
|
+
|
|
7
|
+
var slash = '/';
|
|
8
|
+
var backslash = /\\/g;
|
|
9
|
+
var enclosure = /[\{\[].*[\}\]]$/;
|
|
10
|
+
var globby = /(^|[^\\])([\{\[]|\([^\)]+$)/;
|
|
11
|
+
var escaped = /\\([\!\*\?\|\[\]\(\)\{\}])/g;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* @param {string} str
|
|
15
|
+
* @param {Object} opts
|
|
16
|
+
* @param {boolean} [opts.flipBackslashes=true]
|
|
17
|
+
* @returns {string}
|
|
18
|
+
*/
|
|
19
|
+
module.exports = function globParent(str, opts) {
|
|
20
|
+
var options = Object.assign({ flipBackslashes: true }, opts);
|
|
21
|
+
|
|
22
|
+
// flip windows path separators
|
|
23
|
+
if (options.flipBackslashes && isWin32 && str.indexOf(slash) < 0) {
|
|
24
|
+
str = str.replace(backslash, slash);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
// special case for strings ending in enclosure containing path separator
|
|
28
|
+
if (enclosure.test(str)) {
|
|
29
|
+
str += slash;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
// preserves full path in case of trailing path separator
|
|
33
|
+
str += 'a';
|
|
34
|
+
|
|
35
|
+
// remove path parts that are globby
|
|
36
|
+
do {
|
|
37
|
+
str = pathPosixDirname(str);
|
|
38
|
+
} while (isGlob(str) || globby.test(str));
|
|
39
|
+
|
|
40
|
+
// remove escape chars and return result
|
|
41
|
+
return str.replace(escaped, '$1');
|
|
42
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "glob-parent",
|
|
3
|
+
"version": "5.1.2",
|
|
4
|
+
"description": "Extract the non-magic parent path from a glob string.",
|
|
5
|
+
"author": "Gulp Team <team@gulpjs.com> (https://gulpjs.com/)",
|
|
6
|
+
"contributors": [
|
|
7
|
+
"Elan Shanker (https://github.com/es128)",
|
|
8
|
+
"Blaine Bublitz <blaine.bublitz@gmail.com>"
|
|
9
|
+
],
|
|
10
|
+
"repository": "gulpjs/glob-parent",
|
|
11
|
+
"license": "ISC",
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": ">= 6"
|
|
14
|
+
},
|
|
15
|
+
"main": "index.js",
|
|
16
|
+
"files": [
|
|
17
|
+
"LICENSE",
|
|
18
|
+
"index.js"
|
|
19
|
+
],
|
|
20
|
+
"scripts": {
|
|
21
|
+
"lint": "eslint .",
|
|
22
|
+
"pretest": "npm run lint",
|
|
23
|
+
"test": "nyc mocha --async-only",
|
|
24
|
+
"azure-pipelines": "nyc mocha --async-only --reporter xunit -O output=test.xunit",
|
|
25
|
+
"coveralls": "nyc report --reporter=text-lcov | coveralls"
|
|
26
|
+
},
|
|
27
|
+
"dependencies": {
|
|
28
|
+
"is-glob": "^4.0.1"
|
|
29
|
+
},
|
|
30
|
+
"devDependencies": {
|
|
31
|
+
"coveralls": "^3.0.11",
|
|
32
|
+
"eslint": "^2.13.1",
|
|
33
|
+
"eslint-config-gulp": "^3.0.1",
|
|
34
|
+
"expect": "^1.20.2",
|
|
35
|
+
"mocha": "^6.0.2",
|
|
36
|
+
"nyc": "^13.3.0"
|
|
37
|
+
},
|
|
38
|
+
"keywords": [
|
|
39
|
+
"glob",
|
|
40
|
+
"parent",
|
|
41
|
+
"strip",
|
|
42
|
+
"path",
|
|
43
|
+
"dirname",
|
|
44
|
+
"directory",
|
|
45
|
+
"base",
|
|
46
|
+
"wildcard"
|
|
47
|
+
]
|
|
48
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Copyright (c) 2013 Thiago de Arruda
|
|
2
|
+
|
|
3
|
+
Permission is hereby granted, free of charge, to any person
|
|
4
|
+
obtaining a copy of this software and associated documentation
|
|
5
|
+
files (the "Software"), to deal in the Software without
|
|
6
|
+
restriction, including without limitation the rights to use,
|
|
7
|
+
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
8
|
+
copies of the Software, and to permit persons to whom the
|
|
9
|
+
Software is furnished to do so, subject to the following
|
|
10
|
+
conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be
|
|
13
|
+
included in all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
16
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
|
17
|
+
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
18
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
|
19
|
+
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
|
20
|
+
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
|
21
|
+
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
|
22
|
+
OTHER DEALINGS IN THE SOFTWARE.
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# has
|
|
2
|
+
|
|
3
|
+
> Object.prototype.hasOwnProperty.call shortcut
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```sh
|
|
8
|
+
npm install --save has
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```js
|
|
14
|
+
var has = require('has');
|
|
15
|
+
|
|
16
|
+
has({}, 'hasOwnProperty'); // false
|
|
17
|
+
has(Object.prototype, 'hasOwnProperty'); // true
|
|
18
|
+
```
|