test
This commit is contained in:
parent
aec42feb5e
commit
ea9944383f
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
/node_modules
|
1
node_modules/.bin/atob
generated
vendored
Symbolic link
1
node_modules/.bin/atob
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
||||
../atob/bin/atob.js
|
1
node_modules/.bin/live-server
generated
vendored
Symbolic link
1
node_modules/.bin/live-server
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
||||
../live-server/live-server.js
|
1
node_modules/.bin/mime
generated
vendored
Symbolic link
1
node_modules/.bin/mime
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
||||
../mime/cli.js
|
1
node_modules/.bin/uuid
generated
vendored
Symbolic link
1
node_modules/.bin/uuid
generated
vendored
Symbolic link
@ -0,0 +1 @@
|
||||
../uuid/bin/uuid
|
216
node_modules/.yarn-integrity
generated
vendored
Normal file
216
node_modules/.yarn-integrity
generated
vendored
Normal file
@ -0,0 +1,216 @@
|
||||
{
|
||||
"systemParams": "linux-x64-120",
|
||||
"modulesFolders": [
|
||||
"node_modules"
|
||||
],
|
||||
"flags": [],
|
||||
"linkedModules": [],
|
||||
"topLevelPatterns": [
|
||||
"live-server@^1.2.2"
|
||||
],
|
||||
"lockfileEntries": {
|
||||
"accepts@~1.3.4": "https://registry.yarnpkg.com/accepts/-/accepts-1.3.8.tgz#0bf0be125b67014adcb0b0921e62db7bffe16b2e",
|
||||
"anymatch@^2.0.0": "https://registry.yarnpkg.com/anymatch/-/anymatch-2.0.0.tgz#bcb24b4f37934d9aa7ac17b4adaf89e7c76ef2eb",
|
||||
"apache-crypt@^1.1.2": "https://registry.yarnpkg.com/apache-crypt/-/apache-crypt-1.2.6.tgz#c3f9b98318b447f0a878b54e2cb113bbb8539698",
|
||||
"apache-md5@^1.0.6": "https://registry.yarnpkg.com/apache-md5/-/apache-md5-1.1.8.tgz#ea79c6feb03abfed42b2830dde06f75df5e3bbd9",
|
||||
"arr-diff@^4.0.0": "https://registry.yarnpkg.com/arr-diff/-/arr-diff-4.0.0.tgz#d6461074febfec71e7e15235761a329a5dc7c520",
|
||||
"arr-flatten@^1.1.0": "https://registry.yarnpkg.com/arr-flatten/-/arr-flatten-1.1.0.tgz#36048bbff4e7b47e136644316c99669ea5ae91f1",
|
||||
"arr-union@^3.1.0": "https://registry.yarnpkg.com/arr-union/-/arr-union-3.1.0.tgz#e39b09aea9def866a8f206e288af63919bae39c4",
|
||||
"array-unique@^0.3.2": "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428",
|
||||
"assign-symbols@^1.0.0": "https://registry.yarnpkg.com/assign-symbols/-/assign-symbols-1.0.0.tgz#59667f41fadd4f20ccbc2bb96b8d4f7f78ec0367",
|
||||
"async-each@^1.0.1": "https://registry.yarnpkg.com/async-each/-/async-each-1.0.6.tgz#52f1d9403818c179b7561e11a5d1b77eb2160e77",
|
||||
"atob@^2.1.2": "https://registry.yarnpkg.com/atob/-/atob-2.1.2.tgz#6d9517eb9e030d2436666651e86bd9f6f13533c9",
|
||||
"base@^0.11.1": "https://registry.yarnpkg.com/base/-/base-0.11.2.tgz#7bde5ced145b6d551a90db87f83c558b4eb48a8f",
|
||||
"basic-auth@~2.0.1": "https://registry.yarnpkg.com/basic-auth/-/basic-auth-2.0.1.tgz#b998279bf47ce38344b4f3cf916d4679bbf51e3a",
|
||||
"batch@0.6.1": "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16",
|
||||
"bcryptjs@^2.3.0": "https://registry.yarnpkg.com/bcryptjs/-/bcryptjs-2.4.3.tgz#9ab5627b93e60621ff7cdac5da9733027df1d0cb",
|
||||
"binary-extensions@^1.0.0": "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-1.13.1.tgz#598afe54755b2868a5330d2aff9d4ebb53209b65",
|
||||
"bindings@^1.5.0": "https://registry.yarnpkg.com/bindings/-/bindings-1.5.0.tgz#10353c9e945334bc0511a6d90b38fbc7c9c504df",
|
||||
"braces@^2.3.1": "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729",
|
||||
"braces@^2.3.2": "https://registry.yarnpkg.com/braces/-/braces-2.3.2.tgz#5979fd3f14cd531565e5fa2df1abfff1dfaee729",
|
||||
"cache-base@^1.0.1": "https://registry.yarnpkg.com/cache-base/-/cache-base-1.0.1.tgz#0a7f46416831c8b662ee36fe4e7c59d76f666ab2",
|
||||
"chokidar@^2.0.4": "https://registry.yarnpkg.com/chokidar/-/chokidar-2.1.8.tgz#804b3a7b6a99358c3c5c61e71d8728f041cff917",
|
||||
"class-utils@^0.3.5": "https://registry.yarnpkg.com/class-utils/-/class-utils-0.3.6.tgz#f93369ae8b9a7ce02fd41faad0ca83033190c463",
|
||||
"collection-visit@^1.0.0": "https://registry.yarnpkg.com/collection-visit/-/collection-visit-1.0.0.tgz#4bc0373c164bc3291b4d368c829cf1a80a59dca0",
|
||||
"colors@1.4.0": "https://registry.yarnpkg.com/colors/-/colors-1.4.0.tgz#c50491479d4c1bdaed2c9ced32cf7c7dc2360f78",
|
||||
"component-emitter@^1.2.1": "https://registry.yarnpkg.com/component-emitter/-/component-emitter-1.3.1.tgz#ef1d5796f7d93f135ee6fb684340b26403c97d17",
|
||||
"connect@^3.6.6": "https://registry.yarnpkg.com/connect/-/connect-3.7.0.tgz#5d49348910caa5e07a01800b030d0c35f20484f8",
|
||||
"copy-descriptor@^0.1.0": "https://registry.yarnpkg.com/copy-descriptor/-/copy-descriptor-0.1.1.tgz#676f6eb3c39997c2ee1ac3a924fd6124748f578d",
|
||||
"core-util-is@~1.0.0": "https://registry.yarnpkg.com/core-util-is/-/core-util-is-1.0.3.tgz#a6042d3634c2b27e9328f837b965fac83808db85",
|
||||
"cors@latest": "https://registry.yarnpkg.com/cors/-/cors-2.8.5.tgz#eac11da51592dd86b9f06f6e7ac293b3df875d29",
|
||||
"debug@2.6.9": "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f",
|
||||
"debug@^2.2.0": "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f",
|
||||
"debug@^2.3.3": "https://registry.yarnpkg.com/debug/-/debug-2.6.9.tgz#5d128515df134ff327e90a4c93f4e077a536341f",
|
||||
"decode-uri-component@^0.2.0": "https://registry.yarnpkg.com/decode-uri-component/-/decode-uri-component-0.2.2.tgz#e69dbe25d37941171dd540e024c444cd5188e1e9",
|
||||
"define-property@^0.2.5": "https://registry.yarnpkg.com/define-property/-/define-property-0.2.5.tgz#c35b1ef918ec3c990f9a5bc57be04aacec5c8116",
|
||||
"define-property@^1.0.0": "https://registry.yarnpkg.com/define-property/-/define-property-1.0.0.tgz#769ebaaf3f4a63aad3af9e8d304c9bbe79bfb0e6",
|
||||
"define-property@^2.0.2": "https://registry.yarnpkg.com/define-property/-/define-property-2.0.2.tgz#d459689e8d654ba77e02a817f8710d702cb16e9d",
|
||||
"depd@2.0.0": "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df",
|
||||
"depd@~1.1.2": "https://registry.yarnpkg.com/depd/-/depd-1.1.2.tgz#9bcd52e14c097763e749b274c4346ed2e560b5a9",
|
||||
"depd@~2.0.0": "https://registry.yarnpkg.com/depd/-/depd-2.0.0.tgz#b696163cc757560d09cf22cc8fad1571b79e76df",
|
||||
"destroy@1.2.0": "https://registry.yarnpkg.com/destroy/-/destroy-1.2.0.tgz#4803735509ad8be552934c67df614f94e66fa015",
|
||||
"duplexer@~0.1.1": "https://registry.yarnpkg.com/duplexer/-/duplexer-0.1.2.tgz#3abe43aef3835f8ae077d136ddce0f276b0400e6",
|
||||
"ee-first@1.1.1": "https://registry.yarnpkg.com/ee-first/-/ee-first-1.1.1.tgz#590c61156b0ae2f4f0255732a158b266bc56b21d",
|
||||
"encodeurl@~1.0.2": "https://registry.yarnpkg.com/encodeurl/-/encodeurl-1.0.2.tgz#ad3ff4c86ec2d029322f5a02c3a9a606c95b3f59",
|
||||
"escape-html@~1.0.3": "https://registry.yarnpkg.com/escape-html/-/escape-html-1.0.3.tgz#0258eae4d3d0c0974de1c169188ef0051d1d1988",
|
||||
"etag@~1.8.1": "https://registry.yarnpkg.com/etag/-/etag-1.8.1.tgz#41ae2eeb65efa62268aebfea83ac7d79299b0887",
|
||||
"event-stream@3.3.4": "https://registry.yarnpkg.com/event-stream/-/event-stream-3.3.4.tgz#4ab4c9a0f5a54db9338b4c34d86bfce8f4b35571",
|
||||
"expand-brackets@^2.1.4": "https://registry.yarnpkg.com/expand-brackets/-/expand-brackets-2.1.4.tgz#b77735e315ce30f6b6eff0f83b04151a22449622",
|
||||
"extend-shallow@^2.0.1": "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-2.0.1.tgz#51af7d614ad9a9f610ea1bafbb989d6b1c56890f",
|
||||
"extend-shallow@^3.0.0": "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8",
|
||||
"extend-shallow@^3.0.2": "https://registry.yarnpkg.com/extend-shallow/-/extend-shallow-3.0.2.tgz#26a71aaf073b39fb2127172746131c2704028db8",
|
||||
"extglob@^2.0.4": "https://registry.yarnpkg.com/extglob/-/extglob-2.0.4.tgz#ad00fe4dc612a9232e8718711dc5cb5ab0285543",
|
||||
"faye-websocket@0.11.x": "https://registry.yarnpkg.com/faye-websocket/-/faye-websocket-0.11.4.tgz#7f0d9275cfdd86a1c963dc8b65fcc451edcbb1da",
|
||||
"file-uri-to-path@1.0.0": "https://registry.yarnpkg.com/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz#553a7b8446ff6f684359c445f1e37a05dacc33dd",
|
||||
"fill-range@^4.0.0": "https://registry.yarnpkg.com/fill-range/-/fill-range-4.0.0.tgz#d544811d428f98eb06a63dc402d2403c328c38f7",
|
||||
"finalhandler@1.1.2": "https://registry.yarnpkg.com/finalhandler/-/finalhandler-1.1.2.tgz#b7e7d000ffd11938d0fdb053506f6ebabe9f587d",
|
||||
"for-in@^1.0.2": "https://registry.yarnpkg.com/for-in/-/for-in-1.0.2.tgz#81068d295a8142ec0ac726c6e2200c30fb6d5e80",
|
||||
"fragment-cache@^0.2.1": "https://registry.yarnpkg.com/fragment-cache/-/fragment-cache-0.2.1.tgz#4290fad27f13e89be7f33799c6bc5a0abfff0d19",
|
||||
"fresh@0.5.2": "https://registry.yarnpkg.com/fresh/-/fresh-0.5.2.tgz#3d8cadd90d976569fa835ab1f8e4b23a105605a7",
|
||||
"from@~0": "https://registry.yarnpkg.com/from/-/from-0.1.7.tgz#83c60afc58b9c56997007ed1a768b3ab303a44fe",
|
||||
"fsevents@^1.2.7": "https://registry.yarnpkg.com/fsevents/-/fsevents-1.2.13.tgz#f325cb0455592428bcf11b383370ef70e3bfcc38",
|
||||
"function-bind@^1.1.2": "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.2.tgz#2c02d864d97f3ea6c8830c464cbd11ab6eab7a1c",
|
||||
"get-value@^2.0.3": "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28",
|
||||
"get-value@^2.0.6": "https://registry.yarnpkg.com/get-value/-/get-value-2.0.6.tgz#dc15ca1c672387ca76bd37ac0a395ba2042a2c28",
|
||||
"glob-parent@^3.1.0": "https://registry.yarnpkg.com/glob-parent/-/glob-parent-3.1.0.tgz#9e6af6299d8d3bd2bd40430832bd113df906c5ae",
|
||||
"graceful-fs@^4.1.11": "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3",
|
||||
"has-value@^0.3.1": "https://registry.yarnpkg.com/has-value/-/has-value-0.3.1.tgz#7b1f58bada62ca827ec0a2078025654845995e1f",
|
||||
"has-value@^1.0.0": "https://registry.yarnpkg.com/has-value/-/has-value-1.0.0.tgz#18b281da585b1c5c51def24c930ed29a0be6b177",
|
||||
"has-values@^0.1.4": "https://registry.yarnpkg.com/has-values/-/has-values-0.1.4.tgz#6d61de95d91dfca9b9a02089ad384bff8f62b771",
|
||||
"has-values@^1.0.0": "https://registry.yarnpkg.com/has-values/-/has-values-1.0.0.tgz#95b0b63fec2146619a6fe57fe75628d5a39efe4f",
|
||||
"hasown@^2.0.0": "https://registry.yarnpkg.com/hasown/-/hasown-2.0.0.tgz#f4c513d454a57b7c7e1650778de226b11700546c",
|
||||
"http-auth@3.1.x": "https://registry.yarnpkg.com/http-auth/-/http-auth-3.1.3.tgz#945cfadd66521eaf8f7c84913d377d7b15f24e31",
|
||||
"http-errors@2.0.0": "https://registry.yarnpkg.com/http-errors/-/http-errors-2.0.0.tgz#b7774a1486ef73cf7667ac9ae0858c012c57b9d3",
|
||||
"http-errors@~1.6.2": "https://registry.yarnpkg.com/http-errors/-/http-errors-1.6.3.tgz#8b55680bb4be283a0b5bf4ea2e38580be1d9320d",
|
||||
"http-parser-js@>=0.5.1": "https://registry.yarnpkg.com/http-parser-js/-/http-parser-js-0.5.8.tgz#af23090d9ac4e24573de6f6aecc9d84a48bf20e3",
|
||||
"inherits@2.0.3": "https://registry.yarnpkg.com/inherits/-/inherits-2.0.3.tgz#633c2c83e3da42a502f52466022480f4208261de",
|
||||
"inherits@2.0.4": "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c",
|
||||
"inherits@^2.0.3": "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c",
|
||||
"inherits@~2.0.3": "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c",
|
||||
"is-accessor-descriptor@^1.0.1": "https://registry.yarnpkg.com/is-accessor-descriptor/-/is-accessor-descriptor-1.0.1.tgz#3223b10628354644b86260db29b3e693f5ceedd4",
|
||||
"is-binary-path@^1.0.0": "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-1.0.1.tgz#75f16642b480f187a711c814161fd3a4a7655898",
|
||||
"is-buffer@^1.1.5": "https://registry.yarnpkg.com/is-buffer/-/is-buffer-1.1.6.tgz#efaa2ea9daa0d7ab2ea13a97b2b8ad51fefbe8be",
|
||||
"is-data-descriptor@^1.0.1": "https://registry.yarnpkg.com/is-data-descriptor/-/is-data-descriptor-1.0.1.tgz#2109164426166d32ea38c405c1e0945d9e6a4eeb",
|
||||
"is-descriptor@^0.1.0": "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-0.1.7.tgz#2727eb61fd789dcd5bdf0ed4569f551d2fe3be33",
|
||||
"is-descriptor@^1.0.0": "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.3.tgz#92d27cb3cd311c4977a4db47df457234a13cb306",
|
||||
"is-descriptor@^1.0.2": "https://registry.yarnpkg.com/is-descriptor/-/is-descriptor-1.0.3.tgz#92d27cb3cd311c4977a4db47df457234a13cb306",
|
||||
"is-extendable@^0.1.0": "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89",
|
||||
"is-extendable@^0.1.1": "https://registry.yarnpkg.com/is-extendable/-/is-extendable-0.1.1.tgz#62b110e289a471418e3ec36a617d472e301dfc89",
|
||||
"is-extendable@^1.0.1": "https://registry.yarnpkg.com/is-extendable/-/is-extendable-1.0.1.tgz#a7470f9e426733d81bd81e1155264e3a3507cab4",
|
||||
"is-extglob@^2.1.0": "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2",
|
||||
"is-extglob@^2.1.1": "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2",
|
||||
"is-glob@^3.1.0": "https://registry.yarnpkg.com/is-glob/-/is-glob-3.1.0.tgz#7ba5ae24217804ac70707b96922567486cc3e84a",
|
||||
"is-glob@^4.0.0": "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084",
|
||||
"is-number@^3.0.0": "https://registry.yarnpkg.com/is-number/-/is-number-3.0.0.tgz#24fd6201a4782cf50561c810276afc7d12d71195",
|
||||
"is-plain-object@^2.0.3": "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677",
|
||||
"is-plain-object@^2.0.4": "https://registry.yarnpkg.com/is-plain-object/-/is-plain-object-2.0.4.tgz#2c163b3fafb1b606d9d17928f05c2a1c38e07677",
|
||||
"is-windows@^1.0.2": "https://registry.yarnpkg.com/is-windows/-/is-windows-1.0.2.tgz#d1850eb9791ecd18e6182ce12a30f396634bb19d",
|
||||
"is-wsl@^1.1.0": "https://registry.yarnpkg.com/is-wsl/-/is-wsl-1.1.0.tgz#1f16e4aa22b04d1336b66188a66af3c600c3a66d",
|
||||
"isarray@1.0.0": "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11",
|
||||
"isarray@~1.0.0": "https://registry.yarnpkg.com/isarray/-/isarray-1.0.0.tgz#bb935d48582cba168c06834957a54a3e07124f11",
|
||||
"isobject@^2.0.0": "https://registry.yarnpkg.com/isobject/-/isobject-2.1.0.tgz#f065561096a3f1da2ef46272f815c840d87e0c89",
|
||||
"isobject@^3.0.0": "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df",
|
||||
"isobject@^3.0.1": "https://registry.yarnpkg.com/isobject/-/isobject-3.0.1.tgz#4e431e92b11a9731636aa1f9c8d1ccbcfdab78df",
|
||||
"kind-of@^3.0.2": "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64",
|
||||
"kind-of@^3.0.3": "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64",
|
||||
"kind-of@^3.2.0": "https://registry.yarnpkg.com/kind-of/-/kind-of-3.2.2.tgz#31ea21a734bab9bbb0f32466d893aea51e4a3c64",
|
||||
"kind-of@^4.0.0": "https://registry.yarnpkg.com/kind-of/-/kind-of-4.0.0.tgz#20813df3d712928b207378691a45066fae72dd57",
|
||||
"kind-of@^6.0.2": "https://registry.yarnpkg.com/kind-of/-/kind-of-6.0.3.tgz#07c05034a6c349fa06e24fa35aa76db4580ce4dd",
|
||||
"live-server@^1.2.2": "https://registry.yarnpkg.com/live-server/-/live-server-1.2.2.tgz#20b4fe5c2ca886faa61813310e28680804f48dad",
|
||||
"map-cache@^0.2.2": "https://registry.yarnpkg.com/map-cache/-/map-cache-0.2.2.tgz#c32abd0bd6525d9b051645bb4f26ac5dc98a0dbf",
|
||||
"map-stream@~0.1.0": "https://registry.yarnpkg.com/map-stream/-/map-stream-0.1.0.tgz#e56aa94c4c8055a16404a0674b78f215f7c8e194",
|
||||
"map-visit@^1.0.0": "https://registry.yarnpkg.com/map-visit/-/map-visit-1.0.0.tgz#ecdca8f13144e660f1b5bd41f12f3479d98dfb8f",
|
||||
"micromatch@^3.1.10": "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23",
|
||||
"micromatch@^3.1.4": "https://registry.yarnpkg.com/micromatch/-/micromatch-3.1.10.tgz#70859bc95c9840952f359a068a3fc49f9ecfac23",
|
||||
"mime-db@1.52.0": "https://registry.yarnpkg.com/mime-db/-/mime-db-1.52.0.tgz#bbabcdc02859f4987301c856e3387ce5ec43bf70",
|
||||
"mime-types@~2.1.17": "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a",
|
||||
"mime-types@~2.1.34": "https://registry.yarnpkg.com/mime-types/-/mime-types-2.1.35.tgz#381a871b62a734450660ae3deee44813f70d959a",
|
||||
"mime@1.6.0": "https://registry.yarnpkg.com/mime/-/mime-1.6.0.tgz#32cd9e5c64553bd58d19a568af452acff04981b1",
|
||||
"mixin-deep@^1.2.0": "https://registry.yarnpkg.com/mixin-deep/-/mixin-deep-1.3.2.tgz#1120b43dc359a785dce65b55b82e257ccf479566",
|
||||
"morgan@^1.9.1": "https://registry.yarnpkg.com/morgan/-/morgan-1.10.0.tgz#091778abc1fc47cd3509824653dae1faab6b17d7",
|
||||
"ms@2.0.0": "https://registry.yarnpkg.com/ms/-/ms-2.0.0.tgz#5608aeadfc00be6c2901df5f9861788de0d597c8",
|
||||
"ms@2.1.3": "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2",
|
||||
"nan@^2.12.1": "https://registry.yarnpkg.com/nan/-/nan-2.18.0.tgz#26a6faae7ffbeb293a39660e88a76b82e30b7554",
|
||||
"nanomatch@^1.2.9": "https://registry.yarnpkg.com/nanomatch/-/nanomatch-1.2.13.tgz#b87a8aa4fc0de8fe6be88895b38983ff265bd119",
|
||||
"negotiator@0.6.3": "https://registry.yarnpkg.com/negotiator/-/negotiator-0.6.3.tgz#58e323a72fedc0d6f9cd4d31fe49f51479590ccd",
|
||||
"normalize-path@^2.1.1": "https://registry.yarnpkg.com/normalize-path/-/normalize-path-2.1.1.tgz#1ab28b556e198363a8c1a6f7e6fa20137fe6aed9",
|
||||
"normalize-path@^3.0.0": "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65",
|
||||
"object-assign@^4": "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863",
|
||||
"object-assign@latest": "https://registry.yarnpkg.com/object-assign/-/object-assign-4.1.1.tgz#2109adc7965887cfc05cbbd442cac8bfbb360863",
|
||||
"object-copy@^0.1.0": "https://registry.yarnpkg.com/object-copy/-/object-copy-0.1.0.tgz#7e7d858b781bd7c991a41ba975ed3812754e998c",
|
||||
"object-visit@^1.0.0": "https://registry.yarnpkg.com/object-visit/-/object-visit-1.0.1.tgz#f79c4493af0c5377b59fe39d395e41042dd045bb",
|
||||
"object.pick@^1.3.0": "https://registry.yarnpkg.com/object.pick/-/object.pick-1.3.0.tgz#87a10ac4c1694bd2e1cbf53591a66141fb5dd747",
|
||||
"on-finished@2.4.1": "https://registry.yarnpkg.com/on-finished/-/on-finished-2.4.1.tgz#58c8c44116e54845ad57f14ab10b03533184ac3f",
|
||||
"on-finished@~2.3.0": "https://registry.yarnpkg.com/on-finished/-/on-finished-2.3.0.tgz#20f1336481b083cd75337992a16971aa2d906947",
|
||||
"on-headers@~1.0.2": "https://registry.yarnpkg.com/on-headers/-/on-headers-1.0.2.tgz#772b0ae6aaa525c399e489adfad90c403eb3c28f",
|
||||
"opn@latest": "https://registry.yarnpkg.com/opn/-/opn-6.0.0.tgz#3c5b0db676d5f97da1233d1ed42d182bc5a27d2d",
|
||||
"parseurl@~1.3.2": "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4",
|
||||
"parseurl@~1.3.3": "https://registry.yarnpkg.com/parseurl/-/parseurl-1.3.3.tgz#9da19e7bee8d12dff0513ed5b76957793bc2e8d4",
|
||||
"pascalcase@^0.1.1": "https://registry.yarnpkg.com/pascalcase/-/pascalcase-0.1.1.tgz#b363e55e8006ca6fe21784d2db22bd15d7917f14",
|
||||
"path-dirname@^1.0.0": "https://registry.yarnpkg.com/path-dirname/-/path-dirname-1.0.2.tgz#cc33d24d525e099a5388c0336c6e32b9160609e0",
|
||||
"path-is-absolute@^1.0.0": "https://registry.yarnpkg.com/path-is-absolute/-/path-is-absolute-1.0.1.tgz#174b9268735534ffbc7ace6bf53a5a9e1b5c5f5f",
|
||||
"pause-stream@0.0.11": "https://registry.yarnpkg.com/pause-stream/-/pause-stream-0.0.11.tgz#fe5a34b0cbce12b5aa6a2b403ee2e73b602f1445",
|
||||
"posix-character-classes@^0.1.0": "https://registry.yarnpkg.com/posix-character-classes/-/posix-character-classes-0.1.1.tgz#01eac0fe3b5af71a2a6c02feabb8c1fef7e00eab",
|
||||
"process-nextick-args@~2.0.0": "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2",
|
||||
"proxy-middleware@latest": "https://registry.yarnpkg.com/proxy-middleware/-/proxy-middleware-0.15.0.tgz#a3fdf1befb730f951965872ac2f6074c61477a56",
|
||||
"range-parser@~1.2.1": "https://registry.yarnpkg.com/range-parser/-/range-parser-1.2.1.tgz#3cf37023d199e1c24d1a55b84800c2f3e6468031",
|
||||
"readable-stream@^2.0.2": "https://registry.yarnpkg.com/readable-stream/-/readable-stream-2.3.8.tgz#91125e8042bba1b9887f49345f6277027ce8be9b",
|
||||
"readdirp@^2.2.1": "https://registry.yarnpkg.com/readdirp/-/readdirp-2.2.1.tgz#0e87622a3325aa33e892285caf8b4e846529a525",
|
||||
"regex-not@^1.0.0": "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c",
|
||||
"regex-not@^1.0.2": "https://registry.yarnpkg.com/regex-not/-/regex-not-1.0.2.tgz#1f4ece27e00b0b65e0247a6810e6a85d83a5752c",
|
||||
"remove-trailing-separator@^1.0.1": "https://registry.yarnpkg.com/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz#c24bce2a283adad5bc3f58e0d48249b92379d8ef",
|
||||
"repeat-element@^1.1.2": "https://registry.yarnpkg.com/repeat-element/-/repeat-element-1.1.4.tgz#be681520847ab58c7568ac75fbfad28ed42d39e9",
|
||||
"repeat-string@^1.6.1": "https://registry.yarnpkg.com/repeat-string/-/repeat-string-1.6.1.tgz#8dcae470e1c88abc2d600fff4a776286da75e637",
|
||||
"resolve-url@^0.2.1": "https://registry.yarnpkg.com/resolve-url/-/resolve-url-0.2.1.tgz#2c637fe77c893afd2a663fe21aa9080068e2052a",
|
||||
"ret@~0.1.10": "https://registry.yarnpkg.com/ret/-/ret-0.1.15.tgz#b8a4825d5bdb1fc3f6f53c2bc33f81388681c7bc",
|
||||
"safe-buffer@5.1.2": "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d",
|
||||
"safe-buffer@>=5.1.0": "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6",
|
||||
"safe-buffer@~5.1.0": "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d",
|
||||
"safe-buffer@~5.1.1": "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d",
|
||||
"safe-regex@^1.1.0": "https://registry.yarnpkg.com/safe-regex/-/safe-regex-1.1.0.tgz#40a3669f3b077d1e943d44629e157dd48023bf2e",
|
||||
"send@latest": "https://registry.yarnpkg.com/send/-/send-0.18.0.tgz#670167cc654b05f5aa4a767f9113bb371bc706be",
|
||||
"serve-index@^1.9.1": "https://registry.yarnpkg.com/serve-index/-/serve-index-1.9.1.tgz#d3768d69b1e7d82e5ce050fff5b453bea12a9239",
|
||||
"set-value@^2.0.0": "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b",
|
||||
"set-value@^2.0.1": "https://registry.yarnpkg.com/set-value/-/set-value-2.0.1.tgz#a18d40530e6f07de4228c7defe4227af8cad005b",
|
||||
"setprototypeof@1.1.0": "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.1.0.tgz#d0bd85536887b6fe7c0d818cb962d9d91c54e656",
|
||||
"setprototypeof@1.2.0": "https://registry.yarnpkg.com/setprototypeof/-/setprototypeof-1.2.0.tgz#66c9a24a73f9fc28cbe66b09fed3d33dcaf1b424",
|
||||
"snapdragon-node@^2.0.1": "https://registry.yarnpkg.com/snapdragon-node/-/snapdragon-node-2.1.1.tgz#6c175f86ff14bdb0724563e8f3c1b021a286853b",
|
||||
"snapdragon-util@^3.0.1": "https://registry.yarnpkg.com/snapdragon-util/-/snapdragon-util-3.0.1.tgz#f956479486f2acd79700693f6f7b805e45ab56e2",
|
||||
"snapdragon@^0.8.1": "https://registry.yarnpkg.com/snapdragon/-/snapdragon-0.8.2.tgz#64922e7c565b0e14204ba1aa7d6964278d25182d",
|
||||
"source-map-resolve@^0.5.0": "https://registry.yarnpkg.com/source-map-resolve/-/source-map-resolve-0.5.3.tgz#190866bece7553e1f8f267a2ee82c606b5509a1a",
|
||||
"source-map-url@^0.4.0": "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.1.tgz#0af66605a745a5a2f91cf1bbf8a7afbc283dec56",
|
||||
"source-map@^0.5.6": "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc",
|
||||
"split-string@^3.0.1": "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2",
|
||||
"split-string@^3.0.2": "https://registry.yarnpkg.com/split-string/-/split-string-3.1.0.tgz#7cb09dda3a86585705c64b39a6466038682e8fe2",
|
||||
"split@0.3": "https://registry.yarnpkg.com/split/-/split-0.3.3.tgz#cd0eea5e63a211dfff7eb0f091c4133e2d0dd28f",
|
||||
"static-extend@^0.1.1": "https://registry.yarnpkg.com/static-extend/-/static-extend-0.1.2.tgz#60809c39cbff55337226fd5e0b520f341f1fb5c6",
|
||||
"statuses@2.0.1": "https://registry.yarnpkg.com/statuses/-/statuses-2.0.1.tgz#55cb000ccf1d48728bd23c685a063998cf1a1b63",
|
||||
"statuses@>= 1.4.0 < 2": "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c",
|
||||
"statuses@~1.5.0": "https://registry.yarnpkg.com/statuses/-/statuses-1.5.0.tgz#161c7dac177659fd9811f43771fa99381478628c",
|
||||
"stream-combiner@~0.0.4": "https://registry.yarnpkg.com/stream-combiner/-/stream-combiner-0.0.4.tgz#4d5e433c185261dde623ca3f44c586bcf5c4ad14",
|
||||
"string_decoder@~1.1.1": "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.1.1.tgz#9cf1611ba62685d7030ae9e4ba34149c3af03fc8",
|
||||
"through@2": "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5",
|
||||
"through@~2.3": "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5",
|
||||
"through@~2.3.1": "https://registry.yarnpkg.com/through/-/through-2.3.8.tgz#0dd4c9ffaabc357960b1b724115d7e0e86a2e1f5",
|
||||
"to-object-path@^0.3.0": "https://registry.yarnpkg.com/to-object-path/-/to-object-path-0.3.0.tgz#297588b7b0e7e0ac08e04e672f85c1f4999e17af",
|
||||
"to-regex-range@^2.1.0": "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-2.1.1.tgz#7c80c17b9dfebe599e27367e0d4dd5590141db38",
|
||||
"to-regex@^3.0.1": "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce",
|
||||
"to-regex@^3.0.2": "https://registry.yarnpkg.com/to-regex/-/to-regex-3.0.2.tgz#13cfdd9b336552f30b51f33a8ae1b42a7a7599ce",
|
||||
"toidentifier@1.0.1": "https://registry.yarnpkg.com/toidentifier/-/toidentifier-1.0.1.tgz#3be34321a88a820ed1bd80dfaa33e479fbb8dd35",
|
||||
"union-value@^1.0.0": "https://registry.yarnpkg.com/union-value/-/union-value-1.0.1.tgz#0b6fe7b835aecda61c6ea4d4f02c14221e109847",
|
||||
"unix-crypt-td-js@^1.1.4": "https://registry.yarnpkg.com/unix-crypt-td-js/-/unix-crypt-td-js-1.1.4.tgz#4912dfad1c8aeb7d20fa0a39e4c31918c1d5d5dd",
|
||||
"unpipe@~1.0.0": "https://registry.yarnpkg.com/unpipe/-/unpipe-1.0.0.tgz#b2bf4ee8514aae6165b4817829d21b2ef49904ec",
|
||||
"unset-value@^1.0.0": "https://registry.yarnpkg.com/unset-value/-/unset-value-1.0.0.tgz#8376873f7d2335179ffb1e6fc3a8ed0dfc8ab559",
|
||||
"upath@^1.1.1": "https://registry.yarnpkg.com/upath/-/upath-1.2.0.tgz#8f66dbcd55a883acdae4408af8b035a5044c1894",
|
||||
"urix@^0.1.0": "https://registry.yarnpkg.com/urix/-/urix-0.1.0.tgz#da937f7a62e21fec1fd18d49b35c2935067a6c72",
|
||||
"use@^3.1.0": "https://registry.yarnpkg.com/use/-/use-3.1.1.tgz#d50c8cac79a19fbc20f2911f56eb973f4e10070f",
|
||||
"util-deprecate@~1.0.1": "https://registry.yarnpkg.com/util-deprecate/-/util-deprecate-1.0.2.tgz#450d4dc9fa70de732762fbd2d4a28981419a0ccf",
|
||||
"utils-merge@1.0.1": "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.1.tgz#9f95710f50a267947b2ccc124741c1028427e713",
|
||||
"uuid@^3.0.0": "https://registry.yarnpkg.com/uuid/-/uuid-3.4.0.tgz#b23e4358afa8a202fe7a100af1f5f883f02007ee",
|
||||
"vary@^1": "https://registry.yarnpkg.com/vary/-/vary-1.1.2.tgz#2299f02c6ded30d4a5961b0b9f74524a18f634fc",
|
||||
"websocket-driver@>=0.5.1": "https://registry.yarnpkg.com/websocket-driver/-/websocket-driver-0.7.4.tgz#89ad5295bbf64b480abcba31e4953aca706f5760",
|
||||
"websocket-extensions@>=0.1.1": "https://registry.yarnpkg.com/websocket-extensions/-/websocket-extensions-0.1.4.tgz#7f8473bc839dfd87608adb95d7eb075211578a42"
|
||||
},
|
||||
"files": [],
|
||||
"artifacts": {}
|
||||
}
|
243
node_modules/accepts/HISTORY.md
generated
vendored
Normal file
243
node_modules/accepts/HISTORY.md
generated
vendored
Normal file
@ -0,0 +1,243 @@
|
||||
1.3.8 / 2022-02-02
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.1.34
|
||||
- deps: mime-db@~1.51.0
|
||||
* deps: negotiator@0.6.3
|
||||
|
||||
1.3.7 / 2019-04-29
|
||||
==================
|
||||
|
||||
* deps: negotiator@0.6.2
|
||||
- Fix sorting charset, encoding, and language with extra parameters
|
||||
|
||||
1.3.6 / 2019-04-28
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.1.24
|
||||
- deps: mime-db@~1.40.0
|
||||
|
||||
1.3.5 / 2018-02-28
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.1.18
|
||||
- deps: mime-db@~1.33.0
|
||||
|
||||
1.3.4 / 2017-08-22
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.1.16
|
||||
- deps: mime-db@~1.29.0
|
||||
|
||||
1.3.3 / 2016-05-02
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.1.11
|
||||
- deps: mime-db@~1.23.0
|
||||
* deps: negotiator@0.6.1
|
||||
- perf: improve `Accept` parsing speed
|
||||
- perf: improve `Accept-Charset` parsing speed
|
||||
- perf: improve `Accept-Encoding` parsing speed
|
||||
- perf: improve `Accept-Language` parsing speed
|
||||
|
||||
1.3.2 / 2016-03-08
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.1.10
|
||||
- Fix extension of `application/dash+xml`
|
||||
- Update primary extension for `audio/mp4`
|
||||
- deps: mime-db@~1.22.0
|
||||
|
||||
1.3.1 / 2016-01-19
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.1.9
|
||||
- deps: mime-db@~1.21.0
|
||||
|
||||
1.3.0 / 2015-09-29
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.1.7
|
||||
- deps: mime-db@~1.19.0
|
||||
* deps: negotiator@0.6.0
|
||||
- Fix including type extensions in parameters in `Accept` parsing
|
||||
- Fix parsing `Accept` parameters with quoted equals
|
||||
- Fix parsing `Accept` parameters with quoted semicolons
|
||||
- Lazy-load modules from main entry point
|
||||
- perf: delay type concatenation until needed
|
||||
- perf: enable strict mode
|
||||
- perf: hoist regular expressions
|
||||
- perf: remove closures getting spec properties
|
||||
- perf: remove a closure from media type parsing
|
||||
- perf: remove property delete from media type parsing
|
||||
|
||||
1.2.13 / 2015-09-06
|
||||
===================
|
||||
|
||||
* deps: mime-types@~2.1.6
|
||||
- deps: mime-db@~1.18.0
|
||||
|
||||
1.2.12 / 2015-07-30
|
||||
===================
|
||||
|
||||
* deps: mime-types@~2.1.4
|
||||
- deps: mime-db@~1.16.0
|
||||
|
||||
1.2.11 / 2015-07-16
|
||||
===================
|
||||
|
||||
* deps: mime-types@~2.1.3
|
||||
- deps: mime-db@~1.15.0
|
||||
|
||||
1.2.10 / 2015-07-01
|
||||
===================
|
||||
|
||||
* deps: mime-types@~2.1.2
|
||||
- deps: mime-db@~1.14.0
|
||||
|
||||
1.2.9 / 2015-06-08
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.1.1
|
||||
- perf: fix deopt during mapping
|
||||
|
||||
1.2.8 / 2015-06-07
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.1.0
|
||||
- deps: mime-db@~1.13.0
|
||||
* perf: avoid argument reassignment & argument slice
|
||||
* perf: avoid negotiator recursive construction
|
||||
* perf: enable strict mode
|
||||
* perf: remove unnecessary bitwise operator
|
||||
|
||||
1.2.7 / 2015-05-10
|
||||
==================
|
||||
|
||||
* deps: negotiator@0.5.3
|
||||
- Fix media type parameter matching to be case-insensitive
|
||||
|
||||
1.2.6 / 2015-05-07
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.0.11
|
||||
- deps: mime-db@~1.9.1
|
||||
* deps: negotiator@0.5.2
|
||||
- Fix comparing media types with quoted values
|
||||
- Fix splitting media types with quoted commas
|
||||
|
||||
1.2.5 / 2015-03-13
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.0.10
|
||||
- deps: mime-db@~1.8.0
|
||||
|
||||
1.2.4 / 2015-02-14
|
||||
==================
|
||||
|
||||
* Support Node.js 0.6
|
||||
* deps: mime-types@~2.0.9
|
||||
- deps: mime-db@~1.7.0
|
||||
* deps: negotiator@0.5.1
|
||||
- Fix preference sorting to be stable for long acceptable lists
|
||||
|
||||
1.2.3 / 2015-01-31
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.0.8
|
||||
- deps: mime-db@~1.6.0
|
||||
|
||||
1.2.2 / 2014-12-30
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.0.7
|
||||
- deps: mime-db@~1.5.0
|
||||
|
||||
1.2.1 / 2014-12-30
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.0.5
|
||||
- deps: mime-db@~1.3.1
|
||||
|
||||
1.2.0 / 2014-12-19
|
||||
==================
|
||||
|
||||
* deps: negotiator@0.5.0
|
||||
- Fix list return order when large accepted list
|
||||
- Fix missing identity encoding when q=0 exists
|
||||
- Remove dynamic building of Negotiator class
|
||||
|
||||
1.1.4 / 2014-12-10
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.0.4
|
||||
- deps: mime-db@~1.3.0
|
||||
|
||||
1.1.3 / 2014-11-09
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.0.3
|
||||
- deps: mime-db@~1.2.0
|
||||
|
||||
1.1.2 / 2014-10-14
|
||||
==================
|
||||
|
||||
* deps: negotiator@0.4.9
|
||||
- Fix error when media type has invalid parameter
|
||||
|
||||
1.1.1 / 2014-09-28
|
||||
==================
|
||||
|
||||
* deps: mime-types@~2.0.2
|
||||
- deps: mime-db@~1.1.0
|
||||
* deps: negotiator@0.4.8
|
||||
- Fix all negotiations to be case-insensitive
|
||||
- Stable sort preferences of same quality according to client order
|
||||
|
||||
1.1.0 / 2014-09-02
|
||||
==================
|
||||
|
||||
* update `mime-types`
|
||||
|
||||
1.0.7 / 2014-07-04
|
||||
==================
|
||||
|
||||
* Fix wrong type returned from `type` when match after unknown extension
|
||||
|
||||
1.0.6 / 2014-06-24
|
||||
==================
|
||||
|
||||
* deps: negotiator@0.4.7
|
||||
|
||||
1.0.5 / 2014-06-20
|
||||
==================
|
||||
|
||||
* fix crash when unknown extension given
|
||||
|
||||
1.0.4 / 2014-06-19
|
||||
==================
|
||||
|
||||
* use `mime-types`
|
||||
|
||||
1.0.3 / 2014-06-11
|
||||
==================
|
||||
|
||||
* deps: negotiator@0.4.6
|
||||
- Order by specificity when quality is the same
|
||||
|
||||
1.0.2 / 2014-05-29
|
||||
==================
|
||||
|
||||
* Fix interpretation when header not in request
|
||||
* deps: pin negotiator@0.4.5
|
||||
|
||||
1.0.1 / 2014-01-18
|
||||
==================
|
||||
|
||||
* Identity encoding isn't always acceptable
|
||||
* deps: negotiator@~0.4.0
|
||||
|
||||
1.0.0 / 2013-12-27
|
||||
==================
|
||||
|
||||
* Genesis
|
23
node_modules/accepts/LICENSE
generated
vendored
Normal file
23
node_modules/accepts/LICENSE
generated
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
|
||||
Copyright (c) 2015 Douglas Christopher Wilson <doug@somethingdoug.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
'Software'), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
140
node_modules/accepts/README.md
generated
vendored
Normal file
140
node_modules/accepts/README.md
generated
vendored
Normal file
@ -0,0 +1,140 @@
|
||||
# accepts
|
||||
|
||||
[![NPM Version][npm-version-image]][npm-url]
|
||||
[![NPM Downloads][npm-downloads-image]][npm-url]
|
||||
[![Node.js Version][node-version-image]][node-version-url]
|
||||
[![Build Status][github-actions-ci-image]][github-actions-ci-url]
|
||||
[![Test Coverage][coveralls-image]][coveralls-url]
|
||||
|
||||
Higher level content negotiation based on [negotiator](https://www.npmjs.com/package/negotiator).
|
||||
Extracted from [koa](https://www.npmjs.com/package/koa) for general use.
|
||||
|
||||
In addition to negotiator, it allows:
|
||||
|
||||
- Allows types as an array or arguments list, ie `(['text/html', 'application/json'])`
|
||||
as well as `('text/html', 'application/json')`.
|
||||
- Allows type shorthands such as `json`.
|
||||
- Returns `false` when no types match
|
||||
- Treats non-existent headers as `*`
|
||||
|
||||
## Installation
|
||||
|
||||
This is a [Node.js](https://nodejs.org/en/) module available through the
|
||||
[npm registry](https://www.npmjs.com/). Installation is done using the
|
||||
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
|
||||
|
||||
```sh
|
||||
$ npm install accepts
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
```js
|
||||
var accepts = require('accepts')
|
||||
```
|
||||
|
||||
### accepts(req)
|
||||
|
||||
Create a new `Accepts` object for the given `req`.
|
||||
|
||||
#### .charset(charsets)
|
||||
|
||||
Return the first accepted charset. If nothing in `charsets` is accepted,
|
||||
then `false` is returned.
|
||||
|
||||
#### .charsets()
|
||||
|
||||
Return the charsets that the request accepts, in the order of the client's
|
||||
preference (most preferred first).
|
||||
|
||||
#### .encoding(encodings)
|
||||
|
||||
Return the first accepted encoding. If nothing in `encodings` is accepted,
|
||||
then `false` is returned.
|
||||
|
||||
#### .encodings()
|
||||
|
||||
Return the encodings that the request accepts, in the order of the client's
|
||||
preference (most preferred first).
|
||||
|
||||
#### .language(languages)
|
||||
|
||||
Return the first accepted language. If nothing in `languages` is accepted,
|
||||
then `false` is returned.
|
||||
|
||||
#### .languages()
|
||||
|
||||
Return the languages that the request accepts, in the order of the client's
|
||||
preference (most preferred first).
|
||||
|
||||
#### .type(types)
|
||||
|
||||
Return the first accepted type (and it is returned as the same text as what
|
||||
appears in the `types` array). If nothing in `types` is accepted, then `false`
|
||||
is returned.
|
||||
|
||||
The `types` array can contain full MIME types or file extensions. Any value
|
||||
that is not a full MIME types is passed to `require('mime-types').lookup`.
|
||||
|
||||
#### .types()
|
||||
|
||||
Return the types that the request accepts, in the order of the client's
|
||||
preference (most preferred first).
|
||||
|
||||
## Examples
|
||||
|
||||
### Simple type negotiation
|
||||
|
||||
This simple example shows how to use `accepts` to return a different typed
|
||||
respond body based on what the client wants to accept. The server lists it's
|
||||
preferences in order and will get back the best match between the client and
|
||||
server.
|
||||
|
||||
```js
|
||||
var accepts = require('accepts')
|
||||
var http = require('http')
|
||||
|
||||
function app (req, res) {
|
||||
var accept = accepts(req)
|
||||
|
||||
// the order of this list is significant; should be server preferred order
|
||||
switch (accept.type(['json', 'html'])) {
|
||||
case 'json':
|
||||
res.setHeader('Content-Type', 'application/json')
|
||||
res.write('{"hello":"world!"}')
|
||||
break
|
||||
case 'html':
|
||||
res.setHeader('Content-Type', 'text/html')
|
||||
res.write('<b>hello, world!</b>')
|
||||
break
|
||||
default:
|
||||
// the fallback is text/plain, so no need to specify it above
|
||||
res.setHeader('Content-Type', 'text/plain')
|
||||
res.write('hello, world!')
|
||||
break
|
||||
}
|
||||
|
||||
res.end()
|
||||
}
|
||||
|
||||
http.createServer(app).listen(3000)
|
||||
```
|
||||
|
||||
You can test this out with the cURL program:
|
||||
```sh
|
||||
curl -I -H'Accept: text/html' http://localhost:3000/
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
[MIT](LICENSE)
|
||||
|
||||
[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/accepts/master
|
||||
[coveralls-url]: https://coveralls.io/r/jshttp/accepts?branch=master
|
||||
[github-actions-ci-image]: https://badgen.net/github/checks/jshttp/accepts/master?label=ci
|
||||
[github-actions-ci-url]: https://github.com/jshttp/accepts/actions/workflows/ci.yml
|
||||
[node-version-image]: https://badgen.net/npm/node/accepts
|
||||
[node-version-url]: https://nodejs.org/en/download
|
||||
[npm-downloads-image]: https://badgen.net/npm/dm/accepts
|
||||
[npm-url]: https://npmjs.org/package/accepts
|
||||
[npm-version-image]: https://badgen.net/npm/v/accepts
|
238
node_modules/accepts/index.js
generated
vendored
Normal file
238
node_modules/accepts/index.js
generated
vendored
Normal file
@ -0,0 +1,238 @@
|
||||
/*!
|
||||
* accepts
|
||||
* Copyright(c) 2014 Jonathan Ong
|
||||
* Copyright(c) 2015 Douglas Christopher Wilson
|
||||
* MIT Licensed
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
/**
|
||||
* Module dependencies.
|
||||
* @private
|
||||
*/
|
||||
|
||||
var Negotiator = require('negotiator')
|
||||
var mime = require('mime-types')
|
||||
|
||||
/**
|
||||
* Module exports.
|
||||
* @public
|
||||
*/
|
||||
|
||||
module.exports = Accepts
|
||||
|
||||
/**
|
||||
* Create a new Accepts object for the given req.
|
||||
*
|
||||
* @param {object} req
|
||||
* @public
|
||||
*/
|
||||
|
||||
function Accepts (req) {
|
||||
if (!(this instanceof Accepts)) {
|
||||
return new Accepts(req)
|
||||
}
|
||||
|
||||
this.headers = req.headers
|
||||
this.negotiator = new Negotiator(req)
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if the given `type(s)` is acceptable, returning
|
||||
* the best match when true, otherwise `undefined`, in which
|
||||
* case you should respond with 406 "Not Acceptable".
|
||||
*
|
||||
* The `type` value may be a single mime type string
|
||||
* such as "application/json", the extension name
|
||||
* such as "json" or an array `["json", "html", "text/plain"]`. When a list
|
||||
* or array is given the _best_ match, if any is returned.
|
||||
*
|
||||
* Examples:
|
||||
*
|
||||
* // Accept: text/html
|
||||
* this.types('html');
|
||||
* // => "html"
|
||||
*
|
||||
* // Accept: text/*, application/json
|
||||
* this.types('html');
|
||||
* // => "html"
|
||||
* this.types('text/html');
|
||||
* // => "text/html"
|
||||
* this.types('json', 'text');
|
||||
* // => "json"
|
||||
* this.types('application/json');
|
||||
* // => "application/json"
|
||||
*
|
||||
* // Accept: text/*, application/json
|
||||
* this.types('image/png');
|
||||
* this.types('png');
|
||||
* // => undefined
|
||||
*
|
||||
* // Accept: text/*;q=.5, application/json
|
||||
* this.types(['html', 'json']);
|
||||
* this.types('html', 'json');
|
||||
* // => "json"
|
||||
*
|
||||
* @param {String|Array} types...
|
||||
* @return {String|Array|Boolean}
|
||||
* @public
|
||||
*/
|
||||
|
||||
Accepts.prototype.type =
|
||||
Accepts.prototype.types = function (types_) {
|
||||
var types = types_
|
||||
|
||||
// support flattened arguments
|
||||
if (types && !Array.isArray(types)) {
|
||||
types = new Array(arguments.length)
|
||||
for (var i = 0; i < types.length; i++) {
|
||||
types[i] = arguments[i]
|
||||
}
|
||||
}
|
||||
|
||||
// no types, return all requested types
|
||||
if (!types || types.length === 0) {
|
||||
return this.negotiator.mediaTypes()
|
||||
}
|
||||
|
||||
// no accept header, return first given type
|
||||
if (!this.headers.accept) {
|
||||
return types[0]
|
||||
}
|
||||
|
||||
var mimes = types.map(extToMime)
|
||||
var accepts = this.negotiator.mediaTypes(mimes.filter(validMime))
|
||||
var first = accepts[0]
|
||||
|
||||
return first
|
||||
? types[mimes.indexOf(first)]
|
||||
: false
|
||||
}
|
||||
|
||||
/**
|
||||
* Return accepted encodings or best fit based on `encodings`.
|
||||
*
|
||||
* Given `Accept-Encoding: gzip, deflate`
|
||||
* an array sorted by quality is returned:
|
||||
*
|
||||
* ['gzip', 'deflate']
|
||||
*
|
||||
* @param {String|Array} encodings...
|
||||
* @return {String|Array}
|
||||
* @public
|
||||
*/
|
||||
|
||||
Accepts.prototype.encoding =
|
||||
Accepts.prototype.encodings = function (encodings_) {
|
||||
var encodings = encodings_
|
||||
|
||||
// support flattened arguments
|
||||
if (encodings && !Array.isArray(encodings)) {
|
||||
encodings = new Array(arguments.length)
|
||||
for (var i = 0; i < encodings.length; i++) {
|
||||
encodings[i] = arguments[i]
|
||||
}
|
||||
}
|
||||
|
||||
// no encodings, return all requested encodings
|
||||
if (!encodings || encodings.length === 0) {
|
||||
return this.negotiator.encodings()
|
||||
}
|
||||
|
||||
return this.negotiator.encodings(encodings)[0] || false
|
||||
}
|
||||
|
||||
/**
|
||||
* Return accepted charsets or best fit based on `charsets`.
|
||||
*
|
||||
* Given `Accept-Charset: utf-8, iso-8859-1;q=0.2, utf-7;q=0.5`
|
||||
* an array sorted by quality is returned:
|
||||
*
|
||||
* ['utf-8', 'utf-7', 'iso-8859-1']
|
||||
*
|
||||
* @param {String|Array} charsets...
|
||||
* @return {String|Array}
|
||||
* @public
|
||||
*/
|
||||
|
||||
Accepts.prototype.charset =
|
||||
Accepts.prototype.charsets = function (charsets_) {
|
||||
var charsets = charsets_
|
||||
|
||||
// support flattened arguments
|
||||
if (charsets && !Array.isArray(charsets)) {
|
||||
charsets = new Array(arguments.length)
|
||||
for (var i = 0; i < charsets.length; i++) {
|
||||
charsets[i] = arguments[i]
|
||||
}
|
||||
}
|
||||
|
||||
// no charsets, return all requested charsets
|
||||
if (!charsets || charsets.length === 0) {
|
||||
return this.negotiator.charsets()
|
||||
}
|
||||
|
||||
return this.negotiator.charsets(charsets)[0] || false
|
||||
}
|
||||
|
||||
/**
|
||||
* Return accepted languages or best fit based on `langs`.
|
||||
*
|
||||
* Given `Accept-Language: en;q=0.8, es, pt`
|
||||
* an array sorted by quality is returned:
|
||||
*
|
||||
* ['es', 'pt', 'en']
|
||||
*
|
||||
* @param {String|Array} langs...
|
||||
* @return {Array|String}
|
||||
* @public
|
||||
*/
|
||||
|
||||
Accepts.prototype.lang =
|
||||
Accepts.prototype.langs =
|
||||
Accepts.prototype.language =
|
||||
Accepts.prototype.languages = function (languages_) {
|
||||
var languages = languages_
|
||||
|
||||
// support flattened arguments
|
||||
if (languages && !Array.isArray(languages)) {
|
||||
languages = new Array(arguments.length)
|
||||
for (var i = 0; i < languages.length; i++) {
|
||||
languages[i] = arguments[i]
|
||||
}
|
||||
}
|
||||
|
||||
// no languages, return all requested languages
|
||||
if (!languages || languages.length === 0) {
|
||||
return this.negotiator.languages()
|
||||
}
|
||||
|
||||
return this.negotiator.languages(languages)[0] || false
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert extnames to mime.
|
||||
*
|
||||
* @param {String} type
|
||||
* @return {String}
|
||||
* @private
|
||||
*/
|
||||
|
||||
function extToMime (type) {
|
||||
return type.indexOf('/') === -1
|
||||
? mime.lookup(type)
|
||||
: type
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if mime is valid.
|
||||
*
|
||||
* @param {String} type
|
||||
* @return {String}
|
||||
* @private
|
||||
*/
|
||||
|
||||
function validMime (type) {
|
||||
return typeof type === 'string'
|
||||
}
|
47
node_modules/accepts/package.json
generated
vendored
Normal file
47
node_modules/accepts/package.json
generated
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
{
|
||||
"name": "accepts",
|
||||
"description": "Higher-level content negotiation",
|
||||
"version": "1.3.8",
|
||||
"contributors": [
|
||||
"Douglas Christopher Wilson <doug@somethingdoug.com>",
|
||||
"Jonathan Ong <me@jongleberry.com> (http://jongleberry.com)"
|
||||
],
|
||||
"license": "MIT",
|
||||
"repository": "jshttp/accepts",
|
||||
"dependencies": {
|
||||
"mime-types": "~2.1.34",
|
||||
"negotiator": "0.6.3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"deep-equal": "1.0.1",
|
||||
"eslint": "7.32.0",
|
||||
"eslint-config-standard": "14.1.1",
|
||||
"eslint-plugin-import": "2.25.4",
|
||||
"eslint-plugin-markdown": "2.2.1",
|
||||
"eslint-plugin-node": "11.1.0",
|
||||
"eslint-plugin-promise": "4.3.1",
|
||||
"eslint-plugin-standard": "4.1.0",
|
||||
"mocha": "9.2.0",
|
||||
"nyc": "15.1.0"
|
||||
},
|
||||
"files": [
|
||||
"LICENSE",
|
||||
"HISTORY.md",
|
||||
"index.js"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 0.6"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint .",
|
||||
"test": "mocha --reporter spec --check-leaks --bail test/",
|
||||
"test-ci": "nyc --reporter=lcov --reporter=text npm test",
|
||||
"test-cov": "nyc --reporter=html --reporter=text npm test"
|
||||
},
|
||||
"keywords": [
|
||||
"content",
|
||||
"negotiation",
|
||||
"accept",
|
||||
"accepts"
|
||||
]
|
||||
}
|
15
node_modules/anymatch/LICENSE
generated
vendored
Normal file
15
node_modules/anymatch/LICENSE
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
The ISC License
|
||||
|
||||
Copyright (c) 2014 Elan Shanker
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any
|
||||
purpose with or without fee is hereby granted, provided that the above
|
||||
copyright notice and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
||||
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
||||
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
||||
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
||||
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
||||
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
||||
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
99
node_modules/anymatch/README.md
generated
vendored
Normal file
99
node_modules/anymatch/README.md
generated
vendored
Normal file
@ -0,0 +1,99 @@
|
||||
anymatch [![Build Status](https://travis-ci.org/micromatch/anymatch.svg?branch=master)](https://travis-ci.org/micromatch/anymatch) [![Coverage Status](https://img.shields.io/coveralls/micromatch/anymatch.svg?branch=master)](https://coveralls.io/r/micromatch/anymatch?branch=master)
|
||||
======
|
||||
Javascript module to match a string against a regular expression, glob, string,
|
||||
or function that takes the string as an argument and returns a truthy or falsy
|
||||
value. The matcher can also be an array of any or all of these. Useful for
|
||||
allowing a very flexible user-defined config to define things like file paths.
|
||||
|
||||
__Note: This module has Bash-parity, please be aware that Windows-style backslashes are not supported as separators. See https://github.com/micromatch/micromatch#backslashes for more information.__
|
||||
|
||||
[![NPM](https://nodei.co/npm/anymatch.png?downloads=true&downloadRank=true&stars=true)](https://nodei.co/npm/anymatch/)
|
||||
[![NPM](https://nodei.co/npm-dl/anymatch.png?height=3&months=9)](https://nodei.co/npm-dl/anymatch/)
|
||||
|
||||
Usage
|
||||
-----
|
||||
```sh
|
||||
npm install anymatch --save
|
||||
```
|
||||
|
||||
#### anymatch (matchers, testString, [returnIndex], [startIndex], [endIndex])
|
||||
* __matchers__: (_Array|String|RegExp|Function_)
|
||||
String to be directly matched, string with glob patterns, regular expression
|
||||
test, function that takes the testString as an argument and returns a truthy
|
||||
value if it should be matched, or an array of any number and mix of these types.
|
||||
* __testString__: (_String|Array_) The string to test against the matchers. If
|
||||
passed as an array, the first element of the array will be used as the
|
||||
`testString` for non-function matchers, while the entire array will be applied
|
||||
as the arguments for function matchers.
|
||||
* __returnIndex__: (_Boolean [optional]_) If true, return the array index of
|
||||
the first matcher that that testString matched, or -1 if no match, instead of a
|
||||
boolean result.
|
||||
* __startIndex, endIndex__: (_Integer [optional]_) Can be used to define a
|
||||
subset out of the array of provided matchers to test against. Can be useful
|
||||
with bound matcher functions (see below). When used with `returnIndex = true`
|
||||
preserves original indexing. Behaves the same as `Array.prototype.slice` (i.e.
|
||||
includes array members up to, but not including endIndex).
|
||||
|
||||
```js
|
||||
var anymatch = require('anymatch');
|
||||
|
||||
var matchers = [
|
||||
'path/to/file.js',
|
||||
'path/anyjs/**/*.js',
|
||||
/foo\.js$/,
|
||||
function (string) {
|
||||
return string.indexOf('bar') !== -1 && string.length > 10
|
||||
}
|
||||
];
|
||||
|
||||
anymatch(matchers, 'path/to/file.js'); // true
|
||||
anymatch(matchers, 'path/anyjs/baz.js'); // true
|
||||
anymatch(matchers, 'path/to/foo.js'); // true
|
||||
anymatch(matchers, 'path/to/bar.js'); // true
|
||||
anymatch(matchers, 'bar.js'); // false
|
||||
|
||||
// returnIndex = true
|
||||
anymatch(matchers, 'foo.js', true); // 2
|
||||
anymatch(matchers, 'path/anyjs/foo.js', true); // 1
|
||||
|
||||
// skip matchers
|
||||
anymatch(matchers, 'path/to/file.js', false, 1); // false
|
||||
anymatch(matchers, 'path/anyjs/foo.js', true, 2, 3); // 2
|
||||
anymatch(matchers, 'path/to/bar.js', true, 0, 3); // -1
|
||||
|
||||
// using globs to match directories and their children
|
||||
anymatch('node_modules', 'node_modules'); // true
|
||||
anymatch('node_modules', 'node_modules/somelib/index.js'); // false
|
||||
anymatch('node_modules/**', 'node_modules/somelib/index.js'); // true
|
||||
anymatch('node_modules/**', '/absolute/path/to/node_modules/somelib/index.js'); // false
|
||||
anymatch('**/node_modules/**', '/absolute/path/to/node_modules/somelib/index.js'); // true
|
||||
```
|
||||
|
||||
#### anymatch (matchers)
|
||||
You can also pass in only your matcher(s) to get a curried function that has
|
||||
already been bound to the provided matching criteria. This can be used as an
|
||||
`Array.prototype.filter` callback.
|
||||
|
||||
```js
|
||||
var matcher = anymatch(matchers);
|
||||
|
||||
matcher('path/to/file.js'); // true
|
||||
matcher('path/anyjs/baz.js', true); // 1
|
||||
matcher('path/anyjs/baz.js', true, 2); // -1
|
||||
|
||||
['foo.js', 'bar.js'].filter(matcher); // ['foo.js']
|
||||
```
|
||||
|
||||
Change Log
|
||||
----------
|
||||
[See release notes page on GitHub](https://github.com/micromatch/anymatch/releases)
|
||||
|
||||
NOTE: As of v2.0.0, [micromatch](https://github.com/jonschlinkert/micromatch) moves away from minimatch-parity and inline with Bash. This includes handling backslashes differently (see https://github.com/micromatch/micromatch#backslashes for more information).
|
||||
|
||||
NOTE: As of v1.2.0, anymatch uses [micromatch](https://github.com/jonschlinkert/micromatch)
|
||||
for glob pattern matching. Issues with glob pattern matching should be
|
||||
reported directly to the [micromatch issue tracker](https://github.com/jonschlinkert/micromatch/issues).
|
||||
|
||||
License
|
||||
-------
|
||||
[ISC](https://raw.github.com/micromatch/anymatch/master/LICENSE)
|
67
node_modules/anymatch/index.js
generated
vendored
Normal file
67
node_modules/anymatch/index.js
generated
vendored
Normal file
@ -0,0 +1,67 @@
|
||||
'use strict';
|
||||
|
||||
var micromatch = require('micromatch');
|
||||
var normalize = require('normalize-path');
|
||||
var path = require('path'); // required for tests.
|
||||
var arrify = function(a) { return a == null ? [] : (Array.isArray(a) ? a : [a]); };
|
||||
|
||||
var anymatch = function(criteria, value, returnIndex, startIndex, endIndex) {
|
||||
criteria = arrify(criteria);
|
||||
value = arrify(value);
|
||||
if (arguments.length === 1) {
|
||||
return anymatch.bind(null, criteria.map(function(criterion) {
|
||||
return typeof criterion === 'string' && criterion[0] !== '!' ?
|
||||
micromatch.matcher(criterion) : criterion;
|
||||
}));
|
||||
}
|
||||
startIndex = startIndex || 0;
|
||||
var string = value[0];
|
||||
var altString, altValue;
|
||||
var matched = false;
|
||||
var matchIndex = -1;
|
||||
function testCriteria(criterion, index) {
|
||||
var result;
|
||||
switch (Object.prototype.toString.call(criterion)) {
|
||||
case '[object String]':
|
||||
result = string === criterion || altString && altString === criterion;
|
||||
result = result || micromatch.isMatch(string, criterion);
|
||||
break;
|
||||
case '[object RegExp]':
|
||||
result = criterion.test(string) || altString && criterion.test(altString);
|
||||
break;
|
||||
case '[object Function]':
|
||||
result = criterion.apply(null, value);
|
||||
result = result || altValue && criterion.apply(null, altValue);
|
||||
break;
|
||||
default:
|
||||
result = false;
|
||||
}
|
||||
if (result) {
|
||||
matchIndex = index + startIndex;
|
||||
}
|
||||
return result;
|
||||
}
|
||||
var crit = criteria;
|
||||
var negGlobs = crit.reduce(function(arr, criterion, index) {
|
||||
if (typeof criterion === 'string' && criterion[0] === '!') {
|
||||
if (crit === criteria) {
|
||||
// make a copy before modifying
|
||||
crit = crit.slice();
|
||||
}
|
||||
crit[index] = null;
|
||||
arr.push(criterion.substr(1));
|
||||
}
|
||||
return arr;
|
||||
}, []);
|
||||
if (!negGlobs.length || !micromatch.any(string, negGlobs)) {
|
||||
if (path.sep === '\\' && typeof string === 'string') {
|
||||
altString = normalize(string);
|
||||
altString = altString === string ? null : altString;
|
||||
if (altString) altValue = [altString].concat(value.slice(1));
|
||||
}
|
||||
matched = crit.slice(startIndex, endIndex).some(testCriteria);
|
||||
}
|
||||
return returnIndex === true ? matchIndex : matched;
|
||||
};
|
||||
|
||||
module.exports = anymatch;
|
21
node_modules/anymatch/node_modules/normalize-path/LICENSE
generated
vendored
Normal file
21
node_modules/anymatch/node_modules/normalize-path/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-2017, Jon Schlinkert
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
92
node_modules/anymatch/node_modules/normalize-path/README.md
generated
vendored
Normal file
92
node_modules/anymatch/node_modules/normalize-path/README.md
generated
vendored
Normal file
@ -0,0 +1,92 @@
|
||||
# normalize-path [![NPM version](https://img.shields.io/npm/v/normalize-path.svg?style=flat)](https://www.npmjs.com/package/normalize-path) [![NPM monthly downloads](https://img.shields.io/npm/dm/normalize-path.svg?style=flat)](https://npmjs.org/package/normalize-path) [![NPM total downloads](https://img.shields.io/npm/dt/normalize-path.svg?style=flat)](https://npmjs.org/package/normalize-path) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/normalize-path.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/normalize-path)
|
||||
|
||||
> Normalize file path slashes to be unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes unless disabled.
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://www.npmjs.com/):
|
||||
|
||||
```sh
|
||||
$ npm install --save normalize-path
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var normalize = require('normalize-path');
|
||||
|
||||
normalize('\\foo\\bar\\baz\\');
|
||||
//=> '/foo/bar/baz'
|
||||
|
||||
normalize('./foo/bar/baz/');
|
||||
//=> './foo/bar/baz'
|
||||
```
|
||||
|
||||
Pass `false` as the last argument to **keep** trailing slashes:
|
||||
|
||||
```js
|
||||
normalize('./foo/bar/baz/', false);
|
||||
//=> './foo/bar/baz/'
|
||||
|
||||
normalize('foo\\bar\\baz\\', false);
|
||||
//=> 'foo/bar/baz/'
|
||||
```
|
||||
|
||||
## About
|
||||
|
||||
### Related projects
|
||||
|
||||
* [contains-path](https://www.npmjs.com/package/contains-path): Return true if a file path contains the given path. | [homepage](https://github.com/jonschlinkert/contains-path "Return true if a file path contains the given path.")
|
||||
* [ends-with](https://www.npmjs.com/package/ends-with): Returns `true` if the given `string` or `array` ends with `suffix` using strict equality for… [more](https://github.com/jonschlinkert/ends-with) | [homepage](https://github.com/jonschlinkert/ends-with "Returns `true` if the given `string` or `array` ends with `suffix` using strict equality for comparisons.")
|
||||
* [is-absolute](https://www.npmjs.com/package/is-absolute): Polyfill for node.js `path.isAbolute`. Returns true if a file path is absolute. | [homepage](https://github.com/jonschlinkert/is-absolute "Polyfill for node.js `path.isAbolute`. Returns true if a file path is absolute.")
|
||||
* [is-relative](https://www.npmjs.com/package/is-relative): Returns `true` if the path appears to be relative. | [homepage](https://github.com/jonschlinkert/is-relative "Returns `true` if the path appears to be relative.")
|
||||
* [parse-filepath](https://www.npmjs.com/package/parse-filepath): Pollyfill for node.js `path.parse`, parses a filepath into an object. | [homepage](https://github.com/jonschlinkert/parse-filepath "Pollyfill for node.js `path.parse`, parses a filepath into an object.")
|
||||
* [path-ends-with](https://www.npmjs.com/package/path-ends-with): Return `true` if a file path ends with the given string/suffix. | [homepage](https://github.com/jonschlinkert/path-ends-with "Return `true` if a file path ends with the given string/suffix.")
|
||||
* [path-segments](https://www.npmjs.com/package/path-segments): Get n specific segments of a file path, e.g. first 2, last 3, etc. | [homepage](https://github.com/jonschlinkert/path-segments "Get n specific segments of a file path, e.g. first 2, last 3, etc.")
|
||||
* [rewrite-ext](https://www.npmjs.com/package/rewrite-ext): Automatically re-write the destination extension of a filepath based on the source extension. e.g… [more](https://github.com/jonschlinkert/rewrite-ext) | [homepage](https://github.com/jonschlinkert/rewrite-ext "Automatically re-write the destination extension of a filepath based on the source extension. e.g `.coffee` => `.js`. This will only rename the ext, no other path parts are modified.")
|
||||
* [unixify](https://www.npmjs.com/package/unixify): Convert Windows file paths to unix paths. | [homepage](https://github.com/jonschlinkert/unixify "Convert Windows file paths to unix paths.")
|
||||
|
||||
### Contributing
|
||||
|
||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
|
||||
|
||||
### Contributors
|
||||
|
||||
| **Commits** | **Contributor** |
|
||||
| --- | --- |
|
||||
| 31 | [jonschlinkert](https://github.com/jonschlinkert) |
|
||||
| 1 | [phated](https://github.com/phated) |
|
||||
|
||||
### Building docs
|
||||
|
||||
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
|
||||
|
||||
To generate the readme, run the following command:
|
||||
|
||||
```sh
|
||||
$ npm install -g verbose/verb#dev verb-generate-readme && verb
|
||||
```
|
||||
|
||||
### Running tests
|
||||
|
||||
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
|
||||
|
||||
```sh
|
||||
$ npm install && npm test
|
||||
```
|
||||
|
||||
### Author
|
||||
|
||||
**Jon Schlinkert**
|
||||
|
||||
* [github/jonschlinkert](https://github.com/jonschlinkert)
|
||||
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
|
||||
|
||||
### License
|
||||
|
||||
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
|
||||
Released under the [MIT License](LICENSE).
|
||||
|
||||
***
|
||||
|
||||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.4.3, on March 29, 2017._
|
19
node_modules/anymatch/node_modules/normalize-path/index.js
generated
vendored
Normal file
19
node_modules/anymatch/node_modules/normalize-path/index.js
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
/*!
|
||||
* normalize-path <https://github.com/jonschlinkert/normalize-path>
|
||||
*
|
||||
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
var removeTrailingSeparator = require('remove-trailing-separator');
|
||||
|
||||
module.exports = function normalizePath(str, stripTrailing) {
|
||||
if (typeof str !== 'string') {
|
||||
throw new TypeError('expected a string');
|
||||
}
|
||||
str = str.replace(/[\\\/]+/g, '/');
|
||||
if (stripTrailing !== false) {
|
||||
str = removeTrailingSeparator(str);
|
||||
}
|
||||
return str;
|
||||
};
|
78
node_modules/anymatch/node_modules/normalize-path/package.json
generated
vendored
Normal file
78
node_modules/anymatch/node_modules/normalize-path/package.json
generated
vendored
Normal file
@ -0,0 +1,78 @@
|
||||
{
|
||||
"name": "normalize-path",
|
||||
"description": "Normalize file path slashes to be unix-like forward slashes. Also condenses repeat slashes to a single slash and removes and trailing slashes unless disabled.",
|
||||
"version": "2.1.1",
|
||||
"homepage": "https://github.com/jonschlinkert/normalize-path",
|
||||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
||||
"contributors": [
|
||||
"Blaine Bublitz <blaine.bublitz@gmail.com> (https://twitter.com/BlaineBublitz)",
|
||||
"Jon Schlinkert <jon.schlinkert@sellside.com> (http://twitter.com/jonschlinkert)"
|
||||
],
|
||||
"repository": "jonschlinkert/normalize-path",
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/normalize-path/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"dependencies": {
|
||||
"remove-trailing-separator": "^1.0.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"benchmarked": "^0.1.1",
|
||||
"gulp-format-md": "^0.1.11",
|
||||
"minimist": "^1.2.0",
|
||||
"mocha": "*"
|
||||
},
|
||||
"keywords": [
|
||||
"backslash",
|
||||
"file",
|
||||
"filepath",
|
||||
"fix",
|
||||
"forward",
|
||||
"fp",
|
||||
"fs",
|
||||
"normalize",
|
||||
"path",
|
||||
"slash",
|
||||
"slashes",
|
||||
"trailing",
|
||||
"unix",
|
||||
"urix"
|
||||
],
|
||||
"verb": {
|
||||
"related": {
|
||||
"list": [
|
||||
"contains-path",
|
||||
"ends-with",
|
||||
"is-absolute",
|
||||
"is-relative",
|
||||
"parse-filepath",
|
||||
"path-ends-with",
|
||||
"path-segments",
|
||||
"rewrite-ext",
|
||||
"unixify"
|
||||
],
|
||||
"description": "Other useful libraries for working with paths in node.js:"
|
||||
},
|
||||
"toc": false,
|
||||
"layout": "default",
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
}
|
||||
}
|
||||
}
|
47
node_modules/anymatch/package.json
generated
vendored
Normal file
47
node_modules/anymatch/package.json
generated
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
{
|
||||
"name": "anymatch",
|
||||
"version": "2.0.0",
|
||||
"description": "Matches strings against configurable strings, globs, regular expressions, and/or functions",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"author": {
|
||||
"name": "Elan Shanker",
|
||||
"url": "http://github.com/es128"
|
||||
},
|
||||
"license": "ISC",
|
||||
"homepage": "https://github.com/micromatch/anymatch",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/micromatch/anymatch"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/micromatch/anymatch/issues"
|
||||
},
|
||||
"keywords": [
|
||||
"match",
|
||||
"any",
|
||||
"string",
|
||||
"file",
|
||||
"fs",
|
||||
"list",
|
||||
"glob",
|
||||
"regex",
|
||||
"regexp",
|
||||
"regular",
|
||||
"expression",
|
||||
"function"
|
||||
],
|
||||
"scripts": {
|
||||
"test": "istanbul cover _mocha && cat ./coverage/lcov.info | coveralls"
|
||||
},
|
||||
"dependencies": {
|
||||
"micromatch": "^3.1.4",
|
||||
"normalize-path": "^2.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"coveralls": "^2.7.0",
|
||||
"istanbul": "^0.4.5",
|
||||
"mocha": "^3.0.0"
|
||||
}
|
||||
}
|
20
node_modules/apache-crypt/LICENSE
generated
vendored
Normal file
20
node_modules/apache-crypt/LICENSE
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Gevorg Harutyunyan
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
43
node_modules/apache-crypt/README.md
generated
vendored
Normal file
43
node_modules/apache-crypt/README.md
generated
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
# apache-crypt
|
||||
[Node.js](http://nodejs.org/) package for Apache style password encryption using crypt(3).
|
||||
|
||||
[![build](https://github.com/gevorg/apache-crypt/workflows/build/badge.svg)](https://github.com/gevorg/apache-crypt/actions/workflows/build.yml)
|
||||
|
||||
## Installation
|
||||
|
||||
Via git (or downloaded tarball):
|
||||
|
||||
```bash
|
||||
$ git clone git://github.com/gevorg/apache-crypt.git
|
||||
```
|
||||
Via [npm](http://npmjs.org/):
|
||||
|
||||
```bash
|
||||
$ npm install apache-crypt
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```javascript
|
||||
const crypt = require("apache-crypt");
|
||||
|
||||
// Encrypting password using auto-generated 2 char salt.
|
||||
const encryptedPassword = crypt("mypass");
|
||||
|
||||
// Should print true.
|
||||
console.log(crypt("mypass", encryptedPassword) == encryptedPassword);
|
||||
// Should print false.
|
||||
console.log(crypt("notmypass", encryptedPassword) == encryptedPassword);
|
||||
```
|
||||
|
||||
## Running tests
|
||||
|
||||
It uses [mocha](https://mochajs.org/), so just run following command in package directory:
|
||||
|
||||
```bash
|
||||
$ npm test
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
The MIT License (MIT)
|
53
node_modules/apache-crypt/package.json
generated
vendored
Normal file
53
node_modules/apache-crypt/package.json
generated
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
{
|
||||
"name": "apache-crypt",
|
||||
"description": "Node.js module for Apache style password encryption using crypt(3).",
|
||||
"version": "1.2.6",
|
||||
"author": "Gevorg Harutyunyan (http://github.com/gevorg)",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "gevorg",
|
||||
"email": "gevorg.ha@gmail.com"
|
||||
}
|
||||
],
|
||||
"homepage": "http://github.com/gevorg/apache-crypt",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "http://github.com/gevorg/apache-crypt.git"
|
||||
},
|
||||
"main": "./src/index.js",
|
||||
"licenses": [
|
||||
{
|
||||
"type": "MIT",
|
||||
"url": "http://github.com/gevorg/apache-crypt/blob/master/LICENSE"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "http://github.com/gevorg/apache-crypt/issues"
|
||||
},
|
||||
"dependencies": {
|
||||
"unix-crypt-td-js": "^1.1.4"
|
||||
},
|
||||
"devDependencies": {
|
||||
"chai": "^4.2.0",
|
||||
"eslint": "^6.8.0",
|
||||
"eslint-config-prettier": "^6.10.0",
|
||||
"eslint-plugin-node": "^11.0.0",
|
||||
"eslint-plugin-prettier": "^3.1.2",
|
||||
"mocha": "^7.0.1",
|
||||
"prettier": "^1.19.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha",
|
||||
"pretest": "eslint --ignore-path .gitignore ."
|
||||
},
|
||||
"keywords": [
|
||||
"apache",
|
||||
"crypt",
|
||||
"password",
|
||||
"htpasswd"
|
||||
]
|
||||
}
|
20
node_modules/apache-crypt/src/index.js
generated
vendored
Normal file
20
node_modules/apache-crypt/src/index.js
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
"use strict";
|
||||
|
||||
// Des module.
|
||||
const des = require("unix-crypt-td-js");
|
||||
|
||||
// Hash generation string.
|
||||
const itoa64 =
|
||||
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
||||
|
||||
// Salt generation method.
|
||||
function getSalt() {
|
||||
return (
|
||||
itoa64[parseInt(Math.random() * 64)] + itoa64[parseInt(Math.random() * 64)]
|
||||
);
|
||||
}
|
||||
|
||||
// Exporting old style.
|
||||
module.exports = (password, salt) => {
|
||||
return salt ? des(password, salt) : des(password, getSalt());
|
||||
};
|
20
node_modules/apache-md5/LICENSE
generated
vendored
Normal file
20
node_modules/apache-md5/LICENSE
generated
vendored
Normal file
@ -0,0 +1,20 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) Gevorg Harutyunyan
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
43
node_modules/apache-md5/README.md
generated
vendored
Normal file
43
node_modules/apache-md5/README.md
generated
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
# apache-md5
|
||||
[Node.js](http://nodejs.org/) package for Apache style password encryption using md5.
|
||||
|
||||
[![build](https://github.com/gevorg/apache-md5/workflows/build/badge.svg)](https://github.com/gevorg/apache-md5/actions/workflows/build.yml)
|
||||
|
||||
## Installation
|
||||
|
||||
Via git (or downloaded tarball):
|
||||
|
||||
```bash
|
||||
$ git clone git://github.com/gevorg/apache-md5.git
|
||||
```
|
||||
Via [npm](http://npmjs.org/):
|
||||
|
||||
```bash
|
||||
$ npm install apache-md5
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```javascript
|
||||
const md5 = require("apache-md5");
|
||||
|
||||
// Encrypting password using apache's md5 algorithm.
|
||||
const encryptedPassword = md5("mypass");
|
||||
|
||||
// Should print true.
|
||||
console.log(md5("mypass", encryptedPassword) == encryptedPassword);
|
||||
// Should print false.
|
||||
console.log(md5("notmypass", encryptedPassword) == encryptedPassword);
|
||||
```
|
||||
|
||||
## Running tests
|
||||
|
||||
It uses [mocha](https://mochajs.org/), so just run following command in package directory:
|
||||
|
||||
```bash
|
||||
$ npm test
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
The MIT License (MIT)
|
51
node_modules/apache-md5/package.json
generated
vendored
Normal file
51
node_modules/apache-md5/package.json
generated
vendored
Normal file
@ -0,0 +1,51 @@
|
||||
{
|
||||
"name": "apache-md5",
|
||||
"description": "Node.js module for Apache style password encryption using md5.",
|
||||
"version": "1.1.8",
|
||||
"author": "Gevorg Harutyunyan (http://github.com/gevorg)",
|
||||
"maintainers": [
|
||||
{
|
||||
"name": "gevorg",
|
||||
"email": "gevorg.ha@gmail.com"
|
||||
}
|
||||
],
|
||||
"homepage": "http://github.com/gevorg/apache-md5",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "http://github.com/gevorg/apache-md5.git"
|
||||
},
|
||||
"main": "./src/index.js",
|
||||
"typings": "./src/apache-md5.d.ts",
|
||||
"licenses": [
|
||||
{
|
||||
"type": "MIT",
|
||||
"url": "http://github.com/gevorg/apache-md5/blob/master/LICENSE"
|
||||
}
|
||||
],
|
||||
"license": "MIT",
|
||||
"bugs": {
|
||||
"url": "http://github.com/gevorg/apache-md5/issues"
|
||||
},
|
||||
"devDependencies": {
|
||||
"chai": "^4.2.0",
|
||||
"eslint": "^6.8.0",
|
||||
"eslint-config-prettier": "^6.10.0",
|
||||
"eslint-plugin-node": "^11.0.0",
|
||||
"eslint-plugin-prettier": "^3.1.2",
|
||||
"mocha": "^7.0.1",
|
||||
"prettier": "^1.19.1"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=8"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha",
|
||||
"pretest": "eslint --ignore-path .gitignore ."
|
||||
},
|
||||
"keywords": [
|
||||
"apache",
|
||||
"md5",
|
||||
"password",
|
||||
"htpasswd"
|
||||
]
|
||||
}
|
4
node_modules/apache-md5/src/apache-md5.d.ts
generated
vendored
Normal file
4
node_modules/apache-md5/src/apache-md5.d.ts
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
declare function aprMd5(password: string, salt?: string): string;
|
||||
|
||||
export default aprMd5;
|
||||
|
148
node_modules/apache-md5/src/index.js
generated
vendored
Normal file
148
node_modules/apache-md5/src/index.js
generated
vendored
Normal file
@ -0,0 +1,148 @@
|
||||
"use strict";
|
||||
|
||||
// Crypto module import.
|
||||
const crypto = require("crypto");
|
||||
|
||||
// Hash generation string.
|
||||
const itoa64 =
|
||||
"./0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
|
||||
|
||||
// To 64 bit version.
|
||||
function to64(index, count) {
|
||||
let result = "";
|
||||
|
||||
while (--count >= 0) {
|
||||
// Result char count.
|
||||
result += itoa64[index & 63]; // Get corresponding char.
|
||||
index = index >> 6; // Move to next one.
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
// Returns salt.
|
||||
function getSalt(inputSalt) {
|
||||
let salt = "";
|
||||
|
||||
if (inputSalt) {
|
||||
// Remove $apr1$ token and extract salt.
|
||||
salt = inputSalt.split("$")[2];
|
||||
} else {
|
||||
while (salt.length < 8) {
|
||||
// Random 8 chars.
|
||||
let rchIndex = Math.floor(Math.random() * 64);
|
||||
salt += itoa64[rchIndex];
|
||||
}
|
||||
}
|
||||
|
||||
return salt;
|
||||
}
|
||||
|
||||
// Returns password.
|
||||
function getPassword(final) {
|
||||
// Encrypted pass.
|
||||
let epass = "";
|
||||
|
||||
epass += to64(
|
||||
(final.charCodeAt(0) << 16) |
|
||||
(final.charCodeAt(6) << 8) |
|
||||
final.charCodeAt(12),
|
||||
4
|
||||
);
|
||||
epass += to64(
|
||||
(final.charCodeAt(1) << 16) |
|
||||
(final.charCodeAt(7) << 8) |
|
||||
final.charCodeAt(13),
|
||||
4
|
||||
);
|
||||
epass += to64(
|
||||
(final.charCodeAt(2) << 16) |
|
||||
(final.charCodeAt(8) << 8) |
|
||||
final.charCodeAt(14),
|
||||
4
|
||||
);
|
||||
epass += to64(
|
||||
(final.charCodeAt(3) << 16) |
|
||||
(final.charCodeAt(9) << 8) |
|
||||
final.charCodeAt(15),
|
||||
4
|
||||
);
|
||||
epass += to64(
|
||||
(final.charCodeAt(4) << 16) |
|
||||
(final.charCodeAt(10) << 8) |
|
||||
final.charCodeAt(5),
|
||||
4
|
||||
);
|
||||
epass += to64(final.charCodeAt(11), 2);
|
||||
|
||||
return epass;
|
||||
}
|
||||
|
||||
// Exporting old style.
|
||||
module.exports = (password, salt) => {
|
||||
let magic = "";
|
||||
if (salt && salt.split("$")[1] === "1") {
|
||||
magic = "$1$";
|
||||
} else {
|
||||
magic = "$apr1$";
|
||||
}
|
||||
|
||||
salt = getSalt(salt);
|
||||
|
||||
let ctx = password + magic + salt;
|
||||
let final = crypto
|
||||
.createHash("md5")
|
||||
.update(password + salt + password, "ascii")
|
||||
.digest("binary");
|
||||
|
||||
for (let pl = password.length; pl > 0; pl -= 16) {
|
||||
ctx += final.substr(0, pl > 16 ? 16 : pl);
|
||||
}
|
||||
|
||||
for (let i = password.length; i; i >>= 1) {
|
||||
if (i % 2) {
|
||||
ctx += String.fromCharCode(0);
|
||||
} else {
|
||||
ctx += password.charAt(0);
|
||||
}
|
||||
}
|
||||
|
||||
final = crypto
|
||||
.createHash("md5")
|
||||
.update(ctx, "ascii")
|
||||
.digest("binary");
|
||||
|
||||
// 1000 loop.
|
||||
for (let i = 0; i < 1000; ++i) {
|
||||
// Weird stuff.
|
||||
let ctxl = "";
|
||||
|
||||
if (i % 2) {
|
||||
ctxl += password;
|
||||
} else {
|
||||
ctxl += final.substr(0, 16);
|
||||
}
|
||||
|
||||
if (i % 3) {
|
||||
ctxl += salt;
|
||||
}
|
||||
|
||||
if (i % 7) {
|
||||
ctxl += password;
|
||||
}
|
||||
|
||||
if (i % 2) {
|
||||
ctxl += final.substr(0, 16);
|
||||
} else {
|
||||
ctxl += password;
|
||||
}
|
||||
|
||||
// Final assignment after each loop.
|
||||
final = crypto
|
||||
.createHash("md5")
|
||||
.update(ctxl, "ascii")
|
||||
.digest("binary");
|
||||
}
|
||||
|
||||
return magic + salt + "$" + getPassword(final);
|
||||
};
|
21
node_modules/arr-diff/LICENSE
generated
vendored
Executable file
21
node_modules/arr-diff/LICENSE
generated
vendored
Executable file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-2017, Jon Schlinkert
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
130
node_modules/arr-diff/README.md
generated
vendored
Normal file
130
node_modules/arr-diff/README.md
generated
vendored
Normal file
@ -0,0 +1,130 @@
|
||||
# arr-diff [![NPM version](https://img.shields.io/npm/v/arr-diff.svg?style=flat)](https://www.npmjs.com/package/arr-diff) [![NPM monthly downloads](https://img.shields.io/npm/dm/arr-diff.svg?style=flat)](https://npmjs.org/package/arr-diff) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/arr-diff.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/arr-diff)
|
||||
|
||||
> Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons.
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://www.npmjs.com/):
|
||||
|
||||
```sh
|
||||
$ npm install --save arr-diff
|
||||
```
|
||||
|
||||
Install with [yarn](https://yarnpkg.com):
|
||||
|
||||
```sh
|
||||
$ yarn add arr-diff
|
||||
```
|
||||
|
||||
Install with [bower](https://bower.io/)
|
||||
|
||||
```sh
|
||||
$ bower install arr-diff --save
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
Returns the difference between the first array and additional arrays.
|
||||
|
||||
```js
|
||||
var diff = require('arr-diff');
|
||||
|
||||
var a = ['a', 'b', 'c', 'd'];
|
||||
var b = ['b', 'c'];
|
||||
|
||||
console.log(diff(a, b))
|
||||
//=> ['a', 'd']
|
||||
```
|
||||
|
||||
## Benchmarks
|
||||
|
||||
This library versus [array-differ](https://github.com/sindresorhus/array-differ), on April 14, 2017:
|
||||
|
||||
```
|
||||
Benchmarking: (4 of 4)
|
||||
· long-dupes
|
||||
· long
|
||||
· med
|
||||
· short
|
||||
|
||||
# benchmark/fixtures/long-dupes.js (100804 bytes)
|
||||
arr-diff-3.0.0 x 822 ops/sec ±0.67% (86 runs sampled)
|
||||
arr-diff-4.0.0 x 2,141 ops/sec ±0.42% (89 runs sampled)
|
||||
array-differ x 708 ops/sec ±0.70% (89 runs sampled)
|
||||
|
||||
fastest is arr-diff-4.0.0
|
||||
|
||||
# benchmark/fixtures/long.js (94529 bytes)
|
||||
arr-diff-3.0.0 x 882 ops/sec ±0.60% (87 runs sampled)
|
||||
arr-diff-4.0.0 x 2,329 ops/sec ±0.97% (83 runs sampled)
|
||||
array-differ x 769 ops/sec ±0.61% (90 runs sampled)
|
||||
|
||||
fastest is arr-diff-4.0.0
|
||||
|
||||
# benchmark/fixtures/med.js (708 bytes)
|
||||
arr-diff-3.0.0 x 856,150 ops/sec ±0.42% (89 runs sampled)
|
||||
arr-diff-4.0.0 x 4,665,249 ops/sec ±1.06% (89 runs sampled)
|
||||
array-differ x 653,888 ops/sec ±1.02% (86 runs sampled)
|
||||
|
||||
fastest is arr-diff-4.0.0
|
||||
|
||||
# benchmark/fixtures/short.js (60 bytes)
|
||||
arr-diff-3.0.0 x 3,078,467 ops/sec ±0.77% (93 runs sampled)
|
||||
arr-diff-4.0.0 x 9,213,296 ops/sec ±0.65% (89 runs sampled)
|
||||
array-differ x 1,337,051 ops/sec ±0.91% (92 runs sampled)
|
||||
|
||||
fastest is arr-diff-4.0.0
|
||||
```
|
||||
|
||||
## About
|
||||
|
||||
### Related projects
|
||||
|
||||
* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | [homepage](https://github.com/jonschlinkert/arr-flatten "Recursively flatten an array or arrays. This is the fastest implementation of array flatten.")
|
||||
* [array-filter](https://www.npmjs.com/package/array-filter): Array#filter for older browsers. | [homepage](https://github.com/juliangruber/array-filter "Array#filter for older browsers.")
|
||||
* [array-intersection](https://www.npmjs.com/package/array-intersection): Return an array with the unique values present in _all_ given arrays using strict equality… [more](https://github.com/jonschlinkert/array-intersection) | [homepage](https://github.com/jonschlinkert/array-intersection "Return an array with the unique values present in _all_ given arrays using strict equality for comparisons.")
|
||||
|
||||
### Contributing
|
||||
|
||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
|
||||
|
||||
### Contributors
|
||||
|
||||
| **Commits** | **Contributor** |
|
||||
| --- | --- |
|
||||
| 33 | [jonschlinkert](https://github.com/jonschlinkert) |
|
||||
| 2 | [paulmillr](https://github.com/paulmillr) |
|
||||
|
||||
### Building docs
|
||||
|
||||
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
|
||||
|
||||
To generate the readme, run the following command:
|
||||
|
||||
```sh
|
||||
$ npm install -g verbose/verb#dev verb-generate-readme && verb
|
||||
```
|
||||
|
||||
### Running tests
|
||||
|
||||
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
|
||||
|
||||
```sh
|
||||
$ npm install && npm test
|
||||
```
|
||||
|
||||
### Author
|
||||
|
||||
**Jon Schlinkert**
|
||||
|
||||
* [github/jonschlinkert](https://github.com/jonschlinkert)
|
||||
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
|
||||
|
||||
### License
|
||||
|
||||
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
|
||||
Released under the [MIT License](LICENSE).
|
||||
|
||||
***
|
||||
|
||||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.5.0, on April 14, 2017._
|
47
node_modules/arr-diff/index.js
generated
vendored
Normal file
47
node_modules/arr-diff/index.js
generated
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
/*!
|
||||
* arr-diff <https://github.com/jonschlinkert/arr-diff>
|
||||
*
|
||||
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
module.exports = function diff(arr/*, arrays*/) {
|
||||
var len = arguments.length;
|
||||
var idx = 0;
|
||||
while (++idx < len) {
|
||||
arr = diffArray(arr, arguments[idx]);
|
||||
}
|
||||
return arr;
|
||||
};
|
||||
|
||||
function diffArray(one, two) {
|
||||
if (!Array.isArray(two)) {
|
||||
return one.slice();
|
||||
}
|
||||
|
||||
var tlen = two.length
|
||||
var olen = one.length;
|
||||
var idx = -1;
|
||||
var arr = [];
|
||||
|
||||
while (++idx < olen) {
|
||||
var ele = one[idx];
|
||||
|
||||
var hasEle = false;
|
||||
for (var i = 0; i < tlen; i++) {
|
||||
var val = two[i];
|
||||
|
||||
if (ele === val) {
|
||||
hasEle = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if (hasEle === false) {
|
||||
arr.push(ele);
|
||||
}
|
||||
}
|
||||
return arr;
|
||||
}
|
69
node_modules/arr-diff/package.json
generated
vendored
Normal file
69
node_modules/arr-diff/package.json
generated
vendored
Normal file
@ -0,0 +1,69 @@
|
||||
{
|
||||
"name": "arr-diff",
|
||||
"description": "Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons.",
|
||||
"version": "4.0.0",
|
||||
"homepage": "https://github.com/jonschlinkert/arr-diff",
|
||||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
||||
"contributors": [
|
||||
"Jon Schlinkert <jon.schlinkert@sellside.com> (http://twitter.com/jonschlinkert)",
|
||||
"Paul Miller <paul+gh@paulmillr.com> (paulmillr.com)"
|
||||
],
|
||||
"repository": "jonschlinkert/arr-diff",
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/arr-diff/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"ansi-bold": "^0.1.1",
|
||||
"arr-flatten": "^1.0.1",
|
||||
"array-differ": "^1.0.0",
|
||||
"benchmarked": "^0.2.4",
|
||||
"gulp-format-md": "^0.1.9",
|
||||
"minimist": "^1.2.0",
|
||||
"mocha": "^2.4.5"
|
||||
},
|
||||
"keywords": [
|
||||
"arr",
|
||||
"array",
|
||||
"array differ",
|
||||
"array-differ",
|
||||
"diff",
|
||||
"differ",
|
||||
"difference"
|
||||
],
|
||||
"verb": {
|
||||
"toc": false,
|
||||
"layout": "default",
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"related": {
|
||||
"list": [
|
||||
"arr-flatten",
|
||||
"array-filter",
|
||||
"array-intersection"
|
||||
]
|
||||
},
|
||||
"reflinks": [
|
||||
"array-differ",
|
||||
"verb"
|
||||
],
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
}
|
||||
}
|
||||
}
|
21
node_modules/arr-flatten/LICENSE
generated
vendored
Executable file
21
node_modules/arr-flatten/LICENSE
generated
vendored
Executable file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-2017, Jon Schlinkert.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
86
node_modules/arr-flatten/README.md
generated
vendored
Executable file
86
node_modules/arr-flatten/README.md
generated
vendored
Executable file
@ -0,0 +1,86 @@
|
||||
# arr-flatten [![NPM version](https://img.shields.io/npm/v/arr-flatten.svg?style=flat)](https://www.npmjs.com/package/arr-flatten) [![NPM monthly downloads](https://img.shields.io/npm/dm/arr-flatten.svg?style=flat)](https://npmjs.org/package/arr-flatten) [![NPM total downloads](https://img.shields.io/npm/dt/arr-flatten.svg?style=flat)](https://npmjs.org/package/arr-flatten) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/arr-flatten.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/arr-flatten) [![Windows Build Status](https://img.shields.io/appveyor/ci/jonschlinkert/arr-flatten.svg?style=flat&label=AppVeyor)](https://ci.appveyor.com/project/jonschlinkert/arr-flatten)
|
||||
|
||||
> Recursively flatten an array or arrays.
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://www.npmjs.com/):
|
||||
|
||||
```sh
|
||||
$ npm install --save arr-flatten
|
||||
```
|
||||
|
||||
## Install
|
||||
|
||||
Install with [bower](https://bower.io/)
|
||||
|
||||
```sh
|
||||
$ bower install arr-flatten --save
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var flatten = require('arr-flatten');
|
||||
|
||||
flatten(['a', ['b', ['c']], 'd', ['e']]);
|
||||
//=> ['a', 'b', 'c', 'd', 'e']
|
||||
```
|
||||
|
||||
## Why another flatten utility?
|
||||
|
||||
I wanted the fastest implementation I could find, with implementation choices that should work for 95% of use cases, but no cruft to cover the other 5%.
|
||||
|
||||
## About
|
||||
|
||||
### Related projects
|
||||
|
||||
* [arr-filter](https://www.npmjs.com/package/arr-filter): Faster alternative to javascript's native filter method. | [homepage](https://github.com/jonschlinkert/arr-filter "Faster alternative to javascript's native filter method.")
|
||||
* [arr-union](https://www.npmjs.com/package/arr-union): Combines a list of arrays, returning a single array with unique values, using strict equality… [more](https://github.com/jonschlinkert/arr-union) | [homepage](https://github.com/jonschlinkert/arr-union "Combines a list of arrays, returning a single array with unique values, using strict equality for comparisons.")
|
||||
* [array-each](https://www.npmjs.com/package/array-each): Loop over each item in an array and call the given function on every element. | [homepage](https://github.com/jonschlinkert/array-each "Loop over each item in an array and call the given function on every element.")
|
||||
* [array-unique](https://www.npmjs.com/package/array-unique): Remove duplicate values from an array. Fastest ES5 implementation. | [homepage](https://github.com/jonschlinkert/array-unique "Remove duplicate values from an array. Fastest ES5 implementation.")
|
||||
|
||||
### Contributing
|
||||
|
||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
|
||||
|
||||
### Contributors
|
||||
|
||||
| **Commits** | **Contributor** |
|
||||
| --- | --- |
|
||||
| 20 | [jonschlinkert](https://github.com/jonschlinkert) |
|
||||
| 1 | [lukeed](https://github.com/lukeed) |
|
||||
|
||||
### Building docs
|
||||
|
||||
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
|
||||
|
||||
To generate the readme, run the following command:
|
||||
|
||||
```sh
|
||||
$ npm install -g verbose/verb#dev verb-generate-readme && verb
|
||||
```
|
||||
|
||||
### Running tests
|
||||
|
||||
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
|
||||
|
||||
```sh
|
||||
$ npm install && npm test
|
||||
```
|
||||
|
||||
### Author
|
||||
|
||||
**Jon Schlinkert**
|
||||
|
||||
* [github/jonschlinkert](https://github.com/jonschlinkert)
|
||||
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
|
||||
|
||||
### License
|
||||
|
||||
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
|
||||
Released under the [MIT License](LICENSE).
|
||||
|
||||
***
|
||||
|
||||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on July 05, 2017._
|
22
node_modules/arr-flatten/index.js
generated
vendored
Normal file
22
node_modules/arr-flatten/index.js
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
/*!
|
||||
* arr-flatten <https://github.com/jonschlinkert/arr-flatten>
|
||||
*
|
||||
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
module.exports = function (arr) {
|
||||
return flat(arr, []);
|
||||
};
|
||||
|
||||
function flat(arr, res) {
|
||||
var i = 0, cur;
|
||||
var len = arr.length;
|
||||
for (; i < len; i++) {
|
||||
cur = arr[i];
|
||||
Array.isArray(cur) ? flat(cur, res) : res.push(cur);
|
||||
}
|
||||
return res;
|
||||
}
|
76
node_modules/arr-flatten/package.json
generated
vendored
Normal file
76
node_modules/arr-flatten/package.json
generated
vendored
Normal file
@ -0,0 +1,76 @@
|
||||
{
|
||||
"name": "arr-flatten",
|
||||
"description": "Recursively flatten an array or arrays.",
|
||||
"version": "1.1.0",
|
||||
"homepage": "https://github.com/jonschlinkert/arr-flatten",
|
||||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
||||
"contributors": [
|
||||
"Jon Schlinkert (http://twitter.com/jonschlinkert)",
|
||||
"Luke Edwards (https://lukeed.com)"
|
||||
],
|
||||
"repository": "jonschlinkert/arr-flatten",
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/arr-flatten/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ansi-bold": "^0.1.1",
|
||||
"array-flatten": "^2.1.1",
|
||||
"array-slice": "^1.0.0",
|
||||
"benchmarked": "^1.0.0",
|
||||
"compute-flatten": "^1.0.0",
|
||||
"flatit": "^1.1.1",
|
||||
"flatten": "^1.0.2",
|
||||
"flatten-array": "^1.0.0",
|
||||
"glob": "^7.1.1",
|
||||
"gulp-format-md": "^0.1.12",
|
||||
"just-flatten-it": "^1.1.23",
|
||||
"lodash.flattendeep": "^4.4.0",
|
||||
"m_flattened": "^1.0.1",
|
||||
"mocha": "^3.2.0",
|
||||
"utils-flatten": "^1.0.0",
|
||||
"write": "^0.3.3"
|
||||
},
|
||||
"keywords": [
|
||||
"arr",
|
||||
"array",
|
||||
"elements",
|
||||
"flat",
|
||||
"flatten",
|
||||
"nested",
|
||||
"recurse",
|
||||
"recursive",
|
||||
"recursively"
|
||||
],
|
||||
"verb": {
|
||||
"toc": false,
|
||||
"layout": "default",
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"related": {
|
||||
"list": [
|
||||
"arr-filter",
|
||||
"arr-union",
|
||||
"array-each",
|
||||
"array-unique"
|
||||
]
|
||||
},
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
}
|
||||
}
|
||||
}
|
21
node_modules/arr-union/LICENSE
generated
vendored
Normal file
21
node_modules/arr-union/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-2016, Jon Schlinkert.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
99
node_modules/arr-union/README.md
generated
vendored
Normal file
99
node_modules/arr-union/README.md
generated
vendored
Normal file
@ -0,0 +1,99 @@
|
||||
# arr-union [![NPM version](https://img.shields.io/npm/v/arr-union.svg)](https://www.npmjs.com/package/arr-union) [![Build Status](https://img.shields.io/travis/jonschlinkert/arr-union.svg)](https://travis-ci.org/jonschlinkert/arr-union)
|
||||
|
||||
> Combines a list of arrays, returning a single array with unique values, using strict equality for comparisons.
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://www.npmjs.com/):
|
||||
|
||||
```sh
|
||||
$ npm i arr-union --save
|
||||
```
|
||||
|
||||
## Benchmarks
|
||||
|
||||
This library is **10-20 times faster** and more performant than [array-union](https://github.com/sindresorhus/array-union).
|
||||
|
||||
See the [benchmarks](./benchmark).
|
||||
|
||||
```sh
|
||||
#1: five-arrays
|
||||
array-union x 511,121 ops/sec ±0.80% (96 runs sampled)
|
||||
arr-union x 5,716,039 ops/sec ±0.86% (93 runs sampled)
|
||||
|
||||
#2: ten-arrays
|
||||
array-union x 245,196 ops/sec ±0.69% (94 runs sampled)
|
||||
arr-union x 1,850,786 ops/sec ±0.84% (97 runs sampled)
|
||||
|
||||
#3: two-arrays
|
||||
array-union x 563,869 ops/sec ±0.97% (94 runs sampled)
|
||||
arr-union x 9,602,852 ops/sec ±0.87% (92 runs sampled)
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var union = require('arr-union');
|
||||
|
||||
union(['a'], ['b', 'c'], ['d', 'e', 'f']);
|
||||
//=> ['a', 'b', 'c', 'd', 'e', 'f']
|
||||
```
|
||||
|
||||
Returns only unique elements:
|
||||
|
||||
```js
|
||||
union(['a', 'a'], ['b', 'c']);
|
||||
//=> ['a', 'b', 'c']
|
||||
```
|
||||
|
||||
## Related projects
|
||||
|
||||
* [arr-diff](https://www.npmjs.com/package/arr-diff): Returns an array with only the unique values from the first array, by excluding all… [more](https://www.npmjs.com/package/arr-diff) | [homepage](https://github.com/jonschlinkert/arr-diff)
|
||||
* [arr-filter](https://www.npmjs.com/package/arr-filter): Faster alternative to javascript's native filter method. | [homepage](https://github.com/jonschlinkert/arr-filter)
|
||||
* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | [homepage](https://github.com/jonschlinkert/arr-flatten)
|
||||
* [arr-map](https://www.npmjs.com/package/arr-map): Faster, node.js focused alternative to JavaScript's native array map. | [homepage](https://github.com/jonschlinkert/arr-map)
|
||||
* [arr-pluck](https://www.npmjs.com/package/arr-pluck): Retrieves the value of a specified property from all elements in the collection. | [homepage](https://github.com/jonschlinkert/arr-pluck)
|
||||
* [arr-reduce](https://www.npmjs.com/package/arr-reduce): Fast array reduce that also loops over sparse elements. | [homepage](https://github.com/jonschlinkert/arr-reduce)
|
||||
* [array-unique](https://www.npmjs.com/package/array-unique): Return an array free of duplicate values. Fastest ES5 implementation. | [homepage](https://github.com/jonschlinkert/array-unique)
|
||||
|
||||
## Contributing
|
||||
|
||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/arr-union/issues/new).
|
||||
|
||||
## Building docs
|
||||
|
||||
Generate readme and API documentation with [verb](https://github.com/verbose/verb):
|
||||
|
||||
```sh
|
||||
$ npm i verb && npm run docs
|
||||
```
|
||||
|
||||
Or, if [verb](https://github.com/verbose/verb) is installed globally:
|
||||
|
||||
```sh
|
||||
$ verb
|
||||
```
|
||||
|
||||
## Running tests
|
||||
|
||||
Install dev dependencies:
|
||||
|
||||
```sh
|
||||
$ npm i -d && npm test
|
||||
```
|
||||
|
||||
## Author
|
||||
|
||||
**Jon Schlinkert**
|
||||
|
||||
* [github/jonschlinkert](https://github.com/jonschlinkert)
|
||||
* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
|
||||
|
||||
## License
|
||||
|
||||
Copyright © 2016 [Jon Schlinkert](https://github.com/jonschlinkert)
|
||||
Released under the [MIT license](https://github.com/jonschlinkert/arr-union/blob/master/LICENSE).
|
||||
|
||||
***
|
||||
|
||||
_This file was generated by [verb](https://github.com/verbose/verb), v0.9.0, on February 23, 2016._
|
29
node_modules/arr-union/index.js
generated
vendored
Normal file
29
node_modules/arr-union/index.js
generated
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = function union(init) {
|
||||
if (!Array.isArray(init)) {
|
||||
throw new TypeError('arr-union expects the first argument to be an array.');
|
||||
}
|
||||
|
||||
var len = arguments.length;
|
||||
var i = 0;
|
||||
|
||||
while (++i < len) {
|
||||
var arg = arguments[i];
|
||||
if (!arg) continue;
|
||||
|
||||
if (!Array.isArray(arg)) {
|
||||
arg = [arg];
|
||||
}
|
||||
|
||||
for (var j = 0; j < arg.length; j++) {
|
||||
var ele = arg[j];
|
||||
|
||||
if (init.indexOf(ele) >= 0) {
|
||||
continue;
|
||||
}
|
||||
init.push(ele);
|
||||
}
|
||||
}
|
||||
return init;
|
||||
};
|
76
node_modules/arr-union/package.json
generated
vendored
Normal file
76
node_modules/arr-union/package.json
generated
vendored
Normal file
@ -0,0 +1,76 @@
|
||||
{
|
||||
"name": "arr-union",
|
||||
"description": "Combines a list of arrays, returning a single array with unique values, using strict equality for comparisons.",
|
||||
"version": "3.1.0",
|
||||
"homepage": "https://github.com/jonschlinkert/arr-union",
|
||||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
||||
"repository": "jonschlinkert/arr-union",
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/arr-union/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"devDependencies": {
|
||||
"ansi-bold": "^0.1.1",
|
||||
"array-union": "^1.0.1",
|
||||
"array-unique": "^0.2.1",
|
||||
"benchmarked": "^0.1.4",
|
||||
"gulp-format-md": "^0.1.7",
|
||||
"minimist": "^1.1.1",
|
||||
"mocha": "*",
|
||||
"should": "*"
|
||||
},
|
||||
"keywords": [
|
||||
"add",
|
||||
"append",
|
||||
"array",
|
||||
"arrays",
|
||||
"combine",
|
||||
"concat",
|
||||
"extend",
|
||||
"union",
|
||||
"uniq",
|
||||
"unique",
|
||||
"util",
|
||||
"utility",
|
||||
"utils"
|
||||
],
|
||||
"verb": {
|
||||
"run": true,
|
||||
"toc": false,
|
||||
"layout": "default",
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"related": {
|
||||
"list": [
|
||||
"arr-diff",
|
||||
"arr-flatten",
|
||||
"arr-filter",
|
||||
"arr-map",
|
||||
"arr-pluck",
|
||||
"arr-reduce",
|
||||
"array-unique"
|
||||
]
|
||||
},
|
||||
"reflinks": [
|
||||
"verb",
|
||||
"array-union"
|
||||
],
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
}
|
||||
}
|
||||
}
|
21
node_modules/array-unique/LICENSE
generated
vendored
Executable file
21
node_modules/array-unique/LICENSE
generated
vendored
Executable file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014-2016, Jon Schlinkert
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
77
node_modules/array-unique/README.md
generated
vendored
Executable file
77
node_modules/array-unique/README.md
generated
vendored
Executable file
@ -0,0 +1,77 @@
|
||||
# array-unique [![NPM version](https://img.shields.io/npm/v/array-unique.svg?style=flat)](https://www.npmjs.com/package/array-unique) [![NPM downloads](https://img.shields.io/npm/dm/array-unique.svg?style=flat)](https://npmjs.org/package/array-unique) [![Build Status](https://img.shields.io/travis/jonschlinkert/array-unique.svg?style=flat)](https://travis-ci.org/jonschlinkert/array-unique)
|
||||
|
||||
Remove duplicate values from an array. Fastest ES5 implementation.
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://www.npmjs.com/):
|
||||
|
||||
```sh
|
||||
$ npm install --save array-unique
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var unique = require('array-unique');
|
||||
|
||||
var arr = ['a', 'b', 'c', 'c'];
|
||||
console.log(unique(arr)) //=> ['a', 'b', 'c']
|
||||
console.log(arr) //=> ['a', 'b', 'c']
|
||||
|
||||
/* The above modifies the input array. To prevent that at a slight performance cost: */
|
||||
var unique = require("array-unique").immutable;
|
||||
|
||||
var arr = ['a', 'b', 'c', 'c'];
|
||||
console.log(unique(arr)) //=> ['a', 'b', 'c']
|
||||
console.log(arr) //=> ['a', 'b', 'c', 'c']
|
||||
```
|
||||
|
||||
## About
|
||||
|
||||
### Related projects
|
||||
|
||||
* [arr-diff](https://www.npmjs.com/package/arr-diff): Returns an array with only the unique values from the first array, by excluding all… [more](https://github.com/jonschlinkert/arr-diff) | [homepage](https://github.com/jonschlinkert/arr-diff "Returns an array with only the unique values from the first array, by excluding all values from additional arrays using strict equality for comparisons.")
|
||||
* [arr-flatten](https://www.npmjs.com/package/arr-flatten): Recursively flatten an array or arrays. This is the fastest implementation of array flatten. | [homepage](https://github.com/jonschlinkert/arr-flatten "Recursively flatten an array or arrays. This is the fastest implementation of array flatten.")
|
||||
* [arr-map](https://www.npmjs.com/package/arr-map): Faster, node.js focused alternative to JavaScript's native array map. | [homepage](https://github.com/jonschlinkert/arr-map "Faster, node.js focused alternative to JavaScript's native array map.")
|
||||
* [arr-pluck](https://www.npmjs.com/package/arr-pluck): Retrieves the value of a specified property from all elements in the collection. | [homepage](https://github.com/jonschlinkert/arr-pluck "Retrieves the value of a specified property from all elements in the collection.")
|
||||
* [arr-reduce](https://www.npmjs.com/package/arr-reduce): Fast array reduce that also loops over sparse elements. | [homepage](https://github.com/jonschlinkert/arr-reduce "Fast array reduce that also loops over sparse elements.")
|
||||
* [arr-union](https://www.npmjs.com/package/arr-union): Combines a list of arrays, returning a single array with unique values, using strict equality… [more](https://github.com/jonschlinkert/arr-union) | [homepage](https://github.com/jonschlinkert/arr-union "Combines a list of arrays, returning a single array with unique values, using strict equality for comparisons.")
|
||||
|
||||
### Contributing
|
||||
|
||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
|
||||
|
||||
### Building docs
|
||||
|
||||
_(This document was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme) (a [verb](https://github.com/verbose/verb) generator), please don't edit the readme directly. Any changes to the readme must be made in [.verb.md](.verb.md).)_
|
||||
|
||||
To generate the readme and API documentation with [verb](https://github.com/verbose/verb):
|
||||
|
||||
```sh
|
||||
$ npm install -g verb verb-generate-readme && verb
|
||||
```
|
||||
|
||||
### Running tests
|
||||
|
||||
Install dev dependencies:
|
||||
|
||||
```sh
|
||||
$ npm install -d && npm test
|
||||
```
|
||||
|
||||
### Author
|
||||
|
||||
**Jon Schlinkert**
|
||||
|
||||
* [github/jonschlinkert](https://github.com/jonschlinkert)
|
||||
* [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
|
||||
|
||||
### License
|
||||
|
||||
Copyright © 2016, [Jon Schlinkert](https://github.com/jonschlinkert).
|
||||
Released under the [MIT license](https://github.com/jonschlinkert/array-unique/blob/master/LICENSE).
|
||||
|
||||
***
|
||||
|
||||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.1.28, on July 31, 2016._
|
43
node_modules/array-unique/index.js
generated
vendored
Normal file
43
node_modules/array-unique/index.js
generated
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
/*!
|
||||
* array-unique <https://github.com/jonschlinkert/array-unique>
|
||||
*
|
||||
* Copyright (c) 2014-2015, Jon Schlinkert.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
module.exports = function unique(arr) {
|
||||
if (!Array.isArray(arr)) {
|
||||
throw new TypeError('array-unique expects an array.');
|
||||
}
|
||||
|
||||
var len = arr.length;
|
||||
var i = -1;
|
||||
|
||||
while (i++ < len) {
|
||||
var j = i + 1;
|
||||
|
||||
for (; j < arr.length; ++j) {
|
||||
if (arr[i] === arr[j]) {
|
||||
arr.splice(j--, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
return arr;
|
||||
};
|
||||
|
||||
module.exports.immutable = function uniqueImmutable(arr) {
|
||||
if (!Array.isArray(arr)) {
|
||||
throw new TypeError('array-unique expects an array.');
|
||||
}
|
||||
|
||||
var arrLen = arr.length;
|
||||
var newArr = new Array(arrLen);
|
||||
|
||||
for (var i = 0; i < arrLen; i++) {
|
||||
newArr[i] = arr[i];
|
||||
}
|
||||
|
||||
return module.exports(newArr);
|
||||
};
|
62
node_modules/array-unique/package.json
generated
vendored
Normal file
62
node_modules/array-unique/package.json
generated
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
{
|
||||
"name": "array-unique",
|
||||
"description": "Remove duplicate values from an array. Fastest ES5 implementation.",
|
||||
"version": "0.3.2",
|
||||
"homepage": "https://github.com/jonschlinkert/array-unique",
|
||||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
||||
"repository": "jonschlinkert/array-unique",
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/array-unique/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js",
|
||||
"LICENSE",
|
||||
"README.md"
|
||||
],
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"devDependencies": {
|
||||
"array-uniq": "^1.0.2",
|
||||
"benchmarked": "^0.1.3",
|
||||
"gulp-format-md": "^0.1.9",
|
||||
"mocha": "^2.5.3",
|
||||
"should": "^10.0.0"
|
||||
},
|
||||
"keywords": [
|
||||
"array",
|
||||
"unique"
|
||||
],
|
||||
"verb": {
|
||||
"toc": false,
|
||||
"layout": "default",
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"related": {
|
||||
"list": [
|
||||
"arr-diff",
|
||||
"arr-union",
|
||||
"arr-flatten",
|
||||
"arr-reduce",
|
||||
"arr-map",
|
||||
"arr-pluck"
|
||||
]
|
||||
},
|
||||
"reflinks": [
|
||||
"verb",
|
||||
"verb-generate-readme"
|
||||
],
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
}
|
||||
}
|
||||
}
|
21
node_modules/assign-symbols/LICENSE
generated
vendored
Normal file
21
node_modules/assign-symbols/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015, Jon Schlinkert.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
73
node_modules/assign-symbols/README.md
generated
vendored
Normal file
73
node_modules/assign-symbols/README.md
generated
vendored
Normal file
@ -0,0 +1,73 @@
|
||||
# assign-symbols [![NPM version](https://badge.fury.io/js/assign-symbols.svg)](http://badge.fury.io/js/assign-symbols)
|
||||
|
||||
> Assign the enumerable es6 Symbol properties from an object (or objects) to the first object passed on the arguments. Can be used as a supplement to other extend, assign or merge methods as a polyfill for the Symbols part of the es6 Object.assign method.
|
||||
|
||||
From the [Mozilla Developer docs for Symbol](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Symbol):
|
||||
|
||||
> A symbol is a unique and immutable data type and may be used as an identifier for object properties. The symbol object is an implicit object wrapper for the symbol primitive data type.
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://www.npmjs.com/)
|
||||
|
||||
```sh
|
||||
$ npm i assign-symbols --save
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
```js
|
||||
var assignSymbols = require('assign-symbols');
|
||||
var obj = {};
|
||||
|
||||
var one = {};
|
||||
var symbolOne = Symbol('aaa');
|
||||
one[symbolOne] = 'bbb';
|
||||
|
||||
var two = {};
|
||||
var symbolTwo = Symbol('ccc');
|
||||
two[symbolTwo] = 'ddd';
|
||||
|
||||
assignSymbols(obj, one, two);
|
||||
|
||||
console.log(obj[symbolOne]);
|
||||
//=> 'bbb'
|
||||
console.log(obj[symbolTwo]);
|
||||
//=> 'ddd'
|
||||
```
|
||||
|
||||
## Similar projects
|
||||
|
||||
* [assign-deep](https://www.npmjs.com/package/assign-deep): Deeply assign the enumerable properties of source objects to a destination object. | [homepage](https://github.com/jonschlinkert/assign-deep)
|
||||
* [clone-deep](https://www.npmjs.com/package/clone-deep): Recursively (deep) clone JavaScript native types, like Object, Array, RegExp, Date as well as primitives. | [homepage](https://github.com/jonschlinkert/clone-deep)
|
||||
* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow)
|
||||
* [merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-deep)
|
||||
* [mixin-deep](https://www.npmjs.com/package/mixin-deep): Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone. | [homepage](https://github.com/jonschlinkert/mixin-deep)
|
||||
|
||||
## Running tests
|
||||
|
||||
Install dev dependencies:
|
||||
|
||||
```sh
|
||||
$ npm i -d && npm test
|
||||
```
|
||||
|
||||
## Contributing
|
||||
|
||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/jonschlinkert/assign-symbols/issues/new).
|
||||
|
||||
## Author
|
||||
|
||||
**Jon Schlinkert**
|
||||
|
||||
+ [github/jonschlinkert](https://github.com/jonschlinkert)
|
||||
+ [twitter/jonschlinkert](http://twitter.com/jonschlinkert)
|
||||
|
||||
## License
|
||||
|
||||
Copyright © 2015 Jon Schlinkert
|
||||
Released under the MIT license.
|
||||
|
||||
***
|
||||
|
||||
_This file was generated by [verb-cli](https://github.com/assemble/verb-cli) on November 06, 2015._
|
40
node_modules/assign-symbols/index.js
generated
vendored
Normal file
40
node_modules/assign-symbols/index.js
generated
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
/*!
|
||||
* assign-symbols <https://github.com/jonschlinkert/assign-symbols>
|
||||
*
|
||||
* Copyright (c) 2015, Jon Schlinkert.
|
||||
* Licensed under the MIT License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
module.exports = function(receiver, objects) {
|
||||
if (receiver === null || typeof receiver === 'undefined') {
|
||||
throw new TypeError('expected first argument to be an object.');
|
||||
}
|
||||
|
||||
if (typeof objects === 'undefined' || typeof Symbol === 'undefined') {
|
||||
return receiver;
|
||||
}
|
||||
|
||||
if (typeof Object.getOwnPropertySymbols !== 'function') {
|
||||
return receiver;
|
||||
}
|
||||
|
||||
var isEnumerable = Object.prototype.propertyIsEnumerable;
|
||||
var target = Object(receiver);
|
||||
var len = arguments.length, i = 0;
|
||||
|
||||
while (++i < len) {
|
||||
var provider = Object(arguments[i]);
|
||||
var names = Object.getOwnPropertySymbols(provider);
|
||||
|
||||
for (var j = 0; j < names.length; j++) {
|
||||
var key = names[j];
|
||||
|
||||
if (isEnumerable.call(provider, key)) {
|
||||
target[key] = provider[key];
|
||||
}
|
||||
}
|
||||
}
|
||||
return target;
|
||||
};
|
40
node_modules/assign-symbols/package.json
generated
vendored
Normal file
40
node_modules/assign-symbols/package.json
generated
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
{
|
||||
"name": "assign-symbols",
|
||||
"description": "Assign the enumerable es6 Symbol properties from an object (or objects) to the first object passed on the arguments. Can be used as a supplement to other extend, assign or merge methods as a polyfill for the Symbols part of the es6 Object.assign method.",
|
||||
"version": "1.0.0",
|
||||
"homepage": "https://github.com/jonschlinkert/assign-symbols",
|
||||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
||||
"repository": "jonschlinkert/assign-symbols",
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/assign-symbols/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"devDependencies": {
|
||||
"mocha": "^3.0.0"
|
||||
},
|
||||
"keywords": [
|
||||
"assign",
|
||||
"symbols"
|
||||
],
|
||||
"verb": {
|
||||
"related": {
|
||||
"list": [
|
||||
"assign-deep",
|
||||
"mixin-deep",
|
||||
"merge-deep",
|
||||
"extend-shallow",
|
||||
"clone-deep"
|
||||
]
|
||||
}
|
||||
}
|
||||
}
|
21
node_modules/async-each/LICENSE
generated
vendored
Normal file
21
node_modules/async-each/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2016 Paul Miller (https://paulmillr.com)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
35
node_modules/async-each/README.md
generated
vendored
Normal file
35
node_modules/async-each/README.md
generated
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
# async-each
|
||||
|
||||
No-bullshit, ultra-simple, 40-lines-of-code async parallel forEach function for JavaScript.
|
||||
|
||||
We don't need junky 30K async libs. Really.
|
||||
|
||||
For browsers and node.js.
|
||||
|
||||
## Usage
|
||||
|
||||
`npm install async-each` if you're using NPM.
|
||||
|
||||
For browsers, just include async-each before your scripts and use global variable `asyncEach`
|
||||
|
||||
* `each(array, iterator, callback)` — `Array`, `Function`, `(optional) Function`
|
||||
* `iterator(item, next)` receives current item and a callback that will mark the item as done. `next` callback receives optional `error, transformedItem` arguments.
|
||||
* `callback(error, transformedArray)` optionally receives first error and transformed result `Array`.
|
||||
|
||||
```javascript
|
||||
var each = require('async-each');
|
||||
each(['a.js', 'b.js', 'c.js'], fs.readFile, function(error, contents) {
|
||||
if (error) console.error(error);
|
||||
console.log('Contents for a, b and c:', contents);
|
||||
});
|
||||
|
||||
asyncEach(list, fn, callback); // use global var in browser
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016 Paul Miller [(paulmillr.com)](https://paulmillr.com)
|
||||
|
||||
See [LICENSE](https://github.com/paulmillr/async-each/blob/master/LICENSE) file.
|
39
node_modules/async-each/index.js
generated
vendored
Normal file
39
node_modules/async-each/index.js
generated
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
/*! async-each - MIT License (c) 2016 Paul Miller (paulmillr.com) */
|
||||
(function (globals) {
|
||||
'use strict';
|
||||
var each = function (items, next, callback) {
|
||||
if (!Array.isArray(items)) throw new TypeError('each() expects array as first argument');
|
||||
if (typeof next !== 'function')
|
||||
throw new TypeError('each() expects function as second argument');
|
||||
if (typeof callback !== 'function') callback = Function.prototype; // no-op
|
||||
|
||||
var total = items.length;
|
||||
if (total === 0) return callback(undefined, items);
|
||||
var transformed = new Array(total);
|
||||
var transformedCount = 0;
|
||||
var returned = false;
|
||||
|
||||
items.forEach(function (item, index) {
|
||||
next(item, function (error, transformedItem) {
|
||||
if (returned) return;
|
||||
if (error) {
|
||||
returned = true;
|
||||
return callback(error);
|
||||
}
|
||||
transformed[index] = transformedItem;
|
||||
transformedCount += 1; // can't use index: last item could take more time
|
||||
if (transformedCount === total) return callback(undefined, transformed);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
if (typeof define !== 'undefined' && define.amd) {
|
||||
define([], function () {
|
||||
return each;
|
||||
}); // RequireJS
|
||||
} else if (typeof module !== 'undefined' && module.exports) {
|
||||
module.exports = each; // CommonJS
|
||||
} else {
|
||||
globals.asyncEach = each; // <script>
|
||||
}
|
||||
})(this);
|
38
node_modules/async-each/package.json
generated
vendored
Normal file
38
node_modules/async-each/package.json
generated
vendored
Normal file
@ -0,0 +1,38 @@
|
||||
{
|
||||
"name": "async-each",
|
||||
"description": "No-bullshit, ultra-simple, 35-lines-of-code async parallel forEach / map function for JavaScript.",
|
||||
"version": "1.0.6",
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"homepage": "https://github.com/paulmillr/async-each/",
|
||||
"author": "Paul Miller (https://paulmillr.com/)",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/paulmillr/async-each.git"
|
||||
},
|
||||
"main": "index.js",
|
||||
"dependencies": {},
|
||||
"keywords": [
|
||||
"async",
|
||||
"forEach",
|
||||
"each",
|
||||
"map",
|
||||
"asynchronous",
|
||||
"iteration",
|
||||
"iterate",
|
||||
"loop",
|
||||
"parallel",
|
||||
"concurrent",
|
||||
"array",
|
||||
"flow",
|
||||
"control flow"
|
||||
],
|
||||
"funding": [
|
||||
{
|
||||
"type": "individual",
|
||||
"url": "https://paulmillr.com/funding/"
|
||||
}
|
||||
]
|
||||
}
|
230
node_modules/atob/LICENSE
generated
vendored
Normal file
230
node_modules/atob/LICENSE
generated
vendored
Normal file
@ -0,0 +1,230 @@
|
||||
At your option you may choose either of the following licenses:
|
||||
|
||||
* The MIT License (MIT)
|
||||
* The Apache License 2.0 (Apache-2.0)
|
||||
|
||||
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 AJ ONeal
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "{}"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright 2015 AJ ONeal
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
319
node_modules/atob/LICENSE.DOCS
generated
vendored
Normal file
319
node_modules/atob/LICENSE.DOCS
generated
vendored
Normal file
@ -0,0 +1,319 @@
|
||||
Creative Commons Legal Code
|
||||
|
||||
Attribution 3.0 Unported
|
||||
|
||||
CREATIVE COMMONS CORPORATION IS NOT A LAW FIRM AND DOES NOT PROVIDE
|
||||
LEGAL SERVICES. DISTRIBUTION OF THIS LICENSE DOES NOT CREATE AN
|
||||
ATTORNEY-CLIENT RELATIONSHIP. CREATIVE COMMONS PROVIDES THIS
|
||||
INFORMATION ON AN "AS-IS" BASIS. CREATIVE COMMONS MAKES NO WARRANTIES
|
||||
REGARDING THE INFORMATION PROVIDED, AND DISCLAIMS LIABILITY FOR
|
||||
DAMAGES RESULTING FROM ITS USE.
|
||||
|
||||
License
|
||||
|
||||
THE WORK (AS DEFINED BELOW) IS PROVIDED UNDER THE TERMS OF THIS CREATIVE
|
||||
COMMONS PUBLIC LICENSE ("CCPL" OR "LICENSE"). THE WORK IS PROTECTED BY
|
||||
COPYRIGHT AND/OR OTHER APPLICABLE LAW. ANY USE OF THE WORK OTHER THAN AS
|
||||
AUTHORIZED UNDER THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED.
|
||||
|
||||
BY EXERCISING ANY RIGHTS TO THE WORK PROVIDED HERE, YOU ACCEPT AND AGREE
|
||||
TO BE BOUND BY THE TERMS OF THIS LICENSE. TO THE EXTENT THIS LICENSE MAY
|
||||
BE CONSIDERED TO BE A CONTRACT, THE LICENSOR GRANTS YOU THE RIGHTS
|
||||
CONTAINED HERE IN CONSIDERATION OF YOUR ACCEPTANCE OF SUCH TERMS AND
|
||||
CONDITIONS.
|
||||
|
||||
1. Definitions
|
||||
|
||||
a. "Adaptation" means a work based upon the Work, or upon the Work and
|
||||
other pre-existing works, such as a translation, adaptation,
|
||||
derivative work, arrangement of music or other alterations of a
|
||||
literary or artistic work, or phonogram or performance and includes
|
||||
cinematographic adaptations or any other form in which the Work may be
|
||||
recast, transformed, or adapted including in any form recognizably
|
||||
derived from the original, except that a work that constitutes a
|
||||
Collection will not be considered an Adaptation for the purpose of
|
||||
this License. For the avoidance of doubt, where the Work is a musical
|
||||
work, performance or phonogram, the synchronization of the Work in
|
||||
timed-relation with a moving image ("synching") will be considered an
|
||||
Adaptation for the purpose of this License.
|
||||
b. "Collection" means a collection of literary or artistic works, such as
|
||||
encyclopedias and anthologies, or performances, phonograms or
|
||||
broadcasts, or other works or subject matter other than works listed
|
||||
in Section 1(f) below, which, by reason of the selection and
|
||||
arrangement of their contents, constitute intellectual creations, in
|
||||
which the Work is included in its entirety in unmodified form along
|
||||
with one or more other contributions, each constituting separate and
|
||||
independent works in themselves, which together are assembled into a
|
||||
collective whole. A work that constitutes a Collection will not be
|
||||
considered an Adaptation (as defined above) for the purposes of this
|
||||
License.
|
||||
c. "Distribute" means to make available to the public the original and
|
||||
copies of the Work or Adaptation, as appropriate, through sale or
|
||||
other transfer of ownership.
|
||||
d. "Licensor" means the individual, individuals, entity or entities that
|
||||
offer(s) the Work under the terms of this License.
|
||||
e. "Original Author" means, in the case of a literary or artistic work,
|
||||
the individual, individuals, entity or entities who created the Work
|
||||
or if no individual or entity can be identified, the publisher; and in
|
||||
addition (i) in the case of a performance the actors, singers,
|
||||
musicians, dancers, and other persons who act, sing, deliver, declaim,
|
||||
play in, interpret or otherwise perform literary or artistic works or
|
||||
expressions of folklore; (ii) in the case of a phonogram the producer
|
||||
being the person or legal entity who first fixes the sounds of a
|
||||
performance or other sounds; and, (iii) in the case of broadcasts, the
|
||||
organization that transmits the broadcast.
|
||||
f. "Work" means the literary and/or artistic work offered under the terms
|
||||
of this License including without limitation any production in the
|
||||
literary, scientific and artistic domain, whatever may be the mode or
|
||||
form of its expression including digital form, such as a book,
|
||||
pamphlet and other writing; a lecture, address, sermon or other work
|
||||
of the same nature; a dramatic or dramatico-musical work; a
|
||||
choreographic work or entertainment in dumb show; a musical
|
||||
composition with or without words; a cinematographic work to which are
|
||||
assimilated works expressed by a process analogous to cinematography;
|
||||
a work of drawing, painting, architecture, sculpture, engraving or
|
||||
lithography; a photographic work to which are assimilated works
|
||||
expressed by a process analogous to photography; a work of applied
|
||||
art; an illustration, map, plan, sketch or three-dimensional work
|
||||
relative to geography, topography, architecture or science; a
|
||||
performance; a broadcast; a phonogram; a compilation of data to the
|
||||
extent it is protected as a copyrightable work; or a work performed by
|
||||
a variety or circus performer to the extent it is not otherwise
|
||||
considered a literary or artistic work.
|
||||
g. "You" means an individual or entity exercising rights under this
|
||||
License who has not previously violated the terms of this License with
|
||||
respect to the Work, or who has received express permission from the
|
||||
Licensor to exercise rights under this License despite a previous
|
||||
violation.
|
||||
h. "Publicly Perform" means to perform public recitations of the Work and
|
||||
to communicate to the public those public recitations, by any means or
|
||||
process, including by wire or wireless means or public digital
|
||||
performances; to make available to the public Works in such a way that
|
||||
members of the public may access these Works from a place and at a
|
||||
place individually chosen by them; to perform the Work to the public
|
||||
by any means or process and the communication to the public of the
|
||||
performances of the Work, including by public digital performance; to
|
||||
broadcast and rebroadcast the Work by any means including signs,
|
||||
sounds or images.
|
||||
i. "Reproduce" means to make copies of the Work by any means including
|
||||
without limitation by sound or visual recordings and the right of
|
||||
fixation and reproducing fixations of the Work, including storage of a
|
||||
protected performance or phonogram in digital form or other electronic
|
||||
medium.
|
||||
|
||||
2. Fair Dealing Rights. Nothing in this License is intended to reduce,
|
||||
limit, or restrict any uses free from copyright or rights arising from
|
||||
limitations or exceptions that are provided for in connection with the
|
||||
copyright protection under copyright law or other applicable laws.
|
||||
|
||||
3. License Grant. Subject to the terms and conditions of this License,
|
||||
Licensor hereby grants You a worldwide, royalty-free, non-exclusive,
|
||||
perpetual (for the duration of the applicable copyright) license to
|
||||
exercise the rights in the Work as stated below:
|
||||
|
||||
a. to Reproduce the Work, to incorporate the Work into one or more
|
||||
Collections, and to Reproduce the Work as incorporated in the
|
||||
Collections;
|
||||
b. to create and Reproduce Adaptations provided that any such Adaptation,
|
||||
including any translation in any medium, takes reasonable steps to
|
||||
clearly label, demarcate or otherwise identify that changes were made
|
||||
to the original Work. For example, a translation could be marked "The
|
||||
original work was translated from English to Spanish," or a
|
||||
modification could indicate "The original work has been modified.";
|
||||
c. to Distribute and Publicly Perform the Work including as incorporated
|
||||
in Collections; and,
|
||||
d. to Distribute and Publicly Perform Adaptations.
|
||||
e. For the avoidance of doubt:
|
||||
|
||||
i. Non-waivable Compulsory License Schemes. In those jurisdictions in
|
||||
which the right to collect royalties through any statutory or
|
||||
compulsory licensing scheme cannot be waived, the Licensor
|
||||
reserves the exclusive right to collect such royalties for any
|
||||
exercise by You of the rights granted under this License;
|
||||
ii. Waivable Compulsory License Schemes. In those jurisdictions in
|
||||
which the right to collect royalties through any statutory or
|
||||
compulsory licensing scheme can be waived, the Licensor waives the
|
||||
exclusive right to collect such royalties for any exercise by You
|
||||
of the rights granted under this License; and,
|
||||
iii. Voluntary License Schemes. The Licensor waives the right to
|
||||
collect royalties, whether individually or, in the event that the
|
||||
Licensor is a member of a collecting society that administers
|
||||
voluntary licensing schemes, via that society, from any exercise
|
||||
by You of the rights granted under this License.
|
||||
|
||||
The above rights may be exercised in all media and formats whether now
|
||||
known or hereafter devised. The above rights include the right to make
|
||||
such modifications as are technically necessary to exercise the rights in
|
||||
other media and formats. Subject to Section 8(f), all rights not expressly
|
||||
granted by Licensor are hereby reserved.
|
||||
|
||||
4. Restrictions. The license granted in Section 3 above is expressly made
|
||||
subject to and limited by the following restrictions:
|
||||
|
||||
a. You may Distribute or Publicly Perform the Work only under the terms
|
||||
of this License. You must include a copy of, or the Uniform Resource
|
||||
Identifier (URI) for, this License with every copy of the Work You
|
||||
Distribute or Publicly Perform. You may not offer or impose any terms
|
||||
on the Work that restrict the terms of this License or the ability of
|
||||
the recipient of the Work to exercise the rights granted to that
|
||||
recipient under the terms of the License. You may not sublicense the
|
||||
Work. You must keep intact all notices that refer to this License and
|
||||
to the disclaimer of warranties with every copy of the Work You
|
||||
Distribute or Publicly Perform. When You Distribute or Publicly
|
||||
Perform the Work, You may not impose any effective technological
|
||||
measures on the Work that restrict the ability of a recipient of the
|
||||
Work from You to exercise the rights granted to that recipient under
|
||||
the terms of the License. This Section 4(a) applies to the Work as
|
||||
incorporated in a Collection, but this does not require the Collection
|
||||
apart from the Work itself to be made subject to the terms of this
|
||||
License. If You create a Collection, upon notice from any Licensor You
|
||||
must, to the extent practicable, remove from the Collection any credit
|
||||
as required by Section 4(b), as requested. If You create an
|
||||
Adaptation, upon notice from any Licensor You must, to the extent
|
||||
practicable, remove from the Adaptation any credit as required by
|
||||
Section 4(b), as requested.
|
||||
b. If You Distribute, or Publicly Perform the Work or any Adaptations or
|
||||
Collections, You must, unless a request has been made pursuant to
|
||||
Section 4(a), keep intact all copyright notices for the Work and
|
||||
provide, reasonable to the medium or means You are utilizing: (i) the
|
||||
name of the Original Author (or pseudonym, if applicable) if supplied,
|
||||
and/or if the Original Author and/or Licensor designate another party
|
||||
or parties (e.g., a sponsor institute, publishing entity, journal) for
|
||||
attribution ("Attribution Parties") in Licensor's copyright notice,
|
||||
terms of service or by other reasonable means, the name of such party
|
||||
or parties; (ii) the title of the Work if supplied; (iii) to the
|
||||
extent reasonably practicable, the URI, if any, that Licensor
|
||||
specifies to be associated with the Work, unless such URI does not
|
||||
refer to the copyright notice or licensing information for the Work;
|
||||
and (iv) , consistent with Section 3(b), in the case of an Adaptation,
|
||||
a credit identifying the use of the Work in the Adaptation (e.g.,
|
||||
"French translation of the Work by Original Author," or "Screenplay
|
||||
based on original Work by Original Author"). The credit required by
|
||||
this Section 4 (b) may be implemented in any reasonable manner;
|
||||
provided, however, that in the case of a Adaptation or Collection, at
|
||||
a minimum such credit will appear, if a credit for all contributing
|
||||
authors of the Adaptation or Collection appears, then as part of these
|
||||
credits and in a manner at least as prominent as the credits for the
|
||||
other contributing authors. For the avoidance of doubt, You may only
|
||||
use the credit required by this Section for the purpose of attribution
|
||||
in the manner set out above and, by exercising Your rights under this
|
||||
License, You may not implicitly or explicitly assert or imply any
|
||||
connection with, sponsorship or endorsement by the Original Author,
|
||||
Licensor and/or Attribution Parties, as appropriate, of You or Your
|
||||
use of the Work, without the separate, express prior written
|
||||
permission of the Original Author, Licensor and/or Attribution
|
||||
Parties.
|
||||
c. Except as otherwise agreed in writing by the Licensor or as may be
|
||||
otherwise permitted by applicable law, if You Reproduce, Distribute or
|
||||
Publicly Perform the Work either by itself or as part of any
|
||||
Adaptations or Collections, You must not distort, mutilate, modify or
|
||||
take other derogatory action in relation to the Work which would be
|
||||
prejudicial to the Original Author's honor or reputation. Licensor
|
||||
agrees that in those jurisdictions (e.g. Japan), in which any exercise
|
||||
of the right granted in Section 3(b) of this License (the right to
|
||||
make Adaptations) would be deemed to be a distortion, mutilation,
|
||||
modification or other derogatory action prejudicial to the Original
|
||||
Author's honor and reputation, the Licensor will waive or not assert,
|
||||
as appropriate, this Section, to the fullest extent permitted by the
|
||||
applicable national law, to enable You to reasonably exercise Your
|
||||
right under Section 3(b) of this License (right to make Adaptations)
|
||||
but not otherwise.
|
||||
|
||||
5. Representations, Warranties and Disclaimer
|
||||
|
||||
UNLESS OTHERWISE MUTUALLY AGREED TO BY THE PARTIES IN WRITING, LICENSOR
|
||||
OFFERS THE WORK AS-IS AND MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY
|
||||
KIND CONCERNING THE WORK, EXPRESS, IMPLIED, STATUTORY OR OTHERWISE,
|
||||
INCLUDING, WITHOUT LIMITATION, WARRANTIES OF TITLE, MERCHANTIBILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE, NONINFRINGEMENT, OR THE ABSENCE OF
|
||||
LATENT OR OTHER DEFECTS, ACCURACY, OR THE PRESENCE OF ABSENCE OF ERRORS,
|
||||
WHETHER OR NOT DISCOVERABLE. SOME JURISDICTIONS DO NOT ALLOW THE EXCLUSION
|
||||
OF IMPLIED WARRANTIES, SO SUCH EXCLUSION MAY NOT APPLY TO YOU.
|
||||
|
||||
6. Limitation on Liability. EXCEPT TO THE EXTENT REQUIRED BY APPLICABLE
|
||||
LAW, IN NO EVENT WILL LICENSOR BE LIABLE TO YOU ON ANY LEGAL THEORY FOR
|
||||
ANY SPECIAL, INCIDENTAL, CONSEQUENTIAL, PUNITIVE OR EXEMPLARY DAMAGES
|
||||
ARISING OUT OF THIS LICENSE OR THE USE OF THE WORK, EVEN IF LICENSOR HAS
|
||||
BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
|
||||
|
||||
7. Termination
|
||||
|
||||
a. This License and the rights granted hereunder will terminate
|
||||
automatically upon any breach by You of the terms of this License.
|
||||
Individuals or entities who have received Adaptations or Collections
|
||||
from You under this License, however, will not have their licenses
|
||||
terminated provided such individuals or entities remain in full
|
||||
compliance with those licenses. Sections 1, 2, 5, 6, 7, and 8 will
|
||||
survive any termination of this License.
|
||||
b. Subject to the above terms and conditions, the license granted here is
|
||||
perpetual (for the duration of the applicable copyright in the Work).
|
||||
Notwithstanding the above, Licensor reserves the right to release the
|
||||
Work under different license terms or to stop distributing the Work at
|
||||
any time; provided, however that any such election will not serve to
|
||||
withdraw this License (or any other license that has been, or is
|
||||
required to be, granted under the terms of this License), and this
|
||||
License will continue in full force and effect unless terminated as
|
||||
stated above.
|
||||
|
||||
8. Miscellaneous
|
||||
|
||||
a. Each time You Distribute or Publicly Perform the Work or a Collection,
|
||||
the Licensor offers to the recipient a license to the Work on the same
|
||||
terms and conditions as the license granted to You under this License.
|
||||
b. Each time You Distribute or Publicly Perform an Adaptation, Licensor
|
||||
offers to the recipient a license to the original Work on the same
|
||||
terms and conditions as the license granted to You under this License.
|
||||
c. If any provision of this License is invalid or unenforceable under
|
||||
applicable law, it shall not affect the validity or enforceability of
|
||||
the remainder of the terms of this License, and without further action
|
||||
by the parties to this agreement, such provision shall be reformed to
|
||||
the minimum extent necessary to make such provision valid and
|
||||
enforceable.
|
||||
d. No term or provision of this License shall be deemed waived and no
|
||||
breach consented to unless such waiver or consent shall be in writing
|
||||
and signed by the party to be charged with such waiver or consent.
|
||||
e. This License constitutes the entire agreement between the parties with
|
||||
respect to the Work licensed here. There are no understandings,
|
||||
agreements or representations with respect to the Work not specified
|
||||
here. Licensor shall not be bound by any additional provisions that
|
||||
may appear in any communication from You. This License may not be
|
||||
modified without the mutual written agreement of the Licensor and You.
|
||||
f. The rights granted under, and the subject matter referenced, in this
|
||||
License were drafted utilizing the terminology of the Berne Convention
|
||||
for the Protection of Literary and Artistic Works (as amended on
|
||||
September 28, 1979), the Rome Convention of 1961, the WIPO Copyright
|
||||
Treaty of 1996, the WIPO Performances and Phonograms Treaty of 1996
|
||||
and the Universal Copyright Convention (as revised on July 24, 1971).
|
||||
These rights and subject matter take effect in the relevant
|
||||
jurisdiction in which the License terms are sought to be enforced
|
||||
according to the corresponding provisions of the implementation of
|
||||
those treaty provisions in the applicable national law. If the
|
||||
standard suite of rights granted under applicable copyright law
|
||||
includes additional rights not granted under this License, such
|
||||
additional rights are deemed to be included in the License; this
|
||||
License is not intended to restrict the license of any rights under
|
||||
applicable law.
|
||||
|
||||
|
||||
Creative Commons Notice
|
||||
|
||||
Creative Commons is not a party to this License, and makes no warranty
|
||||
whatsoever in connection with the Work. Creative Commons will not be
|
||||
liable to You or any party on any legal theory for any damages
|
||||
whatsoever, including without limitation any general, special,
|
||||
incidental or consequential damages arising in connection to this
|
||||
license. Notwithstanding the foregoing two (2) sentences, if Creative
|
||||
Commons has expressly identified itself as the Licensor hereunder, it
|
||||
shall have all rights and obligations of Licensor.
|
||||
|
||||
Except for the limited purpose of indicating to the public that the
|
||||
Work is licensed under the CCPL, Creative Commons does not authorize
|
||||
the use by either party of the trademark "Creative Commons" or any
|
||||
related trademark or logo of Creative Commons without the prior
|
||||
written consent of Creative Commons. Any permitted use will be in
|
||||
compliance with Creative Commons' then-current trademark usage
|
||||
guidelines, as may be published on its website or otherwise made
|
||||
available upon request from time to time. For the avoidance of doubt,
|
||||
this trademark restriction does not form part of this License.
|
||||
|
||||
Creative Commons may be contacted at http://creativecommons.org/.
|
49
node_modules/atob/README.md
generated
vendored
Normal file
49
node_modules/atob/README.md
generated
vendored
Normal file
@ -0,0 +1,49 @@
|
||||
atob
|
||||
===
|
||||
|
||||
| **atob**
|
||||
| [btoa](https://git.coolaj86.com/coolaj86/btoa.js)
|
||||
| [unibabel.js](https://git.coolaj86.com/coolaj86/unibabel.js)
|
||||
| Sponsored by [ppl](https://ppl.family)
|
||||
|
||||
Uses `Buffer` to emulate the exact functionality of the browser's atob.
|
||||
|
||||
Note: Unicode may be handled incorrectly (like the browser).
|
||||
|
||||
It turns base64-encoded <strong>a</strong>scii data back **to** <strong>b</strong>inary.
|
||||
|
||||
```javascript
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
var atob = require('atob');
|
||||
var b64 = "SGVsbG8sIFdvcmxkIQ==";
|
||||
var bin = atob(b64);
|
||||
|
||||
console.log(bin); // "Hello, World!"
|
||||
}());
|
||||
```
|
||||
|
||||
### Need Unicode and Binary Support in the Browser?
|
||||
|
||||
Check out [unibabel.js](https://git.coolaj86.com/coolaj86/unibabel.js)
|
||||
|
||||
Changelog
|
||||
=======
|
||||
|
||||
* v2.1.0 address a few issues and PRs, update URLs
|
||||
* v2.0.0 provide browser version for ios web workers
|
||||
* v1.2.0 provide (empty) browser version
|
||||
* v1.1.3 add MIT license
|
||||
* v1.1.2 node only
|
||||
|
||||
LICENSE
|
||||
=======
|
||||
|
||||
Code copyright 2012-2018 AJ ONeal
|
||||
|
||||
Dual-licensed MIT and Apache-2.0
|
||||
|
||||
Docs copyright 2012-2018 AJ ONeal
|
||||
|
||||
Docs released under [Creative Commons](https://git.coolaj86.com/coolaj86/atob.js/blob/master/LICENSE.DOCS).
|
6
node_modules/atob/bin/atob.js
generated
vendored
Executable file
6
node_modules/atob/bin/atob.js
generated
vendored
Executable file
@ -0,0 +1,6 @@
|
||||
#!/usr/bin/env node
|
||||
'use strict';
|
||||
|
||||
var atob = require('../node-atob');
|
||||
var str = process.argv[2];
|
||||
console.log(atob(str));
|
24
node_modules/atob/bower.json
generated
vendored
Normal file
24
node_modules/atob/bower.json
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"name": "atob",
|
||||
"description": "atob for isomorphic environments",
|
||||
"main": "browser-atob.js",
|
||||
"authors": [
|
||||
"AJ ONeal <coolaj86@gmail.com> (https://coolaj86.com)"
|
||||
],
|
||||
"license": "(MIT OR Apache-2.0)",
|
||||
"keywords": [
|
||||
"atob",
|
||||
"browser"
|
||||
],
|
||||
"homepage": "https://github.com/node-browser-compat/atob",
|
||||
"moduleType": [
|
||||
"globals"
|
||||
],
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"test",
|
||||
"tests"
|
||||
]
|
||||
}
|
44
node_modules/atob/browser-atob.js
generated
vendored
Normal file
44
node_modules/atob/browser-atob.js
generated
vendored
Normal file
@ -0,0 +1,44 @@
|
||||
(function (w) {
|
||||
"use strict";
|
||||
|
||||
function findBest(atobNative) {
|
||||
// normal window
|
||||
if ('function' === typeof atobNative) { return atobNative; }
|
||||
|
||||
|
||||
// browserify (web worker)
|
||||
if ('function' === typeof Buffer) {
|
||||
return function atobBrowserify(a) {
|
||||
//!! Deliberately using an API that's deprecated in node.js because
|
||||
//!! this file is for browsers and we expect them to cope with it.
|
||||
//!! Discussion: github.com/node-browser-compat/atob/pull/9
|
||||
return new Buffer(a, 'base64').toString('binary');
|
||||
};
|
||||
}
|
||||
|
||||
// ios web worker with base64js
|
||||
if ('object' === typeof w.base64js) {
|
||||
// bufferToBinaryString
|
||||
// https://git.coolaj86.com/coolaj86/unibabel.js/blob/master/index.js#L50
|
||||
return function atobWebWorker_iOS(a) {
|
||||
var buf = w.base64js.b64ToByteArray(a);
|
||||
return Array.prototype.map.call(buf, function (ch) {
|
||||
return String.fromCharCode(ch);
|
||||
}).join('');
|
||||
};
|
||||
}
|
||||
|
||||
return function () {
|
||||
// ios web worker without base64js
|
||||
throw new Error("You're probably in an old browser or an iOS webworker." +
|
||||
" It might help to include beatgammit's base64-js.");
|
||||
};
|
||||
}
|
||||
|
||||
var atobBest = findBest(w.atob);
|
||||
w.atob = atobBest;
|
||||
|
||||
if ((typeof module === 'object') && module && module.exports) {
|
||||
module.exports = atobBest;
|
||||
}
|
||||
}(window));
|
7
node_modules/atob/node-atob.js
generated
vendored
Normal file
7
node_modules/atob/node-atob.js
generated
vendored
Normal file
@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
|
||||
function atob(str) {
|
||||
return Buffer.from(str, 'base64').toString('binary');
|
||||
}
|
||||
|
||||
module.exports = atob.atob = atob;
|
24
node_modules/atob/package.json
generated
vendored
Normal file
24
node_modules/atob/package.json
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"name": "atob",
|
||||
"homepage": "https://git.coolaj86.com/coolaj86/atob.js.git",
|
||||
"description": "atob for Node.JS and Linux / Mac / Windows CLI (it's a one-liner)",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://git.coolaj86.com/coolaj86/atob.js.git"
|
||||
},
|
||||
"keywords": [
|
||||
"atob",
|
||||
"browser"
|
||||
],
|
||||
"author": "AJ ONeal <coolaj86@gmail.com> (https://coolaj86.com)",
|
||||
"engines": {
|
||||
"node": ">= 4.5.0"
|
||||
},
|
||||
"main": "node-atob.js",
|
||||
"browser": "browser-atob.js",
|
||||
"bin": {
|
||||
"atob": "bin/atob.js"
|
||||
},
|
||||
"license": "(MIT OR Apache-2.0)",
|
||||
"version": "2.1.2"
|
||||
}
|
18
node_modules/atob/test.js
generated
vendored
Normal file
18
node_modules/atob/test.js
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
var atob = require('.');
|
||||
var encoded = "SGVsbG8sIFdvcmxkIQ=="
|
||||
var unencoded = "Hello, World!";
|
||||
/*
|
||||
, encoded = "SGVsbG8sIBZM"
|
||||
, unencoded = "Hello, 世界"
|
||||
*/
|
||||
|
||||
if (unencoded !== atob(encoded)) {
|
||||
console.log('[FAIL]', unencoded, atob(encoded));
|
||||
return;
|
||||
}
|
||||
|
||||
console.log('[PASS] all tests pass');
|
||||
}());
|
21
node_modules/base/LICENSE
generated
vendored
Normal file
21
node_modules/base/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015-2017, Jon Schlinkert.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
491
node_modules/base/README.md
generated
vendored
Normal file
491
node_modules/base/README.md
generated
vendored
Normal file
@ -0,0 +1,491 @@
|
||||
<p align="center">
|
||||
<a href="https://github.com/node-base/base">
|
||||
<img height="250" width="250" src="https://raw.githubusercontent.com/node-base/base/master/docs/logo.png">
|
||||
</a>
|
||||
</p>
|
||||
|
||||
# base [![NPM version](https://img.shields.io/npm/v/base.svg?style=flat)](https://www.npmjs.com/package/base) [![NPM monthly downloads](https://img.shields.io/npm/dm/base.svg?style=flat)](https://npmjs.org/package/base) [![NPM total downloads](https://img.shields.io/npm/dt/base.svg?style=flat)](https://npmjs.org/package/base) [![Linux Build Status](https://img.shields.io/travis/node-base/base.svg?style=flat&label=Travis)](https://travis-ci.org/node-base/base)
|
||||
|
||||
> base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting with a handful of common methods, like `set`, `get`, `del` and `use`.
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://www.npmjs.com/):
|
||||
|
||||
```sh
|
||||
$ npm install --save base
|
||||
```
|
||||
|
||||
## What is Base?
|
||||
|
||||
Base is a framework for rapidly creating high quality node.js applications, using plugins like building blocks.
|
||||
|
||||
### Guiding principles
|
||||
|
||||
The core team follows these principles to help guide API decisions:
|
||||
|
||||
* **Compact API surface**: The smaller the API surface, the easier the library will be to learn and use.
|
||||
* **Easy to extend**: Implementors can use any npm package, and write plugins in pure JavaScript. If you're building complex apps, Base simplifies inheritance.
|
||||
* **Easy to test**: No special setup should be required to unit test `Base` or base plugins
|
||||
|
||||
### Minimal API surface
|
||||
|
||||
[The API](#api) was designed to provide only the minimum necessary functionality for creating a useful application, with or without [plugins](#plugins).
|
||||
|
||||
**Base core**
|
||||
|
||||
Base itself ships with only a handful of [useful methods](#api), such as:
|
||||
|
||||
* `.set`: for setting values on the instance
|
||||
* `.get`: for getting values from the instance
|
||||
* `.has`: to check if a property exists on the instance
|
||||
* `.define`: for setting non-enumerable values on the instance
|
||||
* `.use`: for adding plugins
|
||||
|
||||
**Be generic**
|
||||
|
||||
When deciding on method to add or remove, we try to answer these questions:
|
||||
|
||||
1. Will all or most Base applications need this method?
|
||||
2. Will this method encourage practices or enforce conventions that are beneficial to implementors?
|
||||
3. Can or should this be done in a plugin instead?
|
||||
|
||||
### Composability
|
||||
|
||||
**Plugin system**
|
||||
|
||||
It couldn't be easier to extend Base with any features or custom functionality you can think of.
|
||||
|
||||
Base plugins are just functions that take an instance of `Base`:
|
||||
|
||||
```js
|
||||
var base = new Base();
|
||||
|
||||
function plugin(base) {
|
||||
// do plugin stuff, in pure JavaScript
|
||||
}
|
||||
// use the plugin
|
||||
base.use(plugin);
|
||||
```
|
||||
|
||||
**Inheritance**
|
||||
|
||||
Easily inherit Base using `.extend`:
|
||||
|
||||
```js
|
||||
var Base = require('base');
|
||||
|
||||
function MyApp() {
|
||||
Base.call(this);
|
||||
}
|
||||
Base.extend(MyApp);
|
||||
|
||||
var app = new MyApp();
|
||||
app.set('a', 'b');
|
||||
app.get('a');
|
||||
//=> 'b';
|
||||
```
|
||||
|
||||
**Inherit or instantiate with a namespace**
|
||||
|
||||
By default, the `.get`, `.set` and `.has` methods set and get values from the root of the `base` instance. You can customize this using the `.namespace` method exposed on the exported function. For example:
|
||||
|
||||
```js
|
||||
var Base = require('base');
|
||||
// get and set values on the `base.cache` object
|
||||
var base = Base.namespace('cache');
|
||||
|
||||
var app = base();
|
||||
app.set('foo', 'bar');
|
||||
console.log(app.cache.foo);
|
||||
//=> 'bar'
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
**Usage**
|
||||
|
||||
```js
|
||||
var Base = require('base');
|
||||
var app = new Base();
|
||||
app.set('foo', 'bar');
|
||||
console.log(app.foo);
|
||||
//=> 'bar'
|
||||
```
|
||||
|
||||
### [Base](index.js#L44)
|
||||
|
||||
Create an instance of `Base` with the given `config` and `options`.
|
||||
|
||||
**Params**
|
||||
|
||||
* `config` **{Object}**: If supplied, this object is passed to [cache-base](https://github.com/jonschlinkert/cache-base) to merge onto the the instance upon instantiation.
|
||||
* `options` **{Object}**: If supplied, this object is used to initialize the `base.options` object.
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
// initialize with `config` and `options`
|
||||
var app = new Base({isApp: true}, {abc: true});
|
||||
app.set('foo', 'bar');
|
||||
|
||||
// values defined with the given `config` object will be on the root of the instance
|
||||
console.log(app.baz); //=> undefined
|
||||
console.log(app.foo); //=> 'bar'
|
||||
// or use `.get`
|
||||
console.log(app.get('isApp')); //=> true
|
||||
console.log(app.get('foo')); //=> 'bar'
|
||||
|
||||
// values defined with the given `options` object will be on `app.options
|
||||
console.log(app.options.abc); //=> true
|
||||
```
|
||||
|
||||
### [.is](index.js#L107)
|
||||
|
||||
Set the given `name` on `app._name` and `app.is*` properties. Used for doing lookups in plugins.
|
||||
|
||||
**Params**
|
||||
|
||||
* `name` **{String}**
|
||||
* `returns` **{Boolean}**
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
app.is('foo');
|
||||
console.log(app._name);
|
||||
//=> 'foo'
|
||||
console.log(app.isFoo);
|
||||
//=> true
|
||||
app.is('bar');
|
||||
console.log(app.isFoo);
|
||||
//=> true
|
||||
console.log(app.isBar);
|
||||
//=> true
|
||||
console.log(app._name);
|
||||
//=> 'bar'
|
||||
```
|
||||
|
||||
### [.isRegistered](index.js#L145)
|
||||
|
||||
Returns true if a plugin has already been registered on an instance.
|
||||
|
||||
Plugin implementors are encouraged to use this first thing in a plugin
|
||||
to prevent the plugin from being called more than once on the same
|
||||
instance.
|
||||
|
||||
**Params**
|
||||
|
||||
* `name` **{String}**: The plugin name.
|
||||
* `register` **{Boolean}**: If the plugin if not already registered, to record it as being registered pass `true` as the second argument.
|
||||
* `returns` **{Boolean}**: Returns true if a plugin is already registered.
|
||||
|
||||
**Events**
|
||||
|
||||
* `emits`: `plugin` Emits the name of the plugin being registered. Useful for unit tests, to ensure plugins are only registered once.
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
var base = new Base();
|
||||
base.use(function(app) {
|
||||
if (app.isRegistered('myPlugin')) return;
|
||||
// do stuff to `app`
|
||||
});
|
||||
|
||||
// to also record the plugin as being registered
|
||||
base.use(function(app) {
|
||||
if (app.isRegistered('myPlugin', true)) return;
|
||||
// do stuff to `app`
|
||||
});
|
||||
```
|
||||
|
||||
### [.use](index.js#L175)
|
||||
|
||||
Define a plugin function to be called immediately upon init. Plugins are chainable and expose the following arguments to the plugin function:
|
||||
|
||||
* `app`: the current instance of `Base`
|
||||
* `base`: the [first ancestor instance](#base) of `Base`
|
||||
|
||||
**Params**
|
||||
|
||||
* `fn` **{Function}**: plugin function to call
|
||||
* `returns` **{Object}**: Returns the item instance for chaining.
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
var app = new Base()
|
||||
.use(foo)
|
||||
.use(bar)
|
||||
.use(baz)
|
||||
```
|
||||
|
||||
### [.define](index.js#L197)
|
||||
|
||||
The `.define` method is used for adding non-enumerable property on the instance. Dot-notation is **not supported** with `define`.
|
||||
|
||||
**Params**
|
||||
|
||||
* `key` **{String}**: The name of the property to define.
|
||||
* `value` **{any}**
|
||||
* `returns` **{Object}**: Returns the instance for chaining.
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
// arbitrary `render` function using lodash `template`
|
||||
app.define('render', function(str, locals) {
|
||||
return _.template(str)(locals);
|
||||
});
|
||||
```
|
||||
|
||||
### [.mixin](index.js#L222)
|
||||
|
||||
Mix property `key` onto the Base prototype. If base is inherited using `Base.extend` this method will be overridden by a new `mixin` method that will only add properties to the prototype of the inheriting application.
|
||||
|
||||
**Params**
|
||||
|
||||
* `key` **{String}**
|
||||
* `val` **{Object|Array}**
|
||||
* `returns` **{Object}**: Returns the `base` instance for chaining.
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
app.mixin('foo', function() {
|
||||
// do stuff
|
||||
});
|
||||
```
|
||||
|
||||
### [.base](index.js#L268)
|
||||
|
||||
Getter/setter used when creating nested instances of `Base`, for storing a reference to the first ancestor instance. This works by setting an instance of `Base` on the `parent` property of a "child" instance. The `base` property defaults to the current instance if no `parent` property is defined.
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
// create an instance of `Base`, this is our first ("base") instance
|
||||
var first = new Base();
|
||||
first.foo = 'bar'; // arbitrary property, to make it easier to see what's happening later
|
||||
|
||||
// create another instance
|
||||
var second = new Base();
|
||||
// create a reference to the first instance (`first`)
|
||||
second.parent = first;
|
||||
|
||||
// create another instance
|
||||
var third = new Base();
|
||||
// create a reference to the previous instance (`second`)
|
||||
// repeat this pattern every time a "child" instance is created
|
||||
third.parent = second;
|
||||
|
||||
// we can always access the first instance using the `base` property
|
||||
console.log(first.base.foo);
|
||||
//=> 'bar'
|
||||
console.log(second.base.foo);
|
||||
//=> 'bar'
|
||||
console.log(third.base.foo);
|
||||
//=> 'bar'
|
||||
// and now you know how to get to third base ;)
|
||||
```
|
||||
|
||||
### [#use](index.js#L293)
|
||||
|
||||
Static method for adding global plugin functions that will be added to an instance when created.
|
||||
|
||||
**Params**
|
||||
|
||||
* `fn` **{Function}**: Plugin function to use on each instance.
|
||||
* `returns` **{Object}**: Returns the `Base` constructor for chaining
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
Base.use(function(app) {
|
||||
app.foo = 'bar';
|
||||
});
|
||||
var app = new Base();
|
||||
console.log(app.foo);
|
||||
//=> 'bar'
|
||||
```
|
||||
|
||||
### [#extend](index.js#L337)
|
||||
|
||||
Static method for inheriting the prototype and static methods of the `Base` class. This method greatly simplifies the process of creating inheritance-based applications. See [static-extend](https://github.com/jonschlinkert/static-extend) for more details.
|
||||
|
||||
**Params**
|
||||
|
||||
* `Ctor` **{Function}**: constructor to extend
|
||||
* `methods` **{Object}**: Optional prototype properties to mix in.
|
||||
* `returns` **{Object}**: Returns the `Base` constructor for chaining
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
var extend = cu.extend(Parent);
|
||||
Parent.extend(Child);
|
||||
|
||||
// optional methods
|
||||
Parent.extend(Child, {
|
||||
foo: function() {},
|
||||
bar: function() {}
|
||||
});
|
||||
```
|
||||
|
||||
### [#mixin](index.js#L379)
|
||||
|
||||
Used for adding methods to the `Base` prototype, and/or to the prototype of child instances. When a mixin function returns a function, the returned function is pushed onto the `.mixins` array, making it available to be used on inheriting classes whenever `Base.mixins()` is called (e.g. `Base.mixins(Child)`).
|
||||
|
||||
**Params**
|
||||
|
||||
* `fn` **{Function}**: Function to call
|
||||
* `returns` **{Object}**: Returns the `Base` constructor for chaining
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
Base.mixin(function(proto) {
|
||||
proto.foo = function(msg) {
|
||||
return 'foo ' + msg;
|
||||
};
|
||||
});
|
||||
```
|
||||
|
||||
### [#mixins](index.js#L401)
|
||||
|
||||
Static method for running global mixin functions against a child constructor. Mixins must be registered before calling this method.
|
||||
|
||||
**Params**
|
||||
|
||||
* `Child` **{Function}**: Constructor function of a child class
|
||||
* `returns` **{Object}**: Returns the `Base` constructor for chaining
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
Base.extend(Child);
|
||||
Base.mixins(Child);
|
||||
```
|
||||
|
||||
### [#inherit](index.js#L420)
|
||||
|
||||
Similar to `util.inherit`, but copies all static properties, prototype properties, and getters/setters from `Provider` to `Receiver`. See [class-utils](https://github.com/jonschlinkert/class-utils#inherit) for more details.
|
||||
|
||||
**Params**
|
||||
|
||||
* `Receiver` **{Function}**: Receiving (child) constructor
|
||||
* `Provider` **{Function}**: Providing (parent) constructor
|
||||
* `returns` **{Object}**: Returns the `Base` constructor for chaining
|
||||
|
||||
**Example**
|
||||
|
||||
```js
|
||||
Base.inherit(Foo, Bar);
|
||||
```
|
||||
|
||||
## In the wild
|
||||
|
||||
The following node.js applications were built with `Base`:
|
||||
|
||||
* [assemble](https://github.com/assemble/assemble)
|
||||
* [verb](https://github.com/verbose/verb)
|
||||
* [generate](https://github.com/generate/generate)
|
||||
* [scaffold](https://github.com/jonschlinkert/scaffold)
|
||||
* [boilerplate](https://github.com/jonschlinkert/boilerplate)
|
||||
|
||||
## Test coverage
|
||||
|
||||
```
|
||||
Statements : 98.91% ( 91/92 )
|
||||
Branches : 92.86% ( 26/28 )
|
||||
Functions : 100% ( 17/17 )
|
||||
Lines : 98.9% ( 90/91 )
|
||||
```
|
||||
|
||||
## History
|
||||
|
||||
### v0.11.2
|
||||
|
||||
* fixes https://github.com/micromatch/micromatch/issues/99
|
||||
|
||||
### v0.11.0
|
||||
|
||||
**Breaking changes**
|
||||
|
||||
* Static `.use` and `.run` methods are now non-enumerable
|
||||
|
||||
### v0.9.0
|
||||
|
||||
**Breaking changes**
|
||||
|
||||
* `.is` no longer takes a function, a string must be passed
|
||||
* all remaining `.debug` code has been removed
|
||||
* `app._namespace` was removed (related to `debug`)
|
||||
* `.plugin`, `.use`, and `.define` no longer emit events
|
||||
* `.assertPlugin` was removed
|
||||
* `.lazy` was removed
|
||||
|
||||
## About
|
||||
|
||||
### Related projects
|
||||
|
||||
* [base-cwd](https://www.npmjs.com/package/base-cwd): Base plugin that adds a getter/setter for the current working directory. | [homepage](https://github.com/node-base/base-cwd "Base plugin that adds a getter/setter for the current working directory.")
|
||||
* [base-data](https://www.npmjs.com/package/base-data): adds a `data` method to base-methods. | [homepage](https://github.com/node-base/base-data "adds a `data` method to base-methods.")
|
||||
* [base-fs](https://www.npmjs.com/package/base-fs): base-methods plugin that adds vinyl-fs methods to your 'base' application for working with the file… [more](https://github.com/node-base/base-fs) | [homepage](https://github.com/node-base/base-fs "base-methods plugin that adds vinyl-fs methods to your 'base' application for working with the file system, like src, dest, copy and symlink.")
|
||||
* [base-generators](https://www.npmjs.com/package/base-generators): Adds project-generator support to your `base` application. | [homepage](https://github.com/node-base/base-generators "Adds project-generator support to your `base` application.")
|
||||
* [base-option](https://www.npmjs.com/package/base-option): Adds a few options methods to base, like `option`, `enable` and `disable`. See the readme… [more](https://github.com/node-base/base-option) | [homepage](https://github.com/node-base/base-option "Adds a few options methods to base, like `option`, `enable` and `disable`. See the readme for the full API.")
|
||||
* [base-pipeline](https://www.npmjs.com/package/base-pipeline): base-methods plugin that adds pipeline and plugin methods for dynamically composing streaming plugin pipelines. | [homepage](https://github.com/node-base/base-pipeline "base-methods plugin that adds pipeline and plugin methods for dynamically composing streaming plugin pipelines.")
|
||||
* [base-pkg](https://www.npmjs.com/package/base-pkg): Plugin for adding a `pkg` method that exposes pkg-store to your base application. | [homepage](https://github.com/node-base/base-pkg "Plugin for adding a `pkg` method that exposes pkg-store to your base application.")
|
||||
* [base-plugins](https://www.npmjs.com/package/base-plugins): Adds 'smart plugin' support to your base application. | [homepage](https://github.com/node-base/base-plugins "Adds 'smart plugin' support to your base application.")
|
||||
* [base-questions](https://www.npmjs.com/package/base-questions): Plugin for base-methods that adds methods for prompting the user and storing the answers on… [more](https://github.com/node-base/base-questions) | [homepage](https://github.com/node-base/base-questions "Plugin for base-methods that adds methods for prompting the user and storing the answers on a project-by-project basis.")
|
||||
* [base-store](https://www.npmjs.com/package/base-store): Plugin for getting and persisting config values with your base-methods application. Adds a 'store' object… [more](https://github.com/node-base/base-store) | [homepage](https://github.com/node-base/base-store "Plugin for getting and persisting config values with your base-methods application. Adds a 'store' object that exposes all of the methods from the data-store library. Also now supports sub-stores!")
|
||||
* [base-task](https://www.npmjs.com/package/base-task): base plugin that provides a very thin wrapper around [https://github.com/doowb/composer](https://github.com/doowb/composer) for adding task methods to… [more](https://github.com/node-base/base-task) | [homepage](https://github.com/node-base/base-task "base plugin that provides a very thin wrapper around <https://github.com/doowb/composer> for adding task methods to your application.")
|
||||
|
||||
### Contributing
|
||||
|
||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
|
||||
|
||||
### Contributors
|
||||
|
||||
| **Commits** | **Contributor** |
|
||||
| --- | --- |
|
||||
| 141 | [jonschlinkert](https://github.com/jonschlinkert) |
|
||||
| 30 | [doowb](https://github.com/doowb) |
|
||||
| 3 | [charlike](https://github.com/charlike) |
|
||||
| 1 | [criticalmash](https://github.com/criticalmash) |
|
||||
| 1 | [wtgtybhertgeghgtwtg](https://github.com/wtgtybhertgeghgtwtg) |
|
||||
|
||||
### Building docs
|
||||
|
||||
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
|
||||
|
||||
To generate the readme, run the following command:
|
||||
|
||||
```sh
|
||||
$ npm install -g verbose/verb#dev verb-generate-readme && verb
|
||||
```
|
||||
|
||||
### Running tests
|
||||
|
||||
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
|
||||
|
||||
```sh
|
||||
$ npm install && npm test
|
||||
```
|
||||
|
||||
### Author
|
||||
|
||||
**Jon Schlinkert**
|
||||
|
||||
* [github/jonschlinkert](https://github.com/jonschlinkert)
|
||||
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
|
||||
|
||||
### License
|
||||
|
||||
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
|
||||
Released under the [MIT License](LICENSE).
|
||||
|
||||
***
|
||||
|
||||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on September 07, 2017._
|
435
node_modules/base/index.js
generated
vendored
Normal file
435
node_modules/base/index.js
generated
vendored
Normal file
@ -0,0 +1,435 @@
|
||||
'use strict';
|
||||
|
||||
var util = require('util');
|
||||
var define = require('define-property');
|
||||
var CacheBase = require('cache-base');
|
||||
var Emitter = require('component-emitter');
|
||||
var isObject = require('isobject');
|
||||
var merge = require('mixin-deep');
|
||||
var pascal = require('pascalcase');
|
||||
var cu = require('class-utils');
|
||||
|
||||
/**
|
||||
* Optionally define a custom `cache` namespace to use.
|
||||
*/
|
||||
|
||||
function namespace(name) {
|
||||
var Cache = name ? CacheBase.namespace(name) : CacheBase;
|
||||
var fns = [];
|
||||
|
||||
/**
|
||||
* Create an instance of `Base` with the given `config` and `options`.
|
||||
*
|
||||
* ```js
|
||||
* // initialize with `config` and `options`
|
||||
* var app = new Base({isApp: true}, {abc: true});
|
||||
* app.set('foo', 'bar');
|
||||
*
|
||||
* // values defined with the given `config` object will be on the root of the instance
|
||||
* console.log(app.baz); //=> undefined
|
||||
* console.log(app.foo); //=> 'bar'
|
||||
* // or use `.get`
|
||||
* console.log(app.get('isApp')); //=> true
|
||||
* console.log(app.get('foo')); //=> 'bar'
|
||||
*
|
||||
* // values defined with the given `options` object will be on `app.options
|
||||
* console.log(app.options.abc); //=> true
|
||||
* ```
|
||||
*
|
||||
* @param {Object} `config` If supplied, this object is passed to [cache-base][] to merge onto the the instance upon instantiation.
|
||||
* @param {Object} `options` If supplied, this object is used to initialize the `base.options` object.
|
||||
* @api public
|
||||
*/
|
||||
|
||||
function Base(config, options) {
|
||||
if (!(this instanceof Base)) {
|
||||
return new Base(config, options);
|
||||
}
|
||||
Cache.call(this, config);
|
||||
this.is('base');
|
||||
this.initBase(config, options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Inherit cache-base
|
||||
*/
|
||||
|
||||
util.inherits(Base, Cache);
|
||||
|
||||
/**
|
||||
* Add static emitter methods
|
||||
*/
|
||||
|
||||
Emitter(Base);
|
||||
|
||||
/**
|
||||
* Initialize `Base` defaults with the given `config` object
|
||||
*/
|
||||
|
||||
Base.prototype.initBase = function(config, options) {
|
||||
this.options = merge({}, this.options, options);
|
||||
this.cache = this.cache || {};
|
||||
this.define('registered', {});
|
||||
if (name) this[name] = {};
|
||||
|
||||
// make `app._callbacks` non-enumerable
|
||||
this.define('_callbacks', this._callbacks);
|
||||
if (isObject(config)) {
|
||||
this.visit('set', config);
|
||||
}
|
||||
Base.run(this, 'use', fns);
|
||||
};
|
||||
|
||||
/**
|
||||
* Set the given `name` on `app._name` and `app.is*` properties. Used for doing
|
||||
* lookups in plugins.
|
||||
*
|
||||
* ```js
|
||||
* app.is('foo');
|
||||
* console.log(app._name);
|
||||
* //=> 'foo'
|
||||
* console.log(app.isFoo);
|
||||
* //=> true
|
||||
* app.is('bar');
|
||||
* console.log(app.isFoo);
|
||||
* //=> true
|
||||
* console.log(app.isBar);
|
||||
* //=> true
|
||||
* console.log(app._name);
|
||||
* //=> 'bar'
|
||||
* ```
|
||||
* @name .is
|
||||
* @param {String} `name`
|
||||
* @return {Boolean}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
Base.prototype.is = function(name) {
|
||||
if (typeof name !== 'string') {
|
||||
throw new TypeError('expected name to be a string');
|
||||
}
|
||||
this.define('is' + pascal(name), true);
|
||||
this.define('_name', name);
|
||||
this.define('_appname', name);
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* Returns true if a plugin has already been registered on an instance.
|
||||
*
|
||||
* Plugin implementors are encouraged to use this first thing in a plugin
|
||||
* to prevent the plugin from being called more than once on the same
|
||||
* instance.
|
||||
*
|
||||
* ```js
|
||||
* var base = new Base();
|
||||
* base.use(function(app) {
|
||||
* if (app.isRegistered('myPlugin')) return;
|
||||
* // do stuff to `app`
|
||||
* });
|
||||
*
|
||||
* // to also record the plugin as being registered
|
||||
* base.use(function(app) {
|
||||
* if (app.isRegistered('myPlugin', true)) return;
|
||||
* // do stuff to `app`
|
||||
* });
|
||||
* ```
|
||||
* @name .isRegistered
|
||||
* @emits `plugin` Emits the name of the plugin being registered. Useful for unit tests, to ensure plugins are only registered once.
|
||||
* @param {String} `name` The plugin name.
|
||||
* @param {Boolean} `register` If the plugin if not already registered, to record it as being registered pass `true` as the second argument.
|
||||
* @return {Boolean} Returns true if a plugin is already registered.
|
||||
* @api public
|
||||
*/
|
||||
|
||||
Base.prototype.isRegistered = function(name, register) {
|
||||
if (this.registered.hasOwnProperty(name)) {
|
||||
return true;
|
||||
}
|
||||
if (register !== false) {
|
||||
this.registered[name] = true;
|
||||
this.emit('plugin', name);
|
||||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
/**
|
||||
* Define a plugin function to be called immediately upon init. Plugins are chainable
|
||||
* and expose the following arguments to the plugin function:
|
||||
*
|
||||
* - `app`: the current instance of `Base`
|
||||
* - `base`: the [first ancestor instance](#base) of `Base`
|
||||
*
|
||||
* ```js
|
||||
* var app = new Base()
|
||||
* .use(foo)
|
||||
* .use(bar)
|
||||
* .use(baz)
|
||||
* ```
|
||||
* @name .use
|
||||
* @param {Function} `fn` plugin function to call
|
||||
* @return {Object} Returns the item instance for chaining.
|
||||
* @api public
|
||||
*/
|
||||
|
||||
Base.prototype.use = function(fn) {
|
||||
fn.call(this, this);
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* The `.define` method is used for adding non-enumerable property on the instance.
|
||||
* Dot-notation is **not supported** with `define`.
|
||||
*
|
||||
* ```js
|
||||
* // arbitrary `render` function using lodash `template`
|
||||
* app.define('render', function(str, locals) {
|
||||
* return _.template(str)(locals);
|
||||
* });
|
||||
* ```
|
||||
* @name .define
|
||||
* @param {String} `key` The name of the property to define.
|
||||
* @param {any} `value`
|
||||
* @return {Object} Returns the instance for chaining.
|
||||
* @api public
|
||||
*/
|
||||
|
||||
Base.prototype.define = function(key, val) {
|
||||
if (isObject(key)) {
|
||||
return this.visit('define', key);
|
||||
}
|
||||
define(this, key, val);
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* Mix property `key` onto the Base prototype. If base is inherited using
|
||||
* `Base.extend` this method will be overridden by a new `mixin` method that will
|
||||
* only add properties to the prototype of the inheriting application.
|
||||
*
|
||||
* ```js
|
||||
* app.mixin('foo', function() {
|
||||
* // do stuff
|
||||
* });
|
||||
* ```
|
||||
* @name .mixin
|
||||
* @param {String} `key`
|
||||
* @param {Object|Array} `val`
|
||||
* @return {Object} Returns the `base` instance for chaining.
|
||||
* @api public
|
||||
*/
|
||||
|
||||
Base.prototype.mixin = function(key, val) {
|
||||
Base.prototype[key] = val;
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* Non-enumberable mixin array, used by the static [Base.mixin]() method.
|
||||
*/
|
||||
|
||||
Base.prototype.mixins = Base.prototype.mixins || [];
|
||||
|
||||
/**
|
||||
* Getter/setter used when creating nested instances of `Base`, for storing a reference
|
||||
* to the first ancestor instance. This works by setting an instance of `Base` on the `parent`
|
||||
* property of a "child" instance. The `base` property defaults to the current instance if
|
||||
* no `parent` property is defined.
|
||||
*
|
||||
* ```js
|
||||
* // create an instance of `Base`, this is our first ("base") instance
|
||||
* var first = new Base();
|
||||
* first.foo = 'bar'; // arbitrary property, to make it easier to see what's happening later
|
||||
*
|
||||
* // create another instance
|
||||
* var second = new Base();
|
||||
* // create a reference to the first instance (`first`)
|
||||
* second.parent = first;
|
||||
*
|
||||
* // create another instance
|
||||
* var third = new Base();
|
||||
* // create a reference to the previous instance (`second`)
|
||||
* // repeat this pattern every time a "child" instance is created
|
||||
* third.parent = second;
|
||||
*
|
||||
* // we can always access the first instance using the `base` property
|
||||
* console.log(first.base.foo);
|
||||
* //=> 'bar'
|
||||
* console.log(second.base.foo);
|
||||
* //=> 'bar'
|
||||
* console.log(third.base.foo);
|
||||
* //=> 'bar'
|
||||
* // and now you know how to get to third base ;)
|
||||
* ```
|
||||
* @name .base
|
||||
* @api public
|
||||
*/
|
||||
|
||||
Object.defineProperty(Base.prototype, 'base', {
|
||||
configurable: true,
|
||||
get: function() {
|
||||
return this.parent ? this.parent.base : this;
|
||||
}
|
||||
});
|
||||
|
||||
/**
|
||||
* Static method for adding global plugin functions that will
|
||||
* be added to an instance when created.
|
||||
*
|
||||
* ```js
|
||||
* Base.use(function(app) {
|
||||
* app.foo = 'bar';
|
||||
* });
|
||||
* var app = new Base();
|
||||
* console.log(app.foo);
|
||||
* //=> 'bar'
|
||||
* ```
|
||||
* @name #use
|
||||
* @param {Function} `fn` Plugin function to use on each instance.
|
||||
* @return {Object} Returns the `Base` constructor for chaining
|
||||
* @api public
|
||||
*/
|
||||
|
||||
define(Base, 'use', function(fn) {
|
||||
fns.push(fn);
|
||||
return Base;
|
||||
});
|
||||
|
||||
/**
|
||||
* Run an array of functions by passing each function
|
||||
* to a method on the given object specified by the given property.
|
||||
*
|
||||
* @param {Object} `obj` Object containing method to use.
|
||||
* @param {String} `prop` Name of the method on the object to use.
|
||||
* @param {Array} `arr` Array of functions to pass to the method.
|
||||
*/
|
||||
|
||||
define(Base, 'run', function(obj, prop, arr) {
|
||||
var len = arr.length, i = 0;
|
||||
while (len--) {
|
||||
obj[prop](arr[i++]);
|
||||
}
|
||||
return Base;
|
||||
});
|
||||
|
||||
/**
|
||||
* Static method for inheriting the prototype and static methods of the `Base` class.
|
||||
* This method greatly simplifies the process of creating inheritance-based applications.
|
||||
* See [static-extend][] for more details.
|
||||
*
|
||||
* ```js
|
||||
* var extend = cu.extend(Parent);
|
||||
* Parent.extend(Child);
|
||||
*
|
||||
* // optional methods
|
||||
* Parent.extend(Child, {
|
||||
* foo: function() {},
|
||||
* bar: function() {}
|
||||
* });
|
||||
* ```
|
||||
* @name #extend
|
||||
* @param {Function} `Ctor` constructor to extend
|
||||
* @param {Object} `methods` Optional prototype properties to mix in.
|
||||
* @return {Object} Returns the `Base` constructor for chaining
|
||||
* @api public
|
||||
*/
|
||||
|
||||
define(Base, 'extend', cu.extend(Base, function(Ctor, Parent) {
|
||||
Ctor.prototype.mixins = Ctor.prototype.mixins || [];
|
||||
|
||||
define(Ctor, 'mixin', function(fn) {
|
||||
var mixin = fn(Ctor.prototype, Ctor);
|
||||
if (typeof mixin === 'function') {
|
||||
Ctor.prototype.mixins.push(mixin);
|
||||
}
|
||||
return Ctor;
|
||||
});
|
||||
|
||||
define(Ctor, 'mixins', function(Child) {
|
||||
Base.run(Child, 'mixin', Ctor.prototype.mixins);
|
||||
return Ctor;
|
||||
});
|
||||
|
||||
Ctor.prototype.mixin = function(key, value) {
|
||||
Ctor.prototype[key] = value;
|
||||
return this;
|
||||
};
|
||||
return Base;
|
||||
}));
|
||||
|
||||
/**
|
||||
* Used for adding methods to the `Base` prototype, and/or to the prototype of child instances.
|
||||
* When a mixin function returns a function, the returned function is pushed onto the `.mixins`
|
||||
* array, making it available to be used on inheriting classes whenever `Base.mixins()` is
|
||||
* called (e.g. `Base.mixins(Child)`).
|
||||
*
|
||||
* ```js
|
||||
* Base.mixin(function(proto) {
|
||||
* proto.foo = function(msg) {
|
||||
* return 'foo ' + msg;
|
||||
* };
|
||||
* });
|
||||
* ```
|
||||
* @name #mixin
|
||||
* @param {Function} `fn` Function to call
|
||||
* @return {Object} Returns the `Base` constructor for chaining
|
||||
* @api public
|
||||
*/
|
||||
|
||||
define(Base, 'mixin', function(fn) {
|
||||
var mixin = fn(Base.prototype, Base);
|
||||
if (typeof mixin === 'function') {
|
||||
Base.prototype.mixins.push(mixin);
|
||||
}
|
||||
return Base;
|
||||
});
|
||||
|
||||
/**
|
||||
* Static method for running global mixin functions against a child constructor.
|
||||
* Mixins must be registered before calling this method.
|
||||
*
|
||||
* ```js
|
||||
* Base.extend(Child);
|
||||
* Base.mixins(Child);
|
||||
* ```
|
||||
* @name #mixins
|
||||
* @param {Function} `Child` Constructor function of a child class
|
||||
* @return {Object} Returns the `Base` constructor for chaining
|
||||
* @api public
|
||||
*/
|
||||
|
||||
define(Base, 'mixins', function(Child) {
|
||||
Base.run(Child, 'mixin', Base.prototype.mixins);
|
||||
return Base;
|
||||
});
|
||||
|
||||
/**
|
||||
* Similar to `util.inherit`, but copies all static properties, prototype properties, and
|
||||
* getters/setters from `Provider` to `Receiver`. See [class-utils][]{#inherit} for more details.
|
||||
*
|
||||
* ```js
|
||||
* Base.inherit(Foo, Bar);
|
||||
* ```
|
||||
* @name #inherit
|
||||
* @param {Function} `Receiver` Receiving (child) constructor
|
||||
* @param {Function} `Provider` Providing (parent) constructor
|
||||
* @return {Object} Returns the `Base` constructor for chaining
|
||||
* @api public
|
||||
*/
|
||||
|
||||
define(Base, 'inherit', cu.inherit);
|
||||
define(Base, 'bubble', cu.bubble);
|
||||
return Base;
|
||||
}
|
||||
|
||||
/**
|
||||
* Expose `Base` with default settings
|
||||
*/
|
||||
|
||||
module.exports = namespace();
|
||||
|
||||
/**
|
||||
* Allow users to define a namespace
|
||||
*/
|
||||
|
||||
module.exports.namespace = namespace;
|
21
node_modules/base/node_modules/define-property/LICENSE
generated
vendored
Normal file
21
node_modules/base/node_modules/define-property/LICENSE
generated
vendored
Normal file
@ -0,0 +1,21 @@
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015, 2017, Jon Schlinkert
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
95
node_modules/base/node_modules/define-property/README.md
generated
vendored
Normal file
95
node_modules/base/node_modules/define-property/README.md
generated
vendored
Normal file
@ -0,0 +1,95 @@
|
||||
# define-property [![NPM version](https://img.shields.io/npm/v/define-property.svg?style=flat)](https://www.npmjs.com/package/define-property) [![NPM monthly downloads](https://img.shields.io/npm/dm/define-property.svg?style=flat)](https://npmjs.org/package/define-property) [![NPM total downloads](https://img.shields.io/npm/dt/define-property.svg?style=flat)](https://npmjs.org/package/define-property) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/define-property.svg?style=flat&label=Travis)](https://travis-ci.org/jonschlinkert/define-property)
|
||||
|
||||
> Define a non-enumerable property on an object.
|
||||
|
||||
## Install
|
||||
|
||||
Install with [npm](https://www.npmjs.com/):
|
||||
|
||||
```sh
|
||||
$ npm install --save define-property
|
||||
```
|
||||
|
||||
Install with [yarn](https://yarnpkg.com):
|
||||
|
||||
```sh
|
||||
$ yarn add define-property
|
||||
```
|
||||
|
||||
## Usage
|
||||
|
||||
**Params**
|
||||
|
||||
* `obj`: The object on which to define the property.
|
||||
* `prop`: The name of the property to be defined or modified.
|
||||
* `descriptor`: The descriptor for the property being defined or modified.
|
||||
|
||||
```js
|
||||
var define = require('define-property');
|
||||
var obj = {};
|
||||
define(obj, 'foo', function(val) {
|
||||
return val.toUpperCase();
|
||||
});
|
||||
|
||||
console.log(obj);
|
||||
//=> {}
|
||||
|
||||
console.log(obj.foo('bar'));
|
||||
//=> 'BAR'
|
||||
```
|
||||
|
||||
**get/set**
|
||||
|
||||
```js
|
||||
define(obj, 'foo', {
|
||||
get: function() {},
|
||||
set: function() {}
|
||||
});
|
||||
```
|
||||
|
||||
## About
|
||||
|
||||
### Related projects
|
||||
|
||||
* [assign-deep](https://www.npmjs.com/package/assign-deep): Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target… [more](https://github.com/jonschlinkert/assign-deep) | [homepage](https://github.com/jonschlinkert/assign-deep "Deeply assign the enumerable properties and/or es6 Symbol properies of source objects to the target (first) object.")
|
||||
* [extend-shallow](https://www.npmjs.com/package/extend-shallow): Extend an object with the properties of additional objects. node.js/javascript util. | [homepage](https://github.com/jonschlinkert/extend-shallow "Extend an object with the properties of additional objects. node.js/javascript util.")
|
||||
* [merge-deep](https://www.npmjs.com/package/merge-deep): Recursively merge values in a javascript object. | [homepage](https://github.com/jonschlinkert/merge-deep "Recursively merge values in a javascript object.")
|
||||
* [mixin-deep](https://www.npmjs.com/package/mixin-deep): Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone. | [homepage](https://github.com/jonschlinkert/mixin-deep "Deeply mix the properties of objects into the first object. Like merge-deep, but doesn't clone.")
|
||||
|
||||
### Contributing
|
||||
|
||||
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).
|
||||
|
||||
### Building docs
|
||||
|
||||
_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_
|
||||
|
||||
To generate the readme, run the following command:
|
||||
|
||||
```sh
|
||||
$ npm install -g verbose/verb#dev verb-generate-readme && verb
|
||||
```
|
||||
|
||||
### Running tests
|
||||
|
||||
Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:
|
||||
|
||||
```sh
|
||||
$ npm install && npm test
|
||||
```
|
||||
|
||||
### Author
|
||||
|
||||
**Jon Schlinkert**
|
||||
|
||||
* [github/jonschlinkert](https://github.com/jonschlinkert)
|
||||
* [twitter/jonschlinkert](https://twitter.com/jonschlinkert)
|
||||
|
||||
### License
|
||||
|
||||
Copyright © 2017, [Jon Schlinkert](https://github.com/jonschlinkert).
|
||||
Released under the [MIT License](LICENSE).
|
||||
|
||||
***
|
||||
|
||||
_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.5.0, on April 20, 2017._
|
31
node_modules/base/node_modules/define-property/index.js
generated
vendored
Normal file
31
node_modules/base/node_modules/define-property/index.js
generated
vendored
Normal file
@ -0,0 +1,31 @@
|
||||
/*!
|
||||
* define-property <https://github.com/jonschlinkert/define-property>
|
||||
*
|
||||
* Copyright (c) 2015, 2017, Jon Schlinkert.
|
||||
* Released under the MIT License.
|
||||
*/
|
||||
|
||||
'use strict';
|
||||
|
||||
var isDescriptor = require('is-descriptor');
|
||||
|
||||
module.exports = function defineProperty(obj, prop, val) {
|
||||
if (typeof obj !== 'object' && typeof obj !== 'function') {
|
||||
throw new TypeError('expected an object or function.');
|
||||
}
|
||||
|
||||
if (typeof prop !== 'string') {
|
||||
throw new TypeError('expected `prop` to be a string.');
|
||||
}
|
||||
|
||||
if (isDescriptor(val) && ('set' in val || 'get' in val)) {
|
||||
return Object.defineProperty(obj, prop, val);
|
||||
}
|
||||
|
||||
return Object.defineProperty(obj, prop, {
|
||||
configurable: true,
|
||||
enumerable: false,
|
||||
writable: true,
|
||||
value: val
|
||||
});
|
||||
};
|
62
node_modules/base/node_modules/define-property/package.json
generated
vendored
Normal file
62
node_modules/base/node_modules/define-property/package.json
generated
vendored
Normal file
@ -0,0 +1,62 @@
|
||||
{
|
||||
"name": "define-property",
|
||||
"description": "Define a non-enumerable property on an object.",
|
||||
"version": "1.0.0",
|
||||
"homepage": "https://github.com/jonschlinkert/define-property",
|
||||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
||||
"repository": "jonschlinkert/define-property",
|
||||
"bugs": {
|
||||
"url": "https://github.com/jonschlinkert/define-property/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"dependencies": {
|
||||
"is-descriptor": "^1.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"gulp-format-md": "^0.1.12",
|
||||
"mocha": "^3.2.0"
|
||||
},
|
||||
"keywords": [
|
||||
"define",
|
||||
"define-property",
|
||||
"enumerable",
|
||||
"key",
|
||||
"non",
|
||||
"non-enumerable",
|
||||
"object",
|
||||
"prop",
|
||||
"property",
|
||||
"value"
|
||||
],
|
||||
"verb": {
|
||||
"related": {
|
||||
"list": [
|
||||
"extend-shallow",
|
||||
"merge-deep",
|
||||
"assign-deep",
|
||||
"mixin-deep"
|
||||
]
|
||||
},
|
||||
"toc": false,
|
||||
"layout": "default",
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
}
|
||||
}
|
||||
}
|
111
node_modules/base/package.json
generated
vendored
Normal file
111
node_modules/base/package.json
generated
vendored
Normal file
@ -0,0 +1,111 @@
|
||||
{
|
||||
"name": "base",
|
||||
"description": "base is the foundation for creating modular, unit testable and highly pluggable node.js applications, starting with a handful of common methods, like `set`, `get`, `del` and `use`.",
|
||||
"version": "0.11.2",
|
||||
"homepage": "https://github.com/node-base/base",
|
||||
"author": "Jon Schlinkert (https://github.com/jonschlinkert)",
|
||||
"maintainers": [
|
||||
"Brian Woodward (https://github.com/doowb)",
|
||||
"Jon Schlinkert (https://github.com/jonschlinkert)"
|
||||
],
|
||||
"contributors": [
|
||||
"Brian Woodward (https://twitter.com/doowb)",
|
||||
"John O'Donnell (https://github.com/criticalmash)",
|
||||
"Jon Schlinkert (http://twitter.com/jonschlinkert)",
|
||||
"tunnckoCore (https://i.am.charlike.online)",
|
||||
"(https://github.com/wtgtybhertgeghgtwtg)"
|
||||
],
|
||||
"repository": "node-base/base",
|
||||
"bugs": {
|
||||
"url": "https://github.com/node-base/base/issues"
|
||||
},
|
||||
"license": "MIT",
|
||||
"files": [
|
||||
"index.js"
|
||||
],
|
||||
"main": "index.js",
|
||||
"engines": {
|
||||
"node": ">=0.10.0"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha"
|
||||
},
|
||||
"dependencies": {
|
||||
"cache-base": "^1.0.1",
|
||||
"class-utils": "^0.3.5",
|
||||
"component-emitter": "^1.2.1",
|
||||
"define-property": "^1.0.0",
|
||||
"isobject": "^3.0.1",
|
||||
"mixin-deep": "^1.2.0",
|
||||
"pascalcase": "^0.1.1"
|
||||
},
|
||||
"devDependencies": {
|
||||
"gulp": "^3.9.1",
|
||||
"gulp-eslint": "^4.0.0",
|
||||
"gulp-format-md": "^1.0.0",
|
||||
"gulp-istanbul": "^1.1.2",
|
||||
"gulp-mocha": "^3.0.1",
|
||||
"helper-coverage": "^0.1.3",
|
||||
"mocha": "^3.5.0",
|
||||
"should": "^13.0.1",
|
||||
"through2": "^2.0.3",
|
||||
"verb-generate-readme": "^0.6.0"
|
||||
},
|
||||
"keywords": [
|
||||
"base",
|
||||
"boilerplate",
|
||||
"cache",
|
||||
"del",
|
||||
"get",
|
||||
"inherit",
|
||||
"methods",
|
||||
"set",
|
||||
"starter",
|
||||
"unset",
|
||||
"visit"
|
||||
],
|
||||
"verb": {
|
||||
"run": true,
|
||||
"toc": false,
|
||||
"layout": "default",
|
||||
"tasks": [
|
||||
"readme"
|
||||
],
|
||||
"plugins": [
|
||||
"gulp-format-md"
|
||||
],
|
||||
"helpers": [
|
||||
"helper-coverage"
|
||||
],
|
||||
"related": {
|
||||
"description": "There are a number of different plugins available for extending base. Let us know if you create your own!",
|
||||
"hightlight": "generate",
|
||||
"list": [
|
||||
"base-cwd",
|
||||
"base-data",
|
||||
"base-fs",
|
||||
"base-generators",
|
||||
"base-option",
|
||||
"base-pipeline",
|
||||
"base-pkg",
|
||||
"base-plugins",
|
||||
"base-questions",
|
||||
"base-store",
|
||||
"base-task"
|
||||
]
|
||||
},
|
||||
"reflinks": [
|
||||
"assemble",
|
||||
"boilerplate",
|
||||
"cache-base",
|
||||
"class-utils",
|
||||
"generate",
|
||||
"scaffold",
|
||||
"static-extend",
|
||||
"verb"
|
||||
],
|
||||
"lint": {
|
||||
"reflinks": true
|
||||
}
|
||||
}
|
||||
}
|
52
node_modules/basic-auth/HISTORY.md
generated
vendored
Normal file
52
node_modules/basic-auth/HISTORY.md
generated
vendored
Normal file
@ -0,0 +1,52 @@
|
||||
2.0.1 / 2018-09-19
|
||||
==================
|
||||
|
||||
* deps: safe-buffer@5.1.2
|
||||
|
||||
2.0.0 / 2017-09-12
|
||||
==================
|
||||
|
||||
* Drop support for Node.js below 0.8
|
||||
* Remove `auth(ctx)` signature -- pass in header or `auth(ctx.req)`
|
||||
* Use `safe-buffer` for improved Buffer API
|
||||
|
||||
1.1.0 / 2016-11-18
|
||||
==================
|
||||
|
||||
* Add `auth.parse` for low-level string parsing
|
||||
|
||||
1.0.4 / 2016-05-10
|
||||
==================
|
||||
|
||||
* Improve error message when `req` argument is not an object
|
||||
* Improve error message when `req` missing `headers` property
|
||||
|
||||
1.0.3 / 2015-07-01
|
||||
==================
|
||||
|
||||
* Fix regression accepting a Koa context
|
||||
|
||||
1.0.2 / 2015-06-12
|
||||
==================
|
||||
|
||||
* Improve error message when `req` argument missing
|
||||
* perf: enable strict mode
|
||||
* perf: hoist regular expression
|
||||
* perf: parse with regular expressions
|
||||
* perf: remove argument reassignment
|
||||
|
||||
1.0.1 / 2015-05-04
|
||||
==================
|
||||
|
||||
* Update readme
|
||||
|
||||
1.0.0 / 2014-07-01
|
||||
==================
|
||||
|
||||
* Support empty password
|
||||
* Support empty username
|
||||
|
||||
0.0.1 / 2013-11-30
|
||||
==================
|
||||
|
||||
* Initial release
|
24
node_modules/basic-auth/LICENSE
generated
vendored
Normal file
24
node_modules/basic-auth/LICENSE
generated
vendored
Normal file
@ -0,0 +1,24 @@
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2013 TJ Holowaychuk
|
||||
Copyright (c) 2014 Jonathan Ong <me@jongleberry.com>
|
||||
Copyright (c) 2015-2016 Douglas Christopher Wilson <doug@somethingdoug.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
'Software'), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
113
node_modules/basic-auth/README.md
generated
vendored
Normal file
113
node_modules/basic-auth/README.md
generated
vendored
Normal file
@ -0,0 +1,113 @@
|
||||
# basic-auth
|
||||
|
||||
[![NPM Version][npm-image]][npm-url]
|
||||
[![NPM Downloads][downloads-image]][downloads-url]
|
||||
[![Node.js Version][node-version-image]][node-version-url]
|
||||
[![Build Status][travis-image]][travis-url]
|
||||
[![Test Coverage][coveralls-image]][coveralls-url]
|
||||
|
||||
Generic basic auth Authorization header field parser for whatever.
|
||||
|
||||
## Installation
|
||||
|
||||
This is a [Node.js](https://nodejs.org/en/) module available through the
|
||||
[npm registry](https://www.npmjs.com/). Installation is done using the
|
||||
[`npm install` command](https://docs.npmjs.com/getting-started/installing-npm-packages-locally):
|
||||
|
||||
```
|
||||
$ npm install basic-auth
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
<!-- eslint-disable no-unused-vars -->
|
||||
|
||||
```js
|
||||
var auth = require('basic-auth')
|
||||
```
|
||||
|
||||
### auth(req)
|
||||
|
||||
Get the basic auth credentials from the given request. The `Authorization`
|
||||
header is parsed and if the header is invalid, `undefined` is returned,
|
||||
otherwise an object with `name` and `pass` properties.
|
||||
|
||||
### auth.parse(string)
|
||||
|
||||
Parse a basic auth authorization header string. This will return an object
|
||||
with `name` and `pass` properties, or `undefined` if the string is invalid.
|
||||
|
||||
## Example
|
||||
|
||||
Pass a Node.js request object to the module export. If parsing fails
|
||||
`undefined` is returned, otherwise an object with `.name` and `.pass`.
|
||||
|
||||
<!-- eslint-disable no-unused-vars, no-undef -->
|
||||
|
||||
```js
|
||||
var auth = require('basic-auth')
|
||||
var user = auth(req)
|
||||
// => { name: 'something', pass: 'whatever' }
|
||||
```
|
||||
|
||||
A header string from any other location can also be parsed with
|
||||
`auth.parse`, for example a `Proxy-Authorization` header:
|
||||
|
||||
<!-- eslint-disable no-unused-vars, no-undef -->
|
||||
|
||||
```js
|
||||
var auth = require('basic-auth')
|
||||
var user = auth.parse(req.getHeader('Proxy-Authorization'))
|
||||
```
|
||||
|
||||
### With vanilla node.js http server
|
||||
|
||||
```js
|
||||
var http = require('http')
|
||||
var auth = require('basic-auth')
|
||||
var compare = require('tsscmp')
|
||||
|
||||
// Create server
|
||||
var server = http.createServer(function (req, res) {
|
||||
var credentials = auth(req)
|
||||
|
||||
// Check credentials
|
||||
// The "check" function will typically be against your user store
|
||||
if (!credentials || !check(credentials.name, credentials.pass)) {
|
||||
res.statusCode = 401
|
||||
res.setHeader('WWW-Authenticate', 'Basic realm="example"')
|
||||
res.end('Access denied')
|
||||
} else {
|
||||
res.end('Access granted')
|
||||
}
|
||||
})
|
||||
|
||||
// Basic function to validate credentials for example
|
||||
function check (name, pass) {
|
||||
var valid = true
|
||||
|
||||
// Simple method to prevent short-circut and use timing-safe compare
|
||||
valid = compare(name, 'john') && valid
|
||||
valid = compare(pass, 'secret') && valid
|
||||
|
||||
return valid
|
||||
}
|
||||
|
||||
// Listen
|
||||
server.listen(3000)
|
||||
```
|
||||
|
||||
# License
|
||||
|
||||
[MIT](LICENSE)
|
||||
|
||||
[coveralls-image]: https://badgen.net/coveralls/c/github/jshttp/basic-auth/master
|
||||
[coveralls-url]: https://coveralls.io/r/jshttp/basic-auth?branch=master
|
||||
[downloads-image]: https://badgen.net/npm/dm/basic-auth
|
||||
[downloads-url]: https://npmjs.org/package/basic-auth
|
||||
[node-version-image]: https://badgen.net/npm/node/basic-auth
|
||||
[node-version-url]: https://nodejs.org/en/download
|
||||
[npm-image]: https://badgen.net/npm/v/basic-auth
|
||||
[npm-url]: https://npmjs.org/package/basic-auth
|
||||
[travis-image]: https://badgen.net/travis/jshttp/basic-auth/master
|
||||
[travis-url]: https://travis-ci.org/jshttp/basic-auth
|
133
node_modules/basic-auth/index.js
generated
vendored
Normal file
133
node_modules/basic-auth/index.js
generated
vendored
Normal file
@ -0,0 +1,133 @@
|
||||
/*!
|
||||
* basic-auth
|
||||
* Copyright(c) 2013 TJ Holowaychuk
|
||||
* Copyright(c) 2014 Jonathan Ong
|
||||
* Copyright(c) 2015-2016 Douglas Christopher Wilson
|
||||
* MIT Licensed
|
||||
*/
|
||||
|
||||
'use strict'
|
||||
|
||||
/**
|
||||
* Module dependencies.
|
||||
* @private
|
||||
*/
|
||||
|
||||
var Buffer = require('safe-buffer').Buffer
|
||||
|
||||
/**
|
||||
* Module exports.
|
||||
* @public
|
||||
*/
|
||||
|
||||
module.exports = auth
|
||||
module.exports.parse = parse
|
||||
|
||||
/**
|
||||
* RegExp for basic auth credentials
|
||||
*
|
||||
* credentials = auth-scheme 1*SP token68
|
||||
* auth-scheme = "Basic" ; case insensitive
|
||||
* token68 = 1*( ALPHA / DIGIT / "-" / "." / "_" / "~" / "+" / "/" ) *"="
|
||||
* @private
|
||||
*/
|
||||
|
||||
var CREDENTIALS_REGEXP = /^ *(?:[Bb][Aa][Ss][Ii][Cc]) +([A-Za-z0-9._~+/-]+=*) *$/
|
||||
|
||||
/**
|
||||
* RegExp for basic auth user/pass
|
||||
*
|
||||
* user-pass = userid ":" password
|
||||
* userid = *<TEXT excluding ":">
|
||||
* password = *TEXT
|
||||
* @private
|
||||
*/
|
||||
|
||||
var USER_PASS_REGEXP = /^([^:]*):(.*)$/
|
||||
|
||||
/**
|
||||
* Parse the Authorization header field of a request.
|
||||
*
|
||||
* @param {object} req
|
||||
* @return {object} with .name and .pass
|
||||
* @public
|
||||
*/
|
||||
|
||||
function auth (req) {
|
||||
if (!req) {
|
||||
throw new TypeError('argument req is required')
|
||||
}
|
||||
|
||||
if (typeof req !== 'object') {
|
||||
throw new TypeError('argument req is required to be an object')
|
||||
}
|
||||
|
||||
// get header
|
||||
var header = getAuthorization(req)
|
||||
|
||||
// parse header
|
||||
return parse(header)
|
||||
}
|
||||
|
||||
/**
|
||||
* Decode base64 string.
|
||||
* @private
|
||||
*/
|
||||
|
||||
function decodeBase64 (str) {
|
||||
return Buffer.from(str, 'base64').toString()
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the Authorization header from request object.
|
||||
* @private
|
||||
*/
|
||||
|
||||
function getAuthorization (req) {
|
||||
if (!req.headers || typeof req.headers !== 'object') {
|
||||
throw new TypeError('argument req is required to have headers property')
|
||||
}
|
||||
|
||||
return req.headers.authorization
|
||||
}
|
||||
|
||||
/**
|
||||
* Parse basic auth to object.
|
||||
*
|
||||
* @param {string} string
|
||||
* @return {object}
|
||||
* @public
|
||||
*/
|
||||
|
||||
function parse (string) {
|
||||
if (typeof string !== 'string') {
|
||||
return undefined
|
||||
}
|
||||
|
||||
// parse header
|
||||
var match = CREDENTIALS_REGEXP.exec(string)
|
||||
|
||||
if (!match) {
|
||||
return undefined
|
||||
}
|
||||
|
||||
// decode user pass
|
||||
var userPass = USER_PASS_REGEXP.exec(decodeBase64(match[1]))
|
||||
|
||||
if (!userPass) {
|
||||
return undefined
|
||||
}
|
||||
|
||||
// return credentials object
|
||||
return new Credentials(userPass[1], userPass[2])
|
||||
}
|
||||
|
||||
/**
|
||||
* Object to represent user credentials.
|
||||
* @private
|
||||
*/
|
||||
|
||||
function Credentials (name, pass) {
|
||||
this.name = name
|
||||
this.pass = pass
|
||||
}
|
41
node_modules/basic-auth/package.json
generated
vendored
Normal file
41
node_modules/basic-auth/package.json
generated
vendored
Normal file
@ -0,0 +1,41 @@
|
||||
{
|
||||
"name": "basic-auth",
|
||||
"description": "node.js basic auth parser",
|
||||
"version": "2.0.1",
|
||||
"license": "MIT",
|
||||
"keywords": [
|
||||
"basic",
|
||||
"auth",
|
||||
"authorization",
|
||||
"basicauth"
|
||||
],
|
||||
"repository": "jshttp/basic-auth",
|
||||
"dependencies": {
|
||||
"safe-buffer": "5.1.2"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "5.6.0",
|
||||
"eslint-config-standard": "12.0.0",
|
||||
"eslint-plugin-import": "2.14.0",
|
||||
"eslint-plugin-markdown": "1.0.0-beta.6",
|
||||
"eslint-plugin-node": "7.0.1",
|
||||
"eslint-plugin-promise": "4.0.1",
|
||||
"eslint-plugin-standard": "4.0.0",
|
||||
"istanbul": "0.4.5",
|
||||
"mocha": "5.2.0"
|
||||
},
|
||||
"files": [
|
||||
"HISTORY.md",
|
||||
"LICENSE",
|
||||
"index.js"
|
||||
],
|
||||
"engines": {
|
||||
"node": ">= 0.8"
|
||||
},
|
||||
"scripts": {
|
||||
"lint": "eslint --plugin markdown --ext js,md .",
|
||||
"test": "mocha --check-leaks --reporter spec --bail",
|
||||
"test-cov": "istanbul cover node_modules/mocha/bin/_mocha -- --reporter dot --check-leaks test/",
|
||||
"test-travis": "istanbul cover node_modules/mocha/bin/_mocha --report lcovonly -- --reporter spec --check-leaks test/"
|
||||
}
|
||||
}
|
4
node_modules/batch/.npmignore
generated
vendored
Normal file
4
node_modules/batch/.npmignore
generated
vendored
Normal file
@ -0,0 +1,4 @@
|
||||
support
|
||||
test
|
||||
examples
|
||||
*.sock
|
93
node_modules/batch/History.md
generated
vendored
Normal file
93
node_modules/batch/History.md
generated
vendored
Normal file
@ -0,0 +1,93 @@
|
||||
0.6.1 / 2017-05-16
|
||||
==================
|
||||
|
||||
* fix `process.nextTick` detection in Node.js
|
||||
|
||||
0.6.0 / 2017-03-25
|
||||
==================
|
||||
|
||||
* always invoke end callback asynchronously
|
||||
* fix compatibility with component v1
|
||||
* fix license field
|
||||
|
||||
0.5.3 / 2015-10-01
|
||||
==================
|
||||
|
||||
* fix for browserify
|
||||
|
||||
0.5.2 / 2014-12-22
|
||||
==================
|
||||
|
||||
* add brower field
|
||||
* add license to package.json
|
||||
|
||||
0.5.1 / 2014-06-19
|
||||
==================
|
||||
|
||||
* add repository field to readme (exciting)
|
||||
|
||||
0.5.0 / 2013-07-29
|
||||
==================
|
||||
|
||||
* add `.throws(true)` to opt-in to responding with an array of error objects
|
||||
* make `new` optional
|
||||
|
||||
0.4.0 / 2013-06-05
|
||||
==================
|
||||
|
||||
* add catching of immediate callback errors
|
||||
|
||||
0.3.2 / 2013-03-15
|
||||
==================
|
||||
|
||||
* remove Emitter call in constructor
|
||||
|
||||
0.3.1 / 2013-03-13
|
||||
==================
|
||||
|
||||
* add Emitter() mixin for client. Closes #8
|
||||
|
||||
0.3.0 / 2013-03-13
|
||||
==================
|
||||
|
||||
* add component.json
|
||||
* add result example
|
||||
* add .concurrency support
|
||||
* add concurrency example
|
||||
* add parallel example
|
||||
|
||||
0.2.1 / 2012-11-08
|
||||
==================
|
||||
|
||||
* add .start, .end, and .duration properties
|
||||
* change dependencies to devDependencies
|
||||
|
||||
0.2.0 / 2012-10-04
|
||||
==================
|
||||
|
||||
* add progress events. Closes #5 (__BREAKING CHANGE__)
|
||||
|
||||
0.1.1 / 2012-07-03
|
||||
==================
|
||||
|
||||
* change "complete" event to "progress"
|
||||
|
||||
0.1.0 / 2012-07-03
|
||||
==================
|
||||
|
||||
* add Emitter inheritance and emit "complete" [burcu]
|
||||
|
||||
0.0.3 / 2012-06-02
|
||||
==================
|
||||
|
||||
* Callback results should be in the order of the queued functions.
|
||||
|
||||
0.0.2 / 2012-02-12
|
||||
==================
|
||||
|
||||
* any node
|
||||
|
||||
0.0.1 / 2010-01-03
|
||||
==================
|
||||
|
||||
* Initial release
|
22
node_modules/batch/LICENSE
generated
vendored
Normal file
22
node_modules/batch/LICENSE
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2013 TJ Holowaychuk <tj@vision-media.ca>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
'Software'), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
6
node_modules/batch/Makefile
generated
vendored
Normal file
6
node_modules/batch/Makefile
generated
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
|
||||
test:
|
||||
@./node_modules/.bin/mocha \
|
||||
--require should
|
||||
|
||||
.PHONY: test
|
53
node_modules/batch/Readme.md
generated
vendored
Normal file
53
node_modules/batch/Readme.md
generated
vendored
Normal file
@ -0,0 +1,53 @@
|
||||
|
||||
# batch
|
||||
|
||||
Simple async batch with concurrency control and progress reporting.
|
||||
|
||||
## Installation
|
||||
|
||||
```
|
||||
$ npm install batch
|
||||
```
|
||||
|
||||
## API
|
||||
|
||||
```js
|
||||
var Batch = require('batch')
|
||||
, batch = new Batch;
|
||||
|
||||
batch.concurrency(4);
|
||||
|
||||
ids.forEach(function(id){
|
||||
batch.push(function(done){
|
||||
User.get(id, done);
|
||||
});
|
||||
});
|
||||
|
||||
batch.on('progress', function(e){
|
||||
|
||||
});
|
||||
|
||||
batch.end(function(err, users){
|
||||
|
||||
});
|
||||
```
|
||||
|
||||
### Progress events
|
||||
|
||||
Contain the "job" index, response value, duration information, and completion data.
|
||||
|
||||
```
|
||||
{ index: 1,
|
||||
value: 'bar',
|
||||
pending: 2,
|
||||
total: 3,
|
||||
complete: 2,
|
||||
percent: 66,
|
||||
start: Thu Oct 04 2012 12:25:53 GMT-0700 (PDT),
|
||||
end: Thu Oct 04 2012 12:25:53 GMT-0700 (PDT),
|
||||
duration: 0 }
|
||||
```
|
||||
|
||||
## License
|
||||
|
||||
[MIT](LICENSE)
|
14
node_modules/batch/component.json
generated
vendored
Normal file
14
node_modules/batch/component.json
generated
vendored
Normal file
@ -0,0 +1,14 @@
|
||||
{
|
||||
"name": "batch",
|
||||
"repo": "visionmedia/batch",
|
||||
"description": "Async task batching",
|
||||
"version": "0.6.1",
|
||||
"keywords": ["batch", "async", "utility", "concurrency", "concurrent"],
|
||||
"dependencies": {
|
||||
"component/emitter": "*"
|
||||
},
|
||||
"development": {},
|
||||
"scripts": [
|
||||
"index.js"
|
||||
]
|
||||
}
|
173
node_modules/batch/index.js
generated
vendored
Normal file
173
node_modules/batch/index.js
generated
vendored
Normal file
@ -0,0 +1,173 @@
|
||||
/**
|
||||
* Module dependencies.
|
||||
*/
|
||||
|
||||
try {
|
||||
var EventEmitter = require('events').EventEmitter;
|
||||
if (!EventEmitter) throw new Error();
|
||||
} catch (err) {
|
||||
var Emitter = require('emitter');
|
||||
}
|
||||
|
||||
/**
|
||||
* Defer.
|
||||
*/
|
||||
|
||||
var defer = typeof process !== 'undefined' && process && typeof process.nextTick === 'function'
|
||||
? process.nextTick
|
||||
: function(fn){ setTimeout(fn); };
|
||||
|
||||
/**
|
||||
* Noop.
|
||||
*/
|
||||
|
||||
function noop(){}
|
||||
|
||||
/**
|
||||
* Expose `Batch`.
|
||||
*/
|
||||
|
||||
module.exports = Batch;
|
||||
|
||||
/**
|
||||
* Create a new Batch.
|
||||
*/
|
||||
|
||||
function Batch() {
|
||||
if (!(this instanceof Batch)) return new Batch;
|
||||
this.fns = [];
|
||||
this.concurrency(Infinity);
|
||||
this.throws(true);
|
||||
for (var i = 0, len = arguments.length; i < len; ++i) {
|
||||
this.push(arguments[i]);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Inherit from `EventEmitter.prototype`.
|
||||
*/
|
||||
|
||||
if (EventEmitter) {
|
||||
Batch.prototype.__proto__ = EventEmitter.prototype;
|
||||
} else {
|
||||
Emitter(Batch.prototype);
|
||||
}
|
||||
|
||||
/**
|
||||
* Set concurrency to `n`.
|
||||
*
|
||||
* @param {Number} n
|
||||
* @return {Batch}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
Batch.prototype.concurrency = function(n){
|
||||
this.n = n;
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* Queue a function.
|
||||
*
|
||||
* @param {Function} fn
|
||||
* @return {Batch}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
Batch.prototype.push = function(fn){
|
||||
this.fns.push(fn);
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* Set wether Batch will or will not throw up.
|
||||
*
|
||||
* @param {Boolean} throws
|
||||
* @return {Batch}
|
||||
* @api public
|
||||
*/
|
||||
Batch.prototype.throws = function(throws) {
|
||||
this.e = !!throws;
|
||||
return this;
|
||||
};
|
||||
|
||||
/**
|
||||
* Execute all queued functions in parallel,
|
||||
* executing `cb(err, results)`.
|
||||
*
|
||||
* @param {Function} cb
|
||||
* @return {Batch}
|
||||
* @api public
|
||||
*/
|
||||
|
||||
Batch.prototype.end = function(cb){
|
||||
var self = this
|
||||
, total = this.fns.length
|
||||
, pending = total
|
||||
, results = []
|
||||
, errors = []
|
||||
, cb = cb || noop
|
||||
, fns = this.fns
|
||||
, max = this.n
|
||||
, throws = this.e
|
||||
, index = 0
|
||||
, done;
|
||||
|
||||
// empty
|
||||
if (!fns.length) return defer(function(){
|
||||
cb(null, results);
|
||||
});
|
||||
|
||||
// process
|
||||
function next() {
|
||||
var i = index++;
|
||||
var fn = fns[i];
|
||||
if (!fn) return;
|
||||
var start = new Date;
|
||||
|
||||
try {
|
||||
fn(callback);
|
||||
} catch (err) {
|
||||
callback(err);
|
||||
}
|
||||
|
||||
function callback(err, res){
|
||||
if (done) return;
|
||||
if (err && throws) return done = true, defer(function(){
|
||||
cb(err);
|
||||
});
|
||||
var complete = total - pending + 1;
|
||||
var end = new Date;
|
||||
|
||||
results[i] = res;
|
||||
errors[i] = err;
|
||||
|
||||
self.emit('progress', {
|
||||
index: i,
|
||||
value: res,
|
||||
error: err,
|
||||
pending: pending,
|
||||
total: total,
|
||||
complete: complete,
|
||||
percent: complete / total * 100 | 0,
|
||||
start: start,
|
||||
end: end,
|
||||
duration: end - start
|
||||
});
|
||||
|
||||
if (--pending) next();
|
||||
else defer(function(){
|
||||
if(!throws) cb(errors, results);
|
||||
else cb(null, results);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
// concurrency
|
||||
for (var i = 0; i < fns.length; i++) {
|
||||
if (i == max) break;
|
||||
next();
|
||||
}
|
||||
|
||||
return this;
|
||||
};
|
19
node_modules/batch/package.json
generated
vendored
Normal file
19
node_modules/batch/package.json
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
{
|
||||
"name": "batch",
|
||||
"description": "Simple async batch with concurrency control and progress reporting.",
|
||||
"version": "0.6.1",
|
||||
"author": "TJ Holowaychuk <tj@vision-media.ca>",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"mocha": "*",
|
||||
"should": "*"
|
||||
},
|
||||
"main": "index",
|
||||
"browser": {
|
||||
"emitter": "events"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/visionmedia/batch.git"
|
||||
}
|
||||
}
|
6
node_modules/bcryptjs/.npmignore
generated
vendored
Normal file
6
node_modules/bcryptjs/.npmignore
generated
vendored
Normal file
@ -0,0 +1,6 @@
|
||||
node_modules/
|
||||
npm-debug.log
|
||||
debug.log
|
||||
doco/
|
||||
tests/bench.js
|
||||
*.png
|
18
node_modules/bcryptjs/.travis.yml
generated
vendored
Normal file
18
node_modules/bcryptjs/.travis.yml
generated
vendored
Normal file
@ -0,0 +1,18 @@
|
||||
language: node_js
|
||||
|
||||
node_js:
|
||||
- 0.10
|
||||
- 0.12
|
||||
- 4
|
||||
- 6
|
||||
|
||||
before_script: npm -g install testjs
|
||||
|
||||
env:
|
||||
- CXX=g++-4.8
|
||||
addons:
|
||||
apt:
|
||||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- g++-4.8
|
3
node_modules/bcryptjs/.vscode/settings.json
generated
vendored
Normal file
3
node_modules/bcryptjs/.vscode/settings.json
generated
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"vsicons.presets.angular": false
|
||||
}
|
50
node_modules/bcryptjs/LICENSE
generated
vendored
Normal file
50
node_modules/bcryptjs/LICENSE
generated
vendored
Normal file
@ -0,0 +1,50 @@
|
||||
bcrypt.js
|
||||
---------
|
||||
Copyright (c) 2012 Nevins Bartolomeo <nevins.bartolomeo@gmail.com>
|
||||
Copyright (c) 2012 Shane Girish <shaneGirish@gmail.com>
|
||||
Copyright (c) 2014 Daniel Wirtz <dcode@dcode.io>
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. The name of the author may not be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
isaac.js
|
||||
--------
|
||||
Copyright (c) 2012 Yves-Marie K. Rinquin
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
251
node_modules/bcryptjs/README.md
generated
vendored
Normal file
251
node_modules/bcryptjs/README.md
generated
vendored
Normal file
@ -0,0 +1,251 @@
|
||||
bcrypt.js
|
||||
=========
|
||||
Optimized bcrypt in JavaScript with zero dependencies. Compatible to the C++ [bcrypt](https://npmjs.org/package/bcrypt)
|
||||
binding on node.js and also working in the browser.
|
||||
|
||||
<a href="https://travis-ci.org/dcodeIO/bcrypt.js"><img alt="build static" src="https://travis-ci.org/dcodeIO/bcrypt.js.svg?branch=master" /></a> <a href="https://npmjs.org/package/bcryptjs"><img src="https://img.shields.io/npm/v/bcryptjs.svg" alt=""></a> <a href="https://npmjs.org/package/bcryptjs"><img src="https://img.shields.io/npm/dm/bcryptjs.svg" alt=""></a> <a href="https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=dcode%40dcode.io&item_name=Open%20Source%20Software%20Donation&item_number=dcodeIO%2Fbcrypt.js"><img alt="donate ❤" src="https://img.shields.io/badge/donate-❤-ff2244.svg"></a>
|
||||
|
||||
|
||||
Security considerations
|
||||
-----------------------
|
||||
Besides incorporating a salt to protect against rainbow table attacks, bcrypt is an adaptive function: over time, the
|
||||
iteration count can be increased to make it slower, so it remains resistant to brute-force search attacks even with
|
||||
increasing computation power. ([see](http://en.wikipedia.org/wiki/Bcrypt))
|
||||
|
||||
While bcrypt.js is compatible to the C++ bcrypt binding, it is written in pure JavaScript and thus slower ([about 30%](https://github.com/dcodeIO/bcrypt.js/wiki/Benchmark)), effectively reducing the number of iterations that can be
|
||||
processed in an equal time span.
|
||||
|
||||
The maximum input length is 72 bytes (note that UTF8 encoded characters use up to 4 bytes) and the length of generated
|
||||
hashes is 60 characters.
|
||||
|
||||
Usage
|
||||
-----
|
||||
The library is compatible with CommonJS and AMD loaders and is exposed globally as `dcodeIO.bcrypt` if neither is
|
||||
available.
|
||||
|
||||
### node.js
|
||||
|
||||
On node.js, the inbuilt [crypto module](http://nodejs.org/api/crypto.html)'s randomBytes interface is used to obtain
|
||||
secure random numbers.
|
||||
|
||||
`npm install bcryptjs`
|
||||
|
||||
```js
|
||||
var bcrypt = require('bcryptjs');
|
||||
...
|
||||
```
|
||||
|
||||
### Browser
|
||||
|
||||
In the browser, bcrypt.js relies on [Web Crypto API](http://www.w3.org/TR/WebCryptoAPI)'s getRandomValues
|
||||
interface to obtain secure random numbers. If no cryptographically secure source of randomness is available, you may
|
||||
specify one through [bcrypt.setRandomFallback](https://github.com/dcodeIO/bcrypt.js#setrandomfallbackrandom).
|
||||
|
||||
```js
|
||||
var bcrypt = dcodeIO.bcrypt;
|
||||
...
|
||||
```
|
||||
|
||||
or
|
||||
|
||||
```js
|
||||
require.config({
|
||||
paths: { "bcrypt": "/path/to/bcrypt.js" }
|
||||
});
|
||||
require(["bcrypt"], function(bcrypt) {
|
||||
...
|
||||
});
|
||||
```
|
||||
|
||||
Usage - Sync
|
||||
------------
|
||||
To hash a password:
|
||||
|
||||
```javascript
|
||||
var bcrypt = require('bcryptjs');
|
||||
var salt = bcrypt.genSaltSync(10);
|
||||
var hash = bcrypt.hashSync("B4c0/\/", salt);
|
||||
// Store hash in your password DB.
|
||||
```
|
||||
|
||||
To check a password:
|
||||
|
||||
```javascript
|
||||
// Load hash from your password DB.
|
||||
bcrypt.compareSync("B4c0/\/", hash); // true
|
||||
bcrypt.compareSync("not_bacon", hash); // false
|
||||
```
|
||||
|
||||
Auto-gen a salt and hash:
|
||||
|
||||
```javascript
|
||||
var hash = bcrypt.hashSync('bacon', 8);
|
||||
```
|
||||
|
||||
Usage - Async
|
||||
-------------
|
||||
To hash a password:
|
||||
|
||||
```javascript
|
||||
var bcrypt = require('bcryptjs');
|
||||
bcrypt.genSalt(10, function(err, salt) {
|
||||
bcrypt.hash("B4c0/\/", salt, function(err, hash) {
|
||||
// Store hash in your password DB.
|
||||
});
|
||||
});
|
||||
```
|
||||
|
||||
To check a password:
|
||||
|
||||
```javascript
|
||||
// Load hash from your password DB.
|
||||
bcrypt.compare("B4c0/\/", hash, function(err, res) {
|
||||
// res === true
|
||||
});
|
||||
bcrypt.compare("not_bacon", hash, function(err, res) {
|
||||
// res === false
|
||||
});
|
||||
|
||||
// As of bcryptjs 2.4.0, compare returns a promise if callback is omitted:
|
||||
bcrypt.compare("B4c0/\/", hash).then((res) => {
|
||||
// res === true
|
||||
});
|
||||
```
|
||||
|
||||
Auto-gen a salt and hash:
|
||||
|
||||
```javascript
|
||||
bcrypt.hash('bacon', 8, function(err, hash) {
|
||||
});
|
||||
```
|
||||
|
||||
**Note:** Under the hood, asynchronisation splits a crypto operation into small chunks. After the completion of a chunk, the execution of the next chunk is placed on the back of [JS event loop queue](https://developer.mozilla.org/en/docs/Web/JavaScript/EventLoop), thus efficiently sharing the computational resources with the other operations in the queue.
|
||||
|
||||
API
|
||||
---
|
||||
### setRandomFallback(random)
|
||||
|
||||
Sets the pseudo random number generator to use as a fallback if neither node's `crypto` module nor the Web Crypto
|
||||
API is available. Please note: It is highly important that the PRNG used is cryptographically secure and that it is
|
||||
seeded properly!
|
||||
|
||||
| Parameter | Type | Description
|
||||
|-----------------|-----------------|---------------
|
||||
| random | *function(number):!Array.<number>* | Function taking the number of bytes to generate as its sole argument, returning the corresponding array of cryptographically secure random byte values.
|
||||
| **@see** | | http://nodejs.org/api/crypto.html
|
||||
| **@see** | | http://www.w3.org/TR/WebCryptoAPI/
|
||||
|
||||
**Hint:** You might use [isaac.js](https://github.com/rubycon/isaac.js) as a CSPRNG but you still have to make sure to
|
||||
seed it properly.
|
||||
|
||||
### genSaltSync(rounds=, seed_length=)
|
||||
|
||||
Synchronously generates a salt.
|
||||
|
||||
| Parameter | Type | Description
|
||||
|-----------------|-----------------|---------------
|
||||
| rounds | *number* | Number of rounds to use, defaults to 10 if omitted
|
||||
| seed_length | *number* | Not supported.
|
||||
| **@returns** | *string* | Resulting salt
|
||||
| **@throws** | *Error* | If a random fallback is required but not set
|
||||
|
||||
### genSalt(rounds=, seed_length=, callback)
|
||||
|
||||
Asynchronously generates a salt.
|
||||
|
||||
| Parameter | Type | Description
|
||||
|-----------------|-----------------|---------------
|
||||
| rounds | *number | function(Error, string=)* | Number of rounds to use, defaults to 10 if omitted
|
||||
| seed_length | *number | function(Error, string=)* | Not supported.
|
||||
| callback | *function(Error, string=)* | Callback receiving the error, if any, and the resulting salt
|
||||
| **@returns** | *Promise* | If `callback` has been omitted
|
||||
| **@throws** | *Error* | If `callback` is present but not a function
|
||||
|
||||
### hashSync(s, salt=)
|
||||
|
||||
Synchronously generates a hash for the given string.
|
||||
|
||||
| Parameter | Type | Description
|
||||
|-----------------|-----------------|---------------
|
||||
| s | *string* | String to hash
|
||||
| salt | *number | string* | Salt length to generate or salt to use, default to 10
|
||||
| **@returns** | *string* | Resulting hash
|
||||
|
||||
### hash(s, salt, callback, progressCallback=)
|
||||
|
||||
Asynchronously generates a hash for the given string.
|
||||
|
||||
| Parameter | Type | Description
|
||||
|-----------------|-----------------|---------------
|
||||
| s | *string* | String to hash
|
||||
| salt | *number | string* | Salt length to generate or salt to use
|
||||
| callback | *function(Error, string=)* | Callback receiving the error, if any, and the resulting hash
|
||||
| progressCallback | *function(number)* | Callback successively called with the percentage of rounds completed (0.0 - 1.0), maximally once per `MAX_EXECUTION_TIME = 100` ms.
|
||||
| **@returns** | *Promise* | If `callback` has been omitted
|
||||
| **@throws** | *Error* | If `callback` is present but not a function
|
||||
|
||||
### compareSync(s, hash)
|
||||
|
||||
Synchronously tests a string against a hash.
|
||||
|
||||
| Parameter | Type | Description
|
||||
|-----------------|-----------------|---------------
|
||||
| s | *string* | String to compare
|
||||
| hash | *string* | Hash to test against
|
||||
| **@returns** | *boolean* | true if matching, otherwise false
|
||||
| **@throws** | *Error* | If an argument is illegal
|
||||
|
||||
### compare(s, hash, callback, progressCallback=)
|
||||
|
||||
Asynchronously compares the given data against the given hash.
|
||||
|
||||
| Parameter | Type | Description
|
||||
|-----------------|-----------------|---------------
|
||||
| s | *string* | Data to compare
|
||||
| hash | *string* | Data to be compared to
|
||||
| callback | *function(Error, boolean)* | Callback receiving the error, if any, otherwise the result
|
||||
| progressCallback | *function(number)* | Callback successively called with the percentage of rounds completed (0.0 - 1.0), maximally once per `MAX_EXECUTION_TIME = 100` ms.
|
||||
| **@returns** | *Promise* | If `callback` has been omitted
|
||||
| **@throws** | *Error* | If `callback` is present but not a function
|
||||
|
||||
### getRounds(hash)
|
||||
|
||||
Gets the number of rounds used to encrypt the specified hash.
|
||||
|
||||
| Parameter | Type | Description
|
||||
|-----------------|-----------------|---------------
|
||||
| hash | *string* | Hash to extract the used number of rounds from
|
||||
| **@returns** | *number* | Number of rounds used
|
||||
| **@throws** | *Error* | If `hash` is not a string
|
||||
|
||||
### getSalt(hash)
|
||||
|
||||
Gets the salt portion from a hash. Does not validate the hash.
|
||||
|
||||
| Parameter | Type | Description
|
||||
|-----------------|-----------------|---------------
|
||||
| hash | *string* | Hash to extract the salt from
|
||||
| **@returns** | *string* | Extracted salt part
|
||||
| **@throws** | *Error* | If `hash` is not a string or otherwise invalid
|
||||
|
||||
|
||||
Command line
|
||||
------------
|
||||
`Usage: bcrypt <input> [salt]`
|
||||
|
||||
If the input has spaces inside, simply surround it with quotes.
|
||||
|
||||
Downloads
|
||||
---------
|
||||
* [Distributions](https://github.com/dcodeIO/bcrypt.js/tree/master/dist)
|
||||
* [ZIP-Archive](https://github.com/dcodeIO/bcrypt.js/archive/master.zip)
|
||||
* [Tarball](https://github.com/dcodeIO/bcrypt.js/tarball/master)
|
||||
|
||||
Credits
|
||||
-------
|
||||
Based on work started by Shane Girish at [bcrypt-nodejs](https://github.com/shaneGirish/bcrypt-nodejs) (MIT-licensed),
|
||||
which is itself based on [javascript-bcrypt](http://code.google.com/p/javascript-bcrypt/) (New BSD-licensed).
|
||||
|
||||
License
|
||||
-------
|
||||
New-BSD / MIT ([see](https://github.com/dcodeIO/bcrypt.js/blob/master/LICENSE))
|
25
node_modules/bcryptjs/bin/bcrypt
generated
vendored
Normal file
25
node_modules/bcryptjs/bin/bcrypt
generated
vendored
Normal file
@ -0,0 +1,25 @@
|
||||
#!/usr/bin/env node
|
||||
|
||||
var path = require("path"),
|
||||
bcrypt = require(path.join(__dirname, '..', 'index.js')),
|
||||
pkg = require(path.join(__dirname, '..', 'package.json'));
|
||||
|
||||
if (process.argv.length < 3) {
|
||||
process.stderr.write([ // No dependencies, so we do it from hand.
|
||||
"",
|
||||
" |_ _ _ _ |_",
|
||||
" |_)(_| \\/|_)|_ v"+pkg['version']+" (c) "+pkg['author'],
|
||||
" / | "
|
||||
].join('\n')+'\n\n'+" Usage: "+path.basename(process.argv[1])+" <input> [rounds|salt]\n");
|
||||
process.exit(1);
|
||||
} else {
|
||||
var salt;
|
||||
if (process.argv.length > 3) {
|
||||
salt = process.argv[3];
|
||||
var rounds = parseInt(salt, 10);
|
||||
if (rounds == salt)
|
||||
salt = bcrypt.genSaltSync(rounds);
|
||||
} else
|
||||
salt = bcrypt.genSaltSync();
|
||||
process.stdout.write(bcrypt.hashSync(process.argv[2], salt)+"\n");
|
||||
}
|
22
node_modules/bcryptjs/bower.json
generated
vendored
Normal file
22
node_modules/bcryptjs/bower.json
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
{
|
||||
"name": "bcryptjs",
|
||||
"description": "Optimized bcrypt in plain JavaScript with zero dependencies.",
|
||||
"version": "2.4.3",
|
||||
"main": "dist/bcrypt.min.js",
|
||||
"license": "New-BSD",
|
||||
"homepage": "http://dcode.io/",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git://github.com/dcodeIO/bcrypt.js.git"
|
||||
},
|
||||
"keywords": ["bcrypt", "password", "auth", "authentication", "encryption", "crypt", "crypto"],
|
||||
"dependencies": {},
|
||||
"devDependencies": {},
|
||||
"ignore": [
|
||||
"**/.*",
|
||||
"node_modules",
|
||||
"bower_components",
|
||||
"test",
|
||||
"tests"
|
||||
]
|
||||
}
|
15
node_modules/bcryptjs/dist/README.md
generated
vendored
Normal file
15
node_modules/bcryptjs/dist/README.md
generated
vendored
Normal file
@ -0,0 +1,15 @@
|
||||
Distributions
|
||||
=============
|
||||
bcrypt.js is available as the following distributions:
|
||||
|
||||
* **[bcrypt.js](https://github.com/dcodeIO/bcrypt.js/blob/master/dist/bcrypt.js)**
|
||||
contains the commented source code.
|
||||
|
||||
* **[bcrypt.min.js](https://github.com/dcodeIO/bcrypt.js/blob/master/dist/bcrypt.min.js)**
|
||||
has been compiled with Closure Compiler using advanced optimizations.
|
||||
|
||||
* **[bcrypt.min.map](https://github.com/dcodeIO/bcrypt.js/blob/master/dist/bcrypt.min.map)**
|
||||
contains the source map generated by Closure Compiler.
|
||||
|
||||
* **[bcrypt.min.js.gz](https://github.com/dcodeIO/bcrypt.js/blob/master/dist/bcrypt.min.js.gz)**
|
||||
has also been gzipped using `-9`.
|
1379
node_modules/bcryptjs/dist/bcrypt.js
generated
vendored
Normal file
1379
node_modules/bcryptjs/dist/bcrypt.js
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
48
node_modules/bcryptjs/dist/bcrypt.min.js
generated
vendored
Normal file
48
node_modules/bcryptjs/dist/bcrypt.min.js
generated
vendored
Normal file
@ -0,0 +1,48 @@
|
||||
/*
|
||||
bcrypt.js (c) 2013 Daniel Wirtz <dcode@dcode.io>
|
||||
Released under the Apache License, Version 2.0
|
||||
see: https://github.com/dcodeIO/bcrypt.js for details
|
||||
*/
|
||||
(function(u,r){"function"===typeof define&&define.amd?define([],r):"function"===typeof require&&"object"===typeof module&&module&&module.exports?module.exports=r():(u.dcodeIO=u.dcodeIO||{}).bcrypt=r()})(this,function(){function u(e){if("undefined"!==typeof module&&module&&module.exports)try{return require("crypto").randomBytes(e)}catch(d){}try{var c;(self.crypto||self.msCrypto).getRandomValues(c=new Uint32Array(e));return Array.prototype.slice.call(c)}catch(b){}if(!w)throw Error("Neither WebCryptoAPI nor a crypto module is available. Use bcrypt.setRandomFallback to set an alternative");
|
||||
return w(e)}function r(e,d){for(var c=0,b=0,a=0,f=e.length;a<f;++a)e.charCodeAt(a)===d.charCodeAt(a)?++c:++b;return 0>c?!1:0===b}function H(e){var d=[],c=0;I.encodeUTF16toUTF8(function(){return c>=e.length?null:e.charCodeAt(c++)},function(b){d.push(b)});return d}function x(e,d){var c=0,b=[],a,f;if(0>=d||d>e.length)throw Error("Illegal len: "+d);for(;c<d;){a=e[c++]&255;b.push(s[a>>2&63]);a=(a&3)<<4;if(c>=d){b.push(s[a&63]);break}f=e[c++]&255;a|=f>>4&15;b.push(s[a&63]);a=(f&15)<<2;if(c>=d){b.push(s[a&
|
||||
63]);break}f=e[c++]&255;a|=f>>6&3;b.push(s[a&63]);b.push(s[f&63])}return b.join("")}function B(e,d){var c=0,b=e.length,a=0,f=[],g,m,h;if(0>=d)throw Error("Illegal len: "+d);for(;c<b-1&&a<d;){h=e.charCodeAt(c++);g=h<q.length?q[h]:-1;h=e.charCodeAt(c++);m=h<q.length?q[h]:-1;if(-1==g||-1==m)break;h=g<<2>>>0;h|=(m&48)>>4;f.push(z(h));if(++a>=d||c>=b)break;h=e.charCodeAt(c++);g=h<q.length?q[h]:-1;if(-1==g)break;h=(m&15)<<4>>>0;h|=(g&60)>>2;f.push(z(h));if(++a>=d||c>=b)break;h=e.charCodeAt(c++);m=h<q.length?
|
||||
q[h]:-1;h=(g&3)<<6>>>0;h|=m;f.push(z(h));++a}b=[];for(c=0;c<a;c++)b.push(f[c].charCodeAt(0));return b}function v(e,d,c,b){var a,f=e[d],g=e[d+1],f=f^c[0];a=b[f>>>24];a+=b[256|f>>16&255];a^=b[512|f>>8&255];a+=b[768|f&255];g=g^a^c[1];a=b[g>>>24];a+=b[256|g>>16&255];a^=b[512|g>>8&255];a+=b[768|g&255];f=f^a^c[2];a=b[f>>>24];a+=b[256|f>>16&255];a^=b[512|f>>8&255];a+=b[768|f&255];g=g^a^c[3];a=b[g>>>24];a+=b[256|g>>16&255];a^=b[512|g>>8&255];a+=b[768|g&255];f=f^a^c[4];a=b[f>>>24];a+=b[256|f>>16&255];a^=b[512|
|
||||
f>>8&255];a+=b[768|f&255];g=g^a^c[5];a=b[g>>>24];a+=b[256|g>>16&255];a^=b[512|g>>8&255];a+=b[768|g&255];f=f^a^c[6];a=b[f>>>24];a+=b[256|f>>16&255];a^=b[512|f>>8&255];a+=b[768|f&255];g=g^a^c[7];a=b[g>>>24];a+=b[256|g>>16&255];a^=b[512|g>>8&255];a+=b[768|g&255];f=f^a^c[8];a=b[f>>>24];a+=b[256|f>>16&255];a^=b[512|f>>8&255];a+=b[768|f&255];g=g^a^c[9];a=b[g>>>24];a+=b[256|g>>16&255];a^=b[512|g>>8&255];a+=b[768|g&255];f=f^a^c[10];a=b[f>>>24];a+=b[256|f>>16&255];a^=b[512|f>>8&255];a+=b[768|f&255];g=g^a^
|
||||
c[11];a=b[g>>>24];a+=b[256|g>>16&255];a^=b[512|g>>8&255];a+=b[768|g&255];f=f^a^c[12];a=b[f>>>24];a+=b[256|f>>16&255];a^=b[512|f>>8&255];a+=b[768|f&255];g=g^a^c[13];a=b[g>>>24];a+=b[256|g>>16&255];a^=b[512|g>>8&255];a+=b[768|g&255];f=f^a^c[14];a=b[f>>>24];a+=b[256|f>>16&255];a^=b[512|f>>8&255];a+=b[768|f&255];g=g^a^c[15];a=b[g>>>24];a+=b[256|g>>16&255];a^=b[512|g>>8&255];a+=b[768|g&255];f=f^a^c[16];e[d]=g^c[17];e[d+1]=f;return e}function t(e,d){for(var c=0,b=0;4>c;++c)b=b<<8|e[d]&255,d=(d+1)%e.length;
|
||||
return{key:b,offp:d}}function C(e,d,c){for(var b=0,a=[0,0],f=d.length,g=c.length,m,h=0;h<f;h++)m=t(e,b),b=m.offp,d[h]^=m.key;for(h=0;h<f;h+=2)a=v(a,0,d,c),d[h]=a[0],d[h+1]=a[1];for(h=0;h<g;h+=2)a=v(a,0,d,c),c[h]=a[0],c[h+1]=a[1]}function J(e,d,c,b){for(var a=0,f=[0,0],g=c.length,m=b.length,h,l=0;l<g;l++)h=t(d,a),a=h.offp,c[l]^=h.key;for(l=a=0;l<g;l+=2)h=t(e,a),a=h.offp,f[0]^=h.key,h=t(e,a),a=h.offp,f[1]^=h.key,f=v(f,0,c,b),c[l]=f[0],c[l+1]=f[1];for(l=0;l<m;l+=2)h=t(e,a),a=h.offp,f[0]^=h.key,h=t(e,
|
||||
a),a=h.offp,f[1]^=h.key,f=v(f,0,c,b),b[l]=f[0],b[l+1]=f[1]}function D(e,d,c,b,a){function f(){a&&a(n/c);if(n<c)for(var h=Date.now();n<c&&!(n+=1,C(e,l,k),C(d,l,k),100<Date.now()-h););else{for(n=0;64>n;n++)for(y=0;y<m>>1;y++)v(g,y<<1,l,k);h=[];for(n=0;n<m;n++)h.push((g[n]>>24&255)>>>0),h.push((g[n]>>16&255)>>>0),h.push((g[n]>>8&255)>>>0),h.push((g[n]&255)>>>0);if(b){b(null,h);return}return h}b&&p(f)}var g=E.slice(),m=g.length,h;if(4>c||31<c){h=Error("Illegal number of rounds (4-31): "+c);if(b){p(b.bind(this,
|
||||
h));return}throw h;}if(16!==d.length){h=Error("Illegal salt length: "+d.length+" != 16");if(b){p(b.bind(this,h));return}throw h;}c=1<<c>>>0;var l,k,n=0,y;Int32Array?(l=new Int32Array(F),k=new Int32Array(G)):(l=F.slice(),k=G.slice());J(d,e,l,k);if("undefined"!==typeof b)f();else for(;;)if("undefined"!==typeof(h=f()))return h||[]}function A(e,d,c,b){function a(a){var b=[];b.push("$2");"a"<=f&&b.push(f);b.push("$");10>l&&b.push("0");b.push(l.toString());b.push("$");b.push(x(k,k.length));b.push(x(a,4*
|
||||
E.length-1));return b.join("")}if("string"!==typeof e||"string"!==typeof d){b=Error("Invalid string / salt: Not a string");if(c){p(c.bind(this,b));return}throw b;}var f,g;if("$"!==d.charAt(0)||"2"!==d.charAt(1)){b=Error("Invalid salt version: "+d.substring(0,2));if(c){p(c.bind(this,b));return}throw b;}if("$"===d.charAt(2))f=String.fromCharCode(0),g=3;else{f=d.charAt(2);if("a"!==f&&"b"!==f&&"y"!==f||"$"!==d.charAt(3)){b=Error("Invalid salt revision: "+d.substring(2,4));if(c){p(c.bind(this,b));return}throw b;
|
||||
}g=4}if("$"<d.charAt(g+2)){b=Error("Missing salt rounds");if(c){p(c.bind(this,b));return}throw b;}var m=10*parseInt(d.substring(g,g+1),10),h=parseInt(d.substring(g+1,g+2),10),l=m+h;d=d.substring(g+3,g+25);e=H(e+("a"<=f?"\x00":""));var k=B(d,16);if("undefined"==typeof c)return a(D(e,k,l));D(e,k,l,function(b,d){b?c(b,null):c(null,a(d))},b)}var k={},w=null;try{u(1)}catch(K){}w=null;k.setRandomFallback=function(e){w=e};k.genSaltSync=function(e,d){e=e||10;if("number"!==typeof e)throw Error("Illegal arguments: "+
|
||||
typeof e+", "+typeof d);4>e?e=4:31<e&&(e=31);var c=[];c.push("$2a$");10>e&&c.push("0");c.push(e.toString());c.push("$");c.push(x(u(16),16));return c.join("")};k.genSalt=function(e,d,c){function b(a){p(function(){try{a(null,k.genSaltSync(e))}catch(b){a(b)}})}"function"===typeof d&&(c=d,d=void 0);"function"===typeof e&&(c=e,e=void 0);if("undefined"===typeof e)e=10;else if("number"!==typeof e)throw Error("illegal arguments: "+typeof e);if(c){if("function"!==typeof c)throw Error("Illegal callback: "+
|
||||
typeof c);b(c)}else return new Promise(function(a,c){b(function(b,d){b?c(b):a(d)})})};k.hashSync=function(e,d){"undefined"===typeof d&&(d=10);"number"===typeof d&&(d=k.genSaltSync(d));if("string"!==typeof e||"string"!==typeof d)throw Error("Illegal arguments: "+typeof e+", "+typeof d);return A(e,d)};k.hash=function(e,d,c,b){function a(a){"string"===typeof e&&"number"===typeof d?k.genSalt(d,function(c,d){A(e,d,a,b)}):"string"===typeof e&&"string"===typeof d?A(e,d,a,b):p(a.bind(this,Error("Illegal arguments: "+
|
||||
typeof e+", "+typeof d)))}if(c){if("function"!==typeof c)throw Error("Illegal callback: "+typeof c);a(c)}else return new Promise(function(b,c){a(function(a,d){a?c(a):b(d)})})};k.compareSync=function(e,d){if("string"!==typeof e||"string"!==typeof d)throw Error("Illegal arguments: "+typeof e+", "+typeof d);return 60!==d.length?!1:r(k.hashSync(e,d.substr(0,d.length-31)),d)};k.compare=function(e,d,c,b){function a(a){"string"!==typeof e||"string"!==typeof d?p(a.bind(this,Error("Illegal arguments: "+typeof e+
|
||||
", "+typeof d))):60!==d.length?p(a.bind(this,null,!1)):k.hash(e,d.substr(0,29),function(b,c){b?a(b):a(null,r(c,d))},b)}if(c){if("function"!==typeof c)throw Error("Illegal callback: "+typeof c);a(c)}else return new Promise(function(b,c){a(function(a,d){a?c(a):b(d)})})};k.getRounds=function(e){if("string"!==typeof e)throw Error("Illegal arguments: "+typeof e);return parseInt(e.split("$")[2],10)};k.getSalt=function(e){if("string"!==typeof e)throw Error("Illegal arguments: "+typeof e);if(60!==e.length)throw Error("Illegal hash length: "+
|
||||
e.length+" != 60");return e.substring(0,29)};var p="undefined"!==typeof process&&process&&"function"===typeof process.nextTick?"function"===typeof setImmediate?setImmediate:process.nextTick:setTimeout,s="./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789".split(""),q=[-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,0,1,54,55,56,57,58,59,60,61,62,63,-1,-1,-1,-1,-1,-1,-1,2,3,4,5,6,7,8,9,10,11,12,
|
||||
13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,-1,-1,-1,-1,-1,-1,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,-1,-1,-1,-1,-1],z=String.fromCharCode,I=function(){var e={MAX_CODEPOINT:1114111,encodeUTF8:function(d,c){var b=null;"number"===typeof d&&(b=d,d=function(){return null});for(;null!==b||null!==(b=d());)128>b?c(b&127):(2048>b?c(b>>6&31|192):(65536>b?c(b>>12&15|224):(c(b>>18&7|240),c(b>>12&63|128)),c(b>>6&63|128)),c(b&63|128)),b=null},decodeUTF8:function(d,c){for(var b,
|
||||
a,f,e,k=function(a){a=a.slice(0,a.indexOf(null));var b=Error(a.toString());b.name="TruncatedError";b.bytes=a;throw b;};null!==(b=d());)if(0===(b&128))c(b);else if(192===(b&224))null===(a=d())&&k([b,a]),c((b&31)<<6|a&63);else if(224===(b&240))null!==(a=d())&&null!==(f=d())||k([b,a,f]),c((b&15)<<12|(a&63)<<6|f&63);else if(240===(b&248))null!==(a=d())&&null!==(f=d())&&null!==(e=d())||k([b,a,f,e]),c((b&7)<<18|(a&63)<<12|(f&63)<<6|e&63);else throw RangeError("Illegal starting byte: "+b);},UTF16toUTF8:function(d,
|
||||
c){for(var b,a=null;null!==(b=null!==a?a:d());)55296<=b&&57343>=b&&null!==(a=d())&&56320<=a&&57343>=a?(c(1024*(b-55296)+a-56320+65536),a=null):c(b);null!==a&&c(a)},UTF8toUTF16:function(d,c){var b=null;"number"===typeof d&&(b=d,d=function(){return null});for(;null!==b||null!==(b=d());)65535>=b?c(b):(b-=65536,c((b>>10)+55296),c(b%1024+56320)),b=null},encodeUTF16toUTF8:function(d,c){e.UTF16toUTF8(d,function(b){e.encodeUTF8(b,c)})},decodeUTF8toUTF16:function(d,c){e.decodeUTF8(d,function(b){e.UTF8toUTF16(b,
|
||||
c)})},calculateCodePoint:function(d){return 128>d?1:2048>d?2:65536>d?3:4},calculateUTF8:function(d){for(var c,b=0;null!==(c=d());)b+=e.calculateCodePoint(c);return b},calculateUTF16asUTF8:function(d){var c=0,b=0;e.UTF16toUTF8(d,function(a){++c;b+=e.calculateCodePoint(a)});return[c,b]}};return e}();Date.now=Date.now||function(){return+new Date};var F=[608135816,2242054355,320440878,57701188,2752067618,698298832,137296536,3964562569,1160258022,953160567,3193202383,887688300,3232508343,3380367581,1065670069,
|
||||
3041331479,2450970073,2306472731],G=[3509652390,2564797868,805139163,3491422135,3101798381,1780907670,3128725573,4046225305,614570311,3012652279,134345442,2240740374,1667834072,1901547113,2757295779,4103290238,227898511,1921955416,1904987480,2182433518,2069144605,3260701109,2620446009,720527379,3318853667,677414384,3393288472,3101374703,2390351024,1614419982,1822297739,2954791486,3608508353,3174124327,2024746970,1432378464,3864339955,2857741204,1464375394,1676153920,1439316330,715854006,3033291828,
|
||||
289532110,2706671279,2087905683,3018724369,1668267050,732546397,1947742710,3462151702,2609353502,2950085171,1814351708,2050118529,680887927,999245976,1800124847,3300911131,1713906067,1641548236,4213287313,1216130144,1575780402,4018429277,3917837745,3693486850,3949271944,596196993,3549867205,258830323,2213823033,772490370,2760122372,1774776394,2652871518,566650946,4142492826,1728879713,2882767088,1783734482,3629395816,2517608232,2874225571,1861159788,326777828,3124490320,2130389656,2716951837,967770486,
|
||||
1724537150,2185432712,2364442137,1164943284,2105845187,998989502,3765401048,2244026483,1075463327,1455516326,1322494562,910128902,469688178,1117454909,936433444,3490320968,3675253459,1240580251,122909385,2157517691,634681816,4142456567,3825094682,3061402683,2540495037,79693498,3249098678,1084186820,1583128258,426386531,1761308591,1047286709,322548459,995290223,1845252383,2603652396,3431023940,2942221577,3202600964,3727903485,1712269319,422464435,3234572375,1170764815,3523960633,3117677531,1434042557,
|
||||
442511882,3600875718,1076654713,1738483198,4213154764,2393238008,3677496056,1014306527,4251020053,793779912,2902807211,842905082,4246964064,1395751752,1040244610,2656851899,3396308128,445077038,3742853595,3577915638,679411651,2892444358,2354009459,1767581616,3150600392,3791627101,3102740896,284835224,4246832056,1258075500,768725851,2589189241,3069724005,3532540348,1274779536,3789419226,2764799539,1660621633,3471099624,4011903706,913787905,3497959166,737222580,2514213453,2928710040,3937242737,1804850592,
|
||||
3499020752,2949064160,2386320175,2390070455,2415321851,4061277028,2290661394,2416832540,1336762016,1754252060,3520065937,3014181293,791618072,3188594551,3933548030,2332172193,3852520463,3043980520,413987798,3465142937,3030929376,4245938359,2093235073,3534596313,375366246,2157278981,2479649556,555357303,3870105701,2008414854,3344188149,4221384143,3956125452,2067696032,3594591187,2921233993,2428461,544322398,577241275,1471733935,610547355,4027169054,1432588573,1507829418,2025931657,3646575487,545086370,
|
||||
48609733,2200306550,1653985193,298326376,1316178497,3007786442,2064951626,458293330,2589141269,3591329599,3164325604,727753846,2179363840,146436021,1461446943,4069977195,705550613,3059967265,3887724982,4281599278,3313849956,1404054877,2845806497,146425753,1854211946,1266315497,3048417604,3681880366,3289982499,290971E4,1235738493,2632868024,2414719590,3970600049,1771706367,1449415276,3266420449,422970021,1963543593,2690192192,3826793022,1062508698,1531092325,1804592342,2583117782,2714934279,4024971509,
|
||||
1294809318,4028980673,1289560198,2221992742,1669523910,35572830,157838143,1052438473,1016535060,1802137761,1753167236,1386275462,3080475397,2857371447,1040679964,2145300060,2390574316,1461121720,2956646967,4031777805,4028374788,33600511,2920084762,1018524850,629373528,3691585981,3515945977,2091462646,2486323059,586499841,988145025,935516892,3367335476,2599673255,2839830854,265290510,3972581182,2759138881,3795373465,1005194799,847297441,406762289,1314163512,1332590856,1866599683,4127851711,750260880,
|
||||
613907577,1450815602,3165620655,3734664991,3650291728,3012275730,3704569646,1427272223,778793252,1343938022,2676280711,2052605720,1946737175,3164576444,3914038668,3967478842,3682934266,1661551462,3294938066,4011595847,840292616,3712170807,616741398,312560963,711312465,1351876610,322626781,1910503582,271666773,2175563734,1594956187,70604529,3617834859,1007753275,1495573769,4069517037,2549218298,2663038764,504708206,2263041392,3941167025,2249088522,1514023603,1998579484,1312622330,694541497,2582060303,
|
||||
2151582166,1382467621,776784248,2618340202,3323268794,2497899128,2784771155,503983604,4076293799,907881277,423175695,432175456,1378068232,4145222326,3954048622,3938656102,3820766613,2793130115,2977904593,26017576,3274890735,3194772133,1700274565,1756076034,4006520079,3677328699,720338349,1533947780,354530856,688349552,3973924725,1637815568,332179504,3949051286,53804574,2852348879,3044236432,1282449977,3583942155,3416972820,4006381244,1617046695,2628476075,3002303598,1686838959,431878346,2686675385,
|
||||
1700445008,1080580658,1009431731,832498133,3223435511,2605976345,2271191193,2516031870,1648197032,4164389018,2548247927,300782431,375919233,238389289,3353747414,2531188641,2019080857,1475708069,455242339,2609103871,448939670,3451063019,1395535956,2413381860,1841049896,1491858159,885456874,4264095073,4001119347,1565136089,3898914787,1108368660,540939232,1173283510,2745871338,3681308437,4207628240,3343053890,4016749493,1699691293,1103962373,3625875870,2256883143,3830138730,1031889488,3479347698,1535977030,
|
||||
4236805024,3251091107,2132092099,1774941330,1199868427,1452454533,157007616,2904115357,342012276,595725824,1480756522,206960106,497939518,591360097,863170706,2375253569,3596610801,1814182875,2094937945,3421402208,1082520231,3463918190,2785509508,435703966,3908032597,1641649973,2842273706,3305899714,1510255612,2148256476,2655287854,3276092548,4258621189,236887753,3681803219,274041037,1734335097,3815195456,3317970021,1899903192,1026095262,4050517792,356393447,2410691914,3873677099,3682840055,3913112168,
|
||||
2491498743,4132185628,2489919796,1091903735,1979897079,3170134830,3567386728,3557303409,857797738,1136121015,1342202287,507115054,2535736646,337727348,3213592640,1301675037,2528481711,1895095763,1721773893,3216771564,62756741,2142006736,835421444,2531993523,1442658625,3659876326,2882144922,676362277,1392781812,170690266,3921047035,1759253602,3611846912,1745797284,664899054,1329594018,3901205900,3045908486,2062866102,2865634940,3543621612,3464012697,1080764994,553557557,3656615353,3996768171,991055499,
|
||||
499776247,1265440854,648242737,3940784050,980351604,3713745714,1749149687,3396870395,4211799374,3640570775,1161844396,3125318951,1431517754,545492359,4268468663,3499529547,1437099964,2702547544,3433638243,2581715763,2787789398,1060185593,1593081372,2418618748,4260947970,69676912,2159744348,86519011,2512459080,3838209314,1220612927,3339683548,133810670,1090789135,1078426020,1569222167,845107691,3583754449,4072456591,1091646820,628848692,1613405280,3757631651,526609435,236106946,48312990,2942717905,
|
||||
3402727701,1797494240,859738849,992217954,4005476642,2243076622,3870952857,3732016268,765654824,3490871365,2511836413,1685915746,3888969200,1414112111,2273134842,3281911079,4080962846,172450625,2569994100,980381355,4109958455,2819808352,2716589560,2568741196,3681446669,3329971472,1835478071,660984891,3704678404,4045999559,3422617507,3040415634,1762651403,1719377915,3470491036,2693910283,3642056355,3138596744,1364962596,2073328063,1983633131,926494387,3423689081,2150032023,4096667949,1749200295,3328846651,
|
||||
309677260,2016342300,1779581495,3079819751,111262694,1274766160,443224088,298511866,1025883608,3806446537,1145181785,168956806,3641502830,3584813610,1689216846,3666258015,3200248200,1692713982,2646376535,4042768518,1618508792,1610833997,3523052358,4130873264,2001055236,3610705100,2202168115,4028541809,2961195399,1006657119,2006996926,3186142756,1430667929,3210227297,1314452623,4074634658,4101304120,2273951170,1399257539,3367210612,3027628629,1190975929,2062231137,2333990788,2221543033,2438960610,
|
||||
1181637006,548689776,2362791313,3372408396,3104550113,3145860560,296247880,1970579870,3078560182,3769228297,1714227617,3291629107,3898220290,166772364,1251581989,493813264,448347421,195405023,2709975567,677966185,3703036547,1463355134,2715995803,1338867538,1343315457,2802222074,2684532164,233230375,2599980071,2000651841,3277868038,1638401717,4028070440,3237316320,6314154,819756386,300326615,590932579,1405279636,3267499572,3150704214,2428286686,3959192993,3461946742,1862657033,1266418056,963775037,
|
||||
2089974820,2263052895,1917689273,448879540,3550394620,3981727096,150775221,3627908307,1303187396,508620638,2975983352,2726630617,1817252668,1876281319,1457606340,908771278,3720792119,3617206836,2455994898,1729034894,1080033504,976866871,3556439503,2881648439,1522871579,1555064734,1336096578,3548522304,2579274686,3574697629,3205460757,3593280638,3338716283,3079412587,564236357,2993598910,1781952180,1464380207,3163844217,3332601554,1699332808,1393555694,1183702653,3581086237,1288719814,691649499,2847557200,
|
||||
2895455976,3193889540,2717570544,1781354906,1676643554,2592534050,3230253752,1126444790,2770207658,2633158820,2210423226,2615765581,2414155088,3127139286,673620729,2805611233,1269405062,4015350505,3341807571,4149409754,1057255273,2012875353,2162469141,2276492801,2601117357,993977747,3918593370,2654263191,753973209,36408145,2530585658,25011837,3520020182,2088578344,530523599,2918365339,1524020338,1518925132,3760827505,3759777254,1202760957,3985898139,3906192525,674977740,4174734889,2031300136,2019492241,
|
||||
3983892565,4153806404,3822280332,352677332,2297720250,60907813,90501309,3286998549,1016092578,2535922412,2839152426,457141659,509813237,4120667899,652014361,1966332200,2975202805,55981186,2327461051,676427537,3255491064,2882294119,3433927263,1307055953,942726286,933058658,2468411793,3933900994,4215176142,1361170020,2001714738,2830558078,3274259782,1222529897,1679025792,2729314320,3714953764,1770335741,151462246,3013232138,1682292957,1483529935,471910574,1539241949,458788160,3436315007,1807016891,
|
||||
3718408830,978976581,1043663428,3165965781,1927990952,4200891579,2372276910,3208408903,3533431907,1412390302,2931980059,4132332400,1947078029,3881505623,4168226417,2941484381,1077988104,1320477388,886195818,18198404,3786409E3,2509781533,112762804,3463356488,1866414978,891333506,18488651,661792760,1628790961,3885187036,3141171499,876946877,2693282273,1372485963,791857591,2686433993,3759982718,3167212022,3472953795,2716379847,445679433,3561995674,3504004811,3574258232,54117162,3331405415,2381918588,
|
||||
3769707343,4154350007,1140177722,4074052095,668550556,3214352940,367459370,261225585,2610173221,4209349473,3468074219,3265815641,314222801,3066103646,3808782860,282218597,3406013506,3773591054,379116347,1285071038,846784868,2669647154,3771962079,3550491691,2305946142,453669953,1268987020,3317592352,3279303384,3744833421,2610507566,3859509063,266596637,3847019092,517658769,3462560207,3443424879,370717030,4247526661,2224018117,4143653529,4112773975,2788324899,2477274417,1456262402,2901442914,1517677493,
|
||||
1846949527,2295493580,3734397586,2176403920,1280348187,1908823572,3871786941,846861322,1172426758,3287448474,3383383037,1655181056,3139813346,901632758,1897031941,2986607138,3066810236,3447102507,1393639104,373351379,950779232,625454576,3124240540,4148612726,2007998917,544563296,2244738638,2330496472,2058025392,1291430526,424198748,50039436,29584100,3605783033,2429876329,2791104160,1057563949,3255363231,3075367218,3463963227,1469046755,985887462],E=[1332899944,1700884034,1701343084,1684370003,1668446532,
|
||||
1869963892];k.encodeBase64=x;k.decodeBase64=B;return k});
|
BIN
node_modules/bcryptjs/dist/bcrypt.min.js.gz
generated
vendored
Normal file
BIN
node_modules/bcryptjs/dist/bcrypt.min.js.gz
generated
vendored
Normal file
Binary file not shown.
8
node_modules/bcryptjs/dist/bcrypt.min.map
generated
vendored
Normal file
8
node_modules/bcryptjs/dist/bcrypt.min.map
generated
vendored
Normal file
File diff suppressed because one or more lines are too long
91
node_modules/bcryptjs/externs/bcrypt.js
generated
vendored
Normal file
91
node_modules/bcryptjs/externs/bcrypt.js
generated
vendored
Normal file
@ -0,0 +1,91 @@
|
||||
/*
|
||||
* Copyright 2012 The Closure Compiler Authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @fileoverview Definitions for bcrypt.js 2.
|
||||
* @externs
|
||||
* @author Daniel Wirtz <dcode@dcode.io>
|
||||
*/
|
||||
|
||||
/**
|
||||
* @type {Object.<string,*>}
|
||||
*/
|
||||
var bcrypt = {};
|
||||
|
||||
/**
|
||||
* @param {?function(number):!Array.<number>} random
|
||||
*/
|
||||
bcrypt.setRandomFallback = function(random) {};
|
||||
|
||||
/**
|
||||
* @param {number=} rounds
|
||||
* @param {number=} seed_length
|
||||
* @returns {string}
|
||||
*/
|
||||
bcrypt.genSaltSync = function(rounds, seed_length) {};
|
||||
|
||||
/**
|
||||
* @param {(number|function(Error, ?string))=} rounds
|
||||
* @param {(number|function(Error, ?string))=} seed_length
|
||||
* @param {function(Error, string=)=} callback
|
||||
*/
|
||||
bcrypt.genSalt = function(rounds, seed_length, callback) {};
|
||||
|
||||
/**
|
||||
* @param {string} s
|
||||
* @param {(number|string)=} salt
|
||||
* @returns {?string}
|
||||
*/
|
||||
bcrypt.hashSync = function(s, salt) {};
|
||||
|
||||
/**
|
||||
* @param {string} s
|
||||
* @param {number|string} salt
|
||||
* @param {function(Error, string=)} callback
|
||||
* @expose
|
||||
*/
|
||||
bcrypt.hash = function(s, salt, callback) {};
|
||||
|
||||
/**
|
||||
* @param {string} s
|
||||
* @param {string} hash
|
||||
* @returns {boolean}
|
||||
* @throws {Error}
|
||||
*/
|
||||
bcrypt.compareSync = function(s, hash) {};
|
||||
|
||||
/**
|
||||
* @param {string} s
|
||||
* @param {string} hash
|
||||
* @param {function(Error, boolean)} callback
|
||||
* @throws {Error}
|
||||
*/
|
||||
bcrypt.compare = function(s, hash, callback) {};
|
||||
|
||||
/**
|
||||
* @param {string} hash
|
||||
* @returns {number}
|
||||
* @throws {Error}
|
||||
*/
|
||||
bcrypt.getRounds = function(hash) {};
|
||||
|
||||
/**
|
||||
* @param {string} hash
|
||||
* @returns {string}
|
||||
* @throws {Error}
|
||||
* @expose
|
||||
*/
|
||||
bcrypt.getSalt = function(hash) {};
|
98
node_modules/bcryptjs/externs/minimal-env.js
generated
vendored
Normal file
98
node_modules/bcryptjs/externs/minimal-env.js
generated
vendored
Normal file
@ -0,0 +1,98 @@
|
||||
/**
|
||||
* @fileoverview Minimal environment for bcrypt.js.
|
||||
* @externs
|
||||
*/
|
||||
|
||||
/**
|
||||
* @param {string} moduleName
|
||||
* returns {*}
|
||||
*/
|
||||
function require(moduleName) {}
|
||||
|
||||
/**
|
||||
* @constructor
|
||||
* @private
|
||||
*/
|
||||
var Module = function() {};
|
||||
|
||||
/**
|
||||
* @type {*}
|
||||
*/
|
||||
Module.prototype.exports;
|
||||
|
||||
/**
|
||||
* @type {Module}
|
||||
*/
|
||||
var module;
|
||||
|
||||
/**
|
||||
* @type {string}
|
||||
*/
|
||||
var __dirname;
|
||||
|
||||
/**
|
||||
* @type {Object.<string,*>}
|
||||
*/
|
||||
var process = {};
|
||||
|
||||
/**
|
||||
* @param {function()} func
|
||||
*/
|
||||
process.nextTick = function(func) {};
|
||||
|
||||
/**
|
||||
* @param {string} s
|
||||
* @constructor
|
||||
* @extends Array
|
||||
*/
|
||||
var Buffer = function(s) {};
|
||||
|
||||
/**
|
||||
BEGIN_NODE_INCLUDE
|
||||
var crypto = require('crypto');
|
||||
END_NODE_INCLUDE
|
||||
*/
|
||||
|
||||
/**
|
||||
* @type {Object.<string,*>}
|
||||
*/
|
||||
var crypto = {};
|
||||
|
||||
/**
|
||||
* @param {number} n
|
||||
* @returns {Array.<number>}
|
||||
*/
|
||||
crypto.randomBytes = function(n) {};
|
||||
|
||||
/**
|
||||
* @type {Object.<string,*>}
|
||||
*/
|
||||
window.crypto = {};
|
||||
|
||||
/**
|
||||
* @param {Uint8Array|Int8Array|Uint16Array|Int16Array|Uint32Array|Int32Array} array
|
||||
*/
|
||||
window.crypto.getRandomValues = function(array) {};
|
||||
|
||||
/**
|
||||
* @param {string} name
|
||||
* @param {function(...[*]):*} constructor
|
||||
*/
|
||||
var define = function(name, constructor) {};
|
||||
|
||||
/**
|
||||
* @type {boolean}
|
||||
*/
|
||||
define.amd;
|
||||
|
||||
/**
|
||||
* @param {...*} var_args
|
||||
* @returns {string}
|
||||
*/
|
||||
String.fromCodePoint = function(var_args) {};
|
||||
|
||||
/**
|
||||
* @param {number} offset
|
||||
* @returns {number}
|
||||
*/
|
||||
String.prototype.codePointAt = function(offset) {};
|
29
node_modules/bcryptjs/index.js
generated
vendored
Normal file
29
node_modules/bcryptjs/index.js
generated
vendored
Normal file
@ -0,0 +1,29 @@
|
||||
/*
|
||||
Copyright (c) 2012 Nevins Bartolomeo <nevins.bartolomeo@gmail.com>
|
||||
Copyright (c) 2012 Shane Girish <shaneGirish@gmail.com>
|
||||
Copyright (c) 2013 Daniel Wirtz <dcode@dcode.io>
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
are met:
|
||||
1. Redistributions of source code must retain the above copyright
|
||||
notice, this list of conditions and the following disclaimer.
|
||||
2. Redistributions in binary form must reproduce the above copyright
|
||||
notice, this list of conditions and the following disclaimer in the
|
||||
documentation and/or other materials provided with the distribution.
|
||||
3. The name of the author may not be used to endorse or promote products
|
||||
derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
|
||||
IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
|
||||
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
|
||||
IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
|
||||
INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
|
||||
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
|
||||
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
module.exports = require("./dist/bcrypt.js");
|
47
node_modules/bcryptjs/package.json
generated
vendored
Normal file
47
node_modules/bcryptjs/package.json
generated
vendored
Normal file
@ -0,0 +1,47 @@
|
||||
{
|
||||
"name": "bcryptjs",
|
||||
"description": "Optimized bcrypt in plain JavaScript with zero dependencies. Compatible to 'bcrypt'.",
|
||||
"version": "2.4.3",
|
||||
"author": "Daniel Wirtz <dcode@dcode.io>",
|
||||
"contributors": [
|
||||
"Shane Girish <shaneGirish@gmail.com> (https://github.com/shaneGirish)",
|
||||
"Alex Murray <> (https://github.com/alexmurray)",
|
||||
"Nicolas Pelletier <> (https://github.com/NicolasPelletier)",
|
||||
"Josh Rogers <> (https://github.com/geekymole)",
|
||||
"Noah Isaacson <noah@nisaacson.com> (https://github.com/nisaacson)"
|
||||
],
|
||||
"repository": {
|
||||
"type": "url",
|
||||
"url": "https://github.com/dcodeIO/bcrypt.js.git"
|
||||
},
|
||||
"bugs": {
|
||||
"url": "https://github.com/dcodeIO/bcrypt.js/issues"
|
||||
},
|
||||
"keywords": [
|
||||
"bcrypt",
|
||||
"password",
|
||||
"auth",
|
||||
"authentication",
|
||||
"encryption",
|
||||
"crypt",
|
||||
"crypto"
|
||||
],
|
||||
"main": "index.js",
|
||||
"browser": "dist/bcrypt.js",
|
||||
"dependencies": {},
|
||||
"devDependencies": {
|
||||
"testjs": "~1",
|
||||
"closurecompiler": "~1",
|
||||
"metascript": "~0.18",
|
||||
"bcrypt": "latest",
|
||||
"utfx": "~1"
|
||||
},
|
||||
"license": "MIT",
|
||||
"scripts": {
|
||||
"test": "node node_modules/testjs/bin/testjs",
|
||||
"build": "node scripts/build.js",
|
||||
"compile": "node node_modules/closurecompiler/bin/ccjs dist/bcrypt.js --compilation_level=SIMPLE_OPTIMIZATIONS --create_source_map=dist/bcrypt.min.map > dist/bcrypt.min.js",
|
||||
"compress": "gzip -c -9 dist/bcrypt.min.js > dist/bcrypt.min.js.gz",
|
||||
"make": "npm run build && npm run compile && npm run compress && npm test"
|
||||
}
|
||||
}
|
37
node_modules/bcryptjs/scripts/build.js
generated
vendored
Normal file
37
node_modules/bcryptjs/scripts/build.js
generated
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
var MetaScript = require("metascript"),
|
||||
path = require("path"),
|
||||
fs = require("fs");
|
||||
|
||||
var rootDir = path.join(__dirname, ".."),
|
||||
srcDir = path.join(rootDir, "src"),
|
||||
distDir = path.join(rootDir, "dist"),
|
||||
pkg = require(path.join(rootDir, "package.json")),
|
||||
filename;
|
||||
|
||||
var scope = {
|
||||
VERSION: pkg.version,
|
||||
ISAAC: false
|
||||
};
|
||||
|
||||
// Make standard build
|
||||
console.log("Building bcrypt.js with scope", JSON.stringify(scope, null, 2));
|
||||
fs.writeFileSync(
|
||||
path.join(distDir, "bcrypt.js"),
|
||||
MetaScript.transform(fs.readFileSync(filename = path.join(srcDir, "wrap.js")), filename, scope, srcDir)
|
||||
);
|
||||
|
||||
// Make isaac build - see: https://github.com/dcodeIO/bcrypt.js/issues/16
|
||||
/* scope.ISAAC = true;
|
||||
console.log("Building bcrypt-isaac.js with scope", JSON.stringify(scope, null, 2));
|
||||
fs.writeFileSync(
|
||||
path.join(distDir, "bcrypt-isaac.js"),
|
||||
MetaScript.transform(fs.readFileSync(filename = path.join(srcDir, "bcrypt.js")), filename, scope, srcDir)
|
||||
); */
|
||||
|
||||
// Update bower.json
|
||||
scope = { VERSION: pkg.version };
|
||||
console.log("Updating bower.json with scope", JSON.stringify(scope, null, 2));
|
||||
fs.writeFileSync(
|
||||
path.join(rootDir, "bower.json"),
|
||||
MetaScript.transform(fs.readFileSync(filename = path.join(srcDir, "bower.json")), filename, scope, srcDir)
|
||||
);
|
327
node_modules/bcryptjs/src/bcrypt.js
generated
vendored
Normal file
327
node_modules/bcryptjs/src/bcrypt.js
generated
vendored
Normal file
@ -0,0 +1,327 @@
|
||||
/**
|
||||
* bcrypt namespace.
|
||||
* @type {Object.<string,*>}
|
||||
*/
|
||||
var bcrypt = {};
|
||||
|
||||
/**
|
||||
* The random implementation to use as a fallback.
|
||||
* @type {?function(number):!Array.<number>}
|
||||
* @inner
|
||||
*/
|
||||
var randomFallback = null;
|
||||
|
||||
/**
|
||||
* Generates cryptographically secure random bytes.
|
||||
* @function
|
||||
* @param {number} len Bytes length
|
||||
* @returns {!Array.<number>} Random bytes
|
||||
* @throws {Error} If no random implementation is available
|
||||
* @inner
|
||||
*/
|
||||
function random(len) {
|
||||
/* node */ if (typeof module !== 'undefined' && module && module['exports'])
|
||||
try {
|
||||
return require("crypto")['randomBytes'](len);
|
||||
} catch (e) {}
|
||||
/* WCA */ try {
|
||||
var a; (self['crypto']||self['msCrypto'])['getRandomValues'](a = new Uint32Array(len));
|
||||
return Array.prototype.slice.call(a);
|
||||
} catch (e) {}
|
||||
/* fallback */ if (!randomFallback)
|
||||
throw Error("Neither WebCryptoAPI nor a crypto module is available. Use bcrypt.setRandomFallback to set an alternative");
|
||||
return randomFallback(len);
|
||||
}
|
||||
|
||||
// Test if any secure randomness source is available
|
||||
var randomAvailable = false;
|
||||
try {
|
||||
random(1);
|
||||
randomAvailable = true;
|
||||
} catch (e) {}
|
||||
|
||||
// Default fallback, if any
|
||||
randomFallback = /*? if (ISAAC) { */function(len) {
|
||||
for (var a=[], i=0; i<len; ++i)
|
||||
a[i] = ((0.5 + isaac() * 2.3283064365386963e-10) * 256) | 0;
|
||||
return a;
|
||||
};/*? } else { */null;/*? }*/
|
||||
|
||||
/**
|
||||
* Sets the pseudo random number generator to use as a fallback if neither node's `crypto` module nor the Web Crypto
|
||||
* API is available. Please note: It is highly important that the PRNG used is cryptographically secure and that it
|
||||
* is seeded properly!
|
||||
* @param {?function(number):!Array.<number>} random Function taking the number of bytes to generate as its
|
||||
* sole argument, returning the corresponding array of cryptographically secure random byte values.
|
||||
* @see http://nodejs.org/api/crypto.html
|
||||
* @see http://www.w3.org/TR/WebCryptoAPI/
|
||||
*/
|
||||
bcrypt.setRandomFallback = function(random) {
|
||||
randomFallback = random;
|
||||
};
|
||||
|
||||
/**
|
||||
* Synchronously generates a salt.
|
||||
* @param {number=} rounds Number of rounds to use, defaults to 10 if omitted
|
||||
* @param {number=} seed_length Not supported.
|
||||
* @returns {string} Resulting salt
|
||||
* @throws {Error} If a random fallback is required but not set
|
||||
* @expose
|
||||
*/
|
||||
bcrypt.genSaltSync = function(rounds, seed_length) {
|
||||
rounds = rounds || GENSALT_DEFAULT_LOG2_ROUNDS;
|
||||
if (typeof rounds !== 'number')
|
||||
throw Error("Illegal arguments: "+(typeof rounds)+", "+(typeof seed_length));
|
||||
if (rounds < 4)
|
||||
rounds = 4;
|
||||
else if (rounds > 31)
|
||||
rounds = 31;
|
||||
var salt = [];
|
||||
salt.push("$2a$");
|
||||
if (rounds < 10)
|
||||
salt.push("0");
|
||||
salt.push(rounds.toString());
|
||||
salt.push('$');
|
||||
salt.push(base64_encode(random(BCRYPT_SALT_LEN), BCRYPT_SALT_LEN)); // May throw
|
||||
return salt.join('');
|
||||
};
|
||||
|
||||
/**
|
||||
* Asynchronously generates a salt.
|
||||
* @param {(number|function(Error, string=))=} rounds Number of rounds to use, defaults to 10 if omitted
|
||||
* @param {(number|function(Error, string=))=} seed_length Not supported.
|
||||
* @param {function(Error, string=)=} callback Callback receiving the error, if any, and the resulting salt
|
||||
* @returns {!Promise} If `callback` has been omitted
|
||||
* @throws {Error} If `callback` is present but not a function
|
||||
* @expose
|
||||
*/
|
||||
bcrypt.genSalt = function(rounds, seed_length, callback) {
|
||||
if (typeof seed_length === 'function')
|
||||
callback = seed_length,
|
||||
seed_length = undefined; // Not supported.
|
||||
if (typeof rounds === 'function')
|
||||
callback = rounds,
|
||||
rounds = undefined;
|
||||
if (typeof rounds === 'undefined')
|
||||
rounds = GENSALT_DEFAULT_LOG2_ROUNDS;
|
||||
else if (typeof rounds !== 'number')
|
||||
throw Error("illegal arguments: "+(typeof rounds));
|
||||
|
||||
function _async(callback) {
|
||||
nextTick(function() { // Pretty thin, but salting is fast enough
|
||||
try {
|
||||
callback(null, bcrypt.genSaltSync(rounds));
|
||||
} catch (err) {
|
||||
callback(err);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (callback) {
|
||||
if (typeof callback !== 'function')
|
||||
throw Error("Illegal callback: "+typeof(callback));
|
||||
_async(callback);
|
||||
} else
|
||||
return new Promise(function(resolve, reject) {
|
||||
_async(function(err, res) {
|
||||
if (err) {
|
||||
reject(err);
|
||||
return;
|
||||
}
|
||||
resolve(res);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Synchronously generates a hash for the given string.
|
||||
* @param {string} s String to hash
|
||||
* @param {(number|string)=} salt Salt length to generate or salt to use, default to 10
|
||||
* @returns {string} Resulting hash
|
||||
* @expose
|
||||
*/
|
||||
bcrypt.hashSync = function(s, salt) {
|
||||
if (typeof salt === 'undefined')
|
||||
salt = GENSALT_DEFAULT_LOG2_ROUNDS;
|
||||
if (typeof salt === 'number')
|
||||
salt = bcrypt.genSaltSync(salt);
|
||||
if (typeof s !== 'string' || typeof salt !== 'string')
|
||||
throw Error("Illegal arguments: "+(typeof s)+', '+(typeof salt));
|
||||
return _hash(s, salt);
|
||||
};
|
||||
|
||||
/**
|
||||
* Asynchronously generates a hash for the given string.
|
||||
* @param {string} s String to hash
|
||||
* @param {number|string} salt Salt length to generate or salt to use
|
||||
* @param {function(Error, string=)=} callback Callback receiving the error, if any, and the resulting hash
|
||||
* @param {function(number)=} progressCallback Callback successively called with the percentage of rounds completed
|
||||
* (0.0 - 1.0), maximally once per `MAX_EXECUTION_TIME = 100` ms.
|
||||
* @returns {!Promise} If `callback` has been omitted
|
||||
* @throws {Error} If `callback` is present but not a function
|
||||
* @expose
|
||||
*/
|
||||
bcrypt.hash = function(s, salt, callback, progressCallback) {
|
||||
|
||||
function _async(callback) {
|
||||
if (typeof s === 'string' && typeof salt === 'number')
|
||||
bcrypt.genSalt(salt, function(err, salt) {
|
||||
_hash(s, salt, callback, progressCallback);
|
||||
});
|
||||
else if (typeof s === 'string' && typeof salt === 'string')
|
||||
_hash(s, salt, callback, progressCallback);
|
||||
else
|
||||
nextTick(callback.bind(this, Error("Illegal arguments: "+(typeof s)+', '+(typeof salt))));
|
||||
}
|
||||
|
||||
if (callback) {
|
||||
if (typeof callback !== 'function')
|
||||
throw Error("Illegal callback: "+typeof(callback));
|
||||
_async(callback);
|
||||
} else
|
||||
return new Promise(function(resolve, reject) {
|
||||
_async(function(err, res) {
|
||||
if (err) {
|
||||
reject(err);
|
||||
return;
|
||||
}
|
||||
resolve(res);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Compares two strings of the same length in constant time.
|
||||
* @param {string} known Must be of the correct length
|
||||
* @param {string} unknown Must be the same length as `known`
|
||||
* @returns {boolean}
|
||||
* @inner
|
||||
*/
|
||||
function safeStringCompare(known, unknown) {
|
||||
var right = 0,
|
||||
wrong = 0;
|
||||
for (var i=0, k=known.length; i<k; ++i) {
|
||||
if (known.charCodeAt(i) === unknown.charCodeAt(i))
|
||||
++right;
|
||||
else
|
||||
++wrong;
|
||||
}
|
||||
// Prevent removal of unused variables (never true, actually)
|
||||
if (right < 0)
|
||||
return false;
|
||||
return wrong === 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* Synchronously tests a string against a hash.
|
||||
* @param {string} s String to compare
|
||||
* @param {string} hash Hash to test against
|
||||
* @returns {boolean} true if matching, otherwise false
|
||||
* @throws {Error} If an argument is illegal
|
||||
* @expose
|
||||
*/
|
||||
bcrypt.compareSync = function(s, hash) {
|
||||
if (typeof s !== "string" || typeof hash !== "string")
|
||||
throw Error("Illegal arguments: "+(typeof s)+', '+(typeof hash));
|
||||
if (hash.length !== 60)
|
||||
return false;
|
||||
return safeStringCompare(bcrypt.hashSync(s, hash.substr(0, hash.length-31)), hash);
|
||||
};
|
||||
|
||||
/**
|
||||
* Asynchronously compares the given data against the given hash.
|
||||
* @param {string} s Data to compare
|
||||
* @param {string} hash Data to be compared to
|
||||
* @param {function(Error, boolean)=} callback Callback receiving the error, if any, otherwise the result
|
||||
* @param {function(number)=} progressCallback Callback successively called with the percentage of rounds completed
|
||||
* (0.0 - 1.0), maximally once per `MAX_EXECUTION_TIME = 100` ms.
|
||||
* @returns {!Promise} If `callback` has been omitted
|
||||
* @throws {Error} If `callback` is present but not a function
|
||||
* @expose
|
||||
*/
|
||||
bcrypt.compare = function(s, hash, callback, progressCallback) {
|
||||
|
||||
function _async(callback) {
|
||||
if (typeof s !== "string" || typeof hash !== "string") {
|
||||
nextTick(callback.bind(this, Error("Illegal arguments: "+(typeof s)+', '+(typeof hash))));
|
||||
return;
|
||||
}
|
||||
if (hash.length !== 60) {
|
||||
nextTick(callback.bind(this, null, false));
|
||||
return;
|
||||
}
|
||||
bcrypt.hash(s, hash.substr(0, 29), function(err, comp) {
|
||||
if (err)
|
||||
callback(err);
|
||||
else
|
||||
callback(null, safeStringCompare(comp, hash));
|
||||
}, progressCallback);
|
||||
}
|
||||
|
||||
if (callback) {
|
||||
if (typeof callback !== 'function')
|
||||
throw Error("Illegal callback: "+typeof(callback));
|
||||
_async(callback);
|
||||
} else
|
||||
return new Promise(function(resolve, reject) {
|
||||
_async(function(err, res) {
|
||||
if (err) {
|
||||
reject(err);
|
||||
return;
|
||||
}
|
||||
resolve(res);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets the number of rounds used to encrypt the specified hash.
|
||||
* @param {string} hash Hash to extract the used number of rounds from
|
||||
* @returns {number} Number of rounds used
|
||||
* @throws {Error} If `hash` is not a string
|
||||
* @expose
|
||||
*/
|
||||
bcrypt.getRounds = function(hash) {
|
||||
if (typeof hash !== "string")
|
||||
throw Error("Illegal arguments: "+(typeof hash));
|
||||
return parseInt(hash.split("$")[2], 10);
|
||||
};
|
||||
|
||||
/**
|
||||
* Gets the salt portion from a hash. Does not validate the hash.
|
||||
* @param {string} hash Hash to extract the salt from
|
||||
* @returns {string} Extracted salt part
|
||||
* @throws {Error} If `hash` is not a string or otherwise invalid
|
||||
* @expose
|
||||
*/
|
||||
bcrypt.getSalt = function(hash) {
|
||||
if (typeof hash !== 'string')
|
||||
throw Error("Illegal arguments: "+(typeof hash));
|
||||
if (hash.length !== 60)
|
||||
throw Error("Illegal hash length: "+hash.length+" != 60");
|
||||
return hash.substring(0, 29);
|
||||
};
|
||||
|
||||
//? include("bcrypt/util.js");
|
||||
|
||||
//? include("bcrypt/impl.js");
|
||||
|
||||
/**
|
||||
* Encodes a byte array to base64 with up to len bytes of input, using the custom bcrypt alphabet.
|
||||
* @function
|
||||
* @param {!Array.<number>} b Byte array
|
||||
* @param {number} len Maximum input length
|
||||
* @returns {string}
|
||||
* @expose
|
||||
*/
|
||||
bcrypt.encodeBase64 = base64_encode;
|
||||
|
||||
/**
|
||||
* Decodes a base64 encoded string to up to len bytes of output, using the custom bcrypt alphabet.
|
||||
* @function
|
||||
* @param {string} s String to decode
|
||||
* @param {number} len Maximum output length
|
||||
* @returns {!Array.<number>}
|
||||
* @expose
|
||||
*/
|
||||
bcrypt.decodeBase64 = base64_decode;
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user