step-node-agent 3.18.3 → 3.18.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/node_modules/abbrev/LICENSE +46 -0
- package/node_modules/abbrev/README.md +23 -0
- package/node_modules/abbrev/abbrev.js +61 -0
- package/node_modules/abbrev/package.json +21 -0
- package/node_modules/ansi-align/CHANGELOG.md +36 -0
- package/node_modules/ansi-align/LICENSE +13 -0
- package/node_modules/ansi-align/README.md +79 -0
- package/node_modules/ansi-align/index.js +61 -0
- package/node_modules/ansi-align/package.json +43 -0
- package/node_modules/ansi-regex/index.js +10 -0
- package/node_modules/ansi-regex/license +9 -0
- package/node_modules/ansi-regex/package.json +53 -0
- package/node_modules/ansi-regex/readme.md +46 -0
- package/node_modules/ansi-styles/index.js +165 -0
- package/node_modules/ansi-styles/license +9 -0
- package/node_modules/ansi-styles/package.json +56 -0
- package/node_modules/ansi-styles/readme.md +147 -0
- package/node_modules/boxen/index.js +138 -0
- package/node_modules/boxen/license +9 -0
- package/node_modules/boxen/package.json +47 -0
- package/node_modules/boxen/readme.md +175 -0
- package/node_modules/camelcase/index.js +64 -0
- package/node_modules/{send/node_modules/http-errors/LICENSE → camelcase/license} +1 -3
- package/node_modules/camelcase/package.json +42 -0
- package/node_modules/camelcase/readme.md +57 -0
- package/node_modules/capture-stack-trace/index.js +18 -0
- package/node_modules/{express/node_modules/http-errors/LICENSE → capture-stack-trace/license} +1 -3
- package/node_modules/capture-stack-trace/package.json +29 -0
- package/node_modules/capture-stack-trace/readme.md +36 -0
- package/node_modules/chalk/index.js +228 -0
- package/node_modules/chalk/index.js.flow +93 -0
- package/node_modules/chalk/license +9 -0
- package/node_modules/chalk/package.json +71 -0
- package/node_modules/chalk/readme.md +314 -0
- package/node_modules/chalk/templates.js +128 -0
- package/node_modules/chalk/types/index.d.ts +97 -0
- package/node_modules/ci-info/CHANGELOG.md +62 -0
- package/node_modules/ci-info/LICENSE +21 -0
- package/node_modules/ci-info/README.md +107 -0
- package/node_modules/ci-info/index.js +66 -0
- package/node_modules/ci-info/package.json +36 -0
- package/node_modules/ci-info/vendors.json +152 -0
- package/node_modules/cli-boxes/boxes.json +50 -0
- package/node_modules/cli-boxes/index.js +2 -0
- package/node_modules/{http-errors/node_modules/statuses/LICENSE → cli-boxes/license} +1 -3
- package/node_modules/cli-boxes/package.json +39 -0
- package/node_modules/cli-boxes/readme.md +94 -0
- package/node_modules/color-convert/CHANGELOG.md +54 -0
- package/node_modules/{send/node_modules/depd → color-convert}/LICENSE +9 -10
- package/node_modules/color-convert/README.md +68 -0
- package/node_modules/color-convert/conversions.js +868 -0
- package/node_modules/color-convert/index.js +78 -0
- package/node_modules/color-convert/package.json +46 -0
- package/node_modules/color-convert/route.js +97 -0
- package/node_modules/color-name/.eslintrc.json +43 -0
- package/node_modules/color-name/.npmignore +107 -0
- package/node_modules/color-name/LICENSE +8 -0
- package/node_modules/color-name/README.md +11 -0
- package/node_modules/color-name/index.js +152 -0
- package/node_modules/color-name/package.json +25 -0
- package/node_modules/color-name/test.js +7 -0
- package/node_modules/configstore/index.js +106 -0
- package/node_modules/configstore/license +9 -0
- package/node_modules/configstore/package.json +47 -0
- package/node_modules/configstore/readme.md +116 -0
- package/node_modules/cookie/HISTORY.md +8 -0
- package/node_modules/cookie/README.md +50 -34
- package/node_modules/cookie/SECURITY.md +25 -0
- package/node_modules/cookie/index.js +83 -15
- package/node_modules/cookie/package.json +6 -4
- package/node_modules/core-util-is/LICENSE +19 -0
- package/node_modules/core-util-is/README.md +3 -0
- package/node_modules/core-util-is/lib/util.js +107 -0
- package/node_modules/core-util-is/package.json +38 -0
- package/node_modules/create-error-class/index.js +44 -0
- package/node_modules/create-error-class/license +21 -0
- package/node_modules/create-error-class/package.json +30 -0
- package/node_modules/create-error-class/readme.md +54 -0
- package/node_modules/cross-spawn/CHANGELOG.md +6 -0
- package/node_modules/cross-spawn/LICENSE +19 -0
- package/node_modules/cross-spawn/README.md +85 -0
- package/node_modules/cross-spawn/index.js +59 -0
- package/node_modules/cross-spawn/lib/enoent.js +73 -0
- package/node_modules/cross-spawn/lib/parse.js +113 -0
- package/node_modules/cross-spawn/lib/util/escapeArgument.js +30 -0
- package/node_modules/cross-spawn/lib/util/escapeCommand.js +12 -0
- package/node_modules/cross-spawn/lib/util/hasEmptyArgumentBug.js +18 -0
- package/node_modules/cross-spawn/lib/util/readShebang.js +37 -0
- package/node_modules/cross-spawn/lib/util/resolveCommand.js +31 -0
- package/node_modules/cross-spawn/package.json +53 -0
- package/node_modules/crypto-random-string/index.js +10 -0
- package/node_modules/crypto-random-string/license +21 -0
- package/node_modules/crypto-random-string/package.json +43 -0
- package/node_modules/crypto-random-string/readme.md +49 -0
- package/node_modules/deep-extend/CHANGELOG.md +46 -0
- package/node_modules/deep-extend/LICENSE +20 -0
- package/node_modules/deep-extend/README.md +91 -0
- package/node_modules/deep-extend/index.js +1 -0
- package/node_modules/deep-extend/lib/deep-extend.js +150 -0
- package/node_modules/deep-extend/package.json +62 -0
- package/node_modules/dot-prop/index.js +141 -0
- package/node_modules/dot-prop/license +21 -0
- package/node_modules/dot-prop/package.json +48 -0
- package/node_modules/dot-prop/readme.md +105 -0
- package/node_modules/duplexer3/LICENSE.md +26 -0
- package/node_modules/duplexer3/README.md +115 -0
- package/node_modules/duplexer3/index.js +76 -0
- package/node_modules/duplexer3/package.json +28 -0
- package/node_modules/escape-string-regexp/index.js +11 -0
- package/node_modules/escape-string-regexp/license +21 -0
- package/node_modules/escape-string-regexp/package.json +41 -0
- package/node_modules/escape-string-regexp/readme.md +27 -0
- package/node_modules/execa/index.js +309 -0
- package/node_modules/execa/lib/errname.js +37 -0
- package/node_modules/execa/lib/stdio.js +41 -0
- package/node_modules/execa/license +9 -0
- package/node_modules/execa/package.json +76 -0
- package/node_modules/execa/readme.md +279 -0
- package/node_modules/express/History.md +54 -0
- package/node_modules/express/Readme.md +39 -31
- package/node_modules/express/lib/application.js +18 -1
- package/node_modules/express/lib/response.js +40 -18
- package/node_modules/express/lib/router/index.js +20 -15
- package/node_modules/express/lib/router/route.js +9 -0
- package/node_modules/express/lib/utils.js +1 -0
- package/node_modules/express/lib/view.js +1 -1
- package/node_modules/express/package.json +14 -15
- package/node_modules/finalhandler/HISTORY.md +8 -0
- package/node_modules/finalhandler/LICENSE +1 -1
- package/node_modules/finalhandler/README.md +5 -6
- package/node_modules/finalhandler/SECURITY.md +25 -0
- package/node_modules/finalhandler/index.js +8 -3
- package/node_modules/finalhandler/package.json +18 -17
- package/node_modules/get-intrinsic/.eslintrc +2 -8
- package/node_modules/get-intrinsic/.nycrc +0 -4
- package/node_modules/get-intrinsic/CHANGELOG.md +27 -0
- package/node_modules/get-intrinsic/README.md +7 -1
- package/node_modules/get-intrinsic/index.js +4 -0
- package/node_modules/get-intrinsic/package.json +22 -12
- package/node_modules/get-intrinsic/test/GetIntrinsic.js +25 -11
- package/node_modules/get-stream/buffer-stream.js +51 -0
- package/node_modules/get-stream/index.js +51 -0
- package/node_modules/get-stream/license +21 -0
- package/node_modules/get-stream/package.json +48 -0
- package/node_modules/get-stream/readme.md +117 -0
- package/node_modules/glob/common.js +2 -0
- package/node_modules/glob/glob.js +4 -1
- package/node_modules/glob/package.json +5 -2
- package/node_modules/glob/sync.js +6 -3
- package/node_modules/global-dirs/index.js +90 -0
- package/node_modules/global-dirs/license +9 -0
- package/node_modules/global-dirs/package.json +52 -0
- package/node_modules/global-dirs/readme.md +69 -0
- package/node_modules/got/index.js +364 -0
- package/node_modules/got/license +21 -0
- package/node_modules/got/package.json +78 -0
- package/node_modules/got/readme.md +335 -0
- package/node_modules/graceful-fs/LICENSE +15 -0
- package/node_modules/graceful-fs/README.md +143 -0
- package/node_modules/graceful-fs/clone.js +23 -0
- package/node_modules/graceful-fs/graceful-fs.js +448 -0
- package/node_modules/graceful-fs/legacy-streams.js +118 -0
- package/node_modules/graceful-fs/package.json +50 -0
- package/node_modules/graceful-fs/polyfills.js +355 -0
- package/node_modules/has-flag/index.js +8 -0
- package/node_modules/has-flag/license +9 -0
- package/node_modules/has-flag/package.json +44 -0
- package/node_modules/has-flag/readme.md +70 -0
- package/node_modules/import-lazy/index.js +53 -0
- package/node_modules/import-lazy/license +21 -0
- package/node_modules/import-lazy/package.json +44 -0
- package/node_modules/import-lazy/readme.md +64 -0
- package/node_modules/imurmurhash/README.md +122 -0
- package/node_modules/imurmurhash/imurmurhash.js +138 -0
- package/node_modules/imurmurhash/imurmurhash.min.js +12 -0
- package/node_modules/imurmurhash/package.json +40 -0
- package/node_modules/ini/LICENSE +15 -0
- package/node_modules/ini/README.md +102 -0
- package/node_modules/ini/ini.js +206 -0
- package/node_modules/ini/package.json +33 -0
- package/node_modules/{express/node_modules/qs → is-callable}/.editorconfig +7 -21
- package/node_modules/{get-intrinsic → is-callable}/.eslintignore +0 -0
- package/node_modules/is-callable/.eslintrc +21 -0
- package/node_modules/{express/node_modules/qs → is-callable}/.github/FUNDING.yml +2 -2
- package/node_modules/is-callable/.istanbul.yml +47 -0
- package/node_modules/{express/node_modules/qs → is-callable}/.nycrc +1 -5
- package/node_modules/is-callable/CHANGELOG.md +108 -0
- package/node_modules/is-callable/LICENSE +22 -0
- package/node_modules/is-callable/README.md +67 -0
- package/node_modules/is-callable/index.js +74 -0
- package/node_modules/is-callable/package.json +92 -0
- package/node_modules/is-callable/test/index.js +170 -0
- package/node_modules/is-ci/LICENSE +21 -0
- package/node_modules/is-ci/README.md +50 -0
- package/node_modules/is-ci/bin.js +4 -0
- package/node_modules/is-ci/index.js +3 -0
- package/node_modules/is-ci/package.json +38 -0
- package/node_modules/is-core-module/.eslintrc +1 -0
- package/node_modules/is-core-module/CHANGELOG.md +9 -0
- package/node_modules/is-core-module/core.json +1 -0
- package/node_modules/is-core-module/package.json +8 -12
- package/node_modules/is-core-module/test/index.js +34 -31
- package/node_modules/is-fullwidth-code-point/index.js +46 -0
- package/node_modules/is-fullwidth-code-point/license +21 -0
- package/node_modules/is-fullwidth-code-point/package.json +45 -0
- package/node_modules/is-fullwidth-code-point/readme.md +39 -0
- package/node_modules/is-installed-globally/index.js +5 -0
- package/node_modules/is-installed-globally/license +9 -0
- package/node_modules/is-installed-globally/package.json +48 -0
- package/node_modules/is-installed-globally/readme.md +39 -0
- package/node_modules/is-npm/index.js +4 -0
- package/node_modules/is-npm/package.json +32 -0
- package/node_modules/is-npm/readme.md +30 -0
- package/node_modules/is-obj/index.js +5 -0
- package/node_modules/is-obj/license +21 -0
- package/node_modules/is-obj/package.json +33 -0
- package/node_modules/is-obj/readme.md +34 -0
- package/node_modules/is-path-inside/index.js +14 -0
- package/node_modules/is-path-inside/license +21 -0
- package/node_modules/is-path-inside/package.json +37 -0
- package/node_modules/is-path-inside/readme.md +34 -0
- package/node_modules/is-redirect/index.js +14 -0
- package/node_modules/is-redirect/license +21 -0
- package/node_modules/is-redirect/package.json +35 -0
- package/node_modules/is-redirect/readme.md +28 -0
- package/node_modules/is-retry-allowed/index.js +62 -0
- package/node_modules/is-retry-allowed/license +21 -0
- package/node_modules/is-retry-allowed/package.json +29 -0
- package/node_modules/is-retry-allowed/readme.md +42 -0
- package/node_modules/is-stream/index.js +21 -0
- package/node_modules/is-stream/license +21 -0
- package/node_modules/is-stream/package.json +38 -0
- package/node_modules/is-stream/readme.md +42 -0
- package/node_modules/isarray/.npmignore +1 -0
- package/node_modules/isarray/.travis.yml +4 -0
- package/node_modules/isarray/Makefile +6 -0
- package/node_modules/isarray/README.md +60 -0
- package/node_modules/isarray/component.json +19 -0
- package/node_modules/isarray/index.js +5 -0
- package/node_modules/isarray/package.json +45 -0
- package/node_modules/isarray/test.js +20 -0
- package/node_modules/isexe/.npmignore +2 -0
- package/node_modules/isexe/LICENSE +15 -0
- package/node_modules/isexe/README.md +51 -0
- package/node_modules/isexe/index.js +57 -0
- package/node_modules/isexe/mode.js +41 -0
- package/node_modules/isexe/package.json +31 -0
- package/node_modules/isexe/test/basic.js +221 -0
- package/node_modules/isexe/windows.js +42 -0
- package/node_modules/latest-version/index.js +4 -0
- package/node_modules/latest-version/license +21 -0
- package/node_modules/latest-version/package.json +39 -0
- package/node_modules/latest-version/readme.md +40 -0
- package/node_modules/lowercase-keys/index.js +11 -0
- package/node_modules/lowercase-keys/license +21 -0
- package/node_modules/lowercase-keys/package.json +35 -0
- package/node_modules/lowercase-keys/readme.md +33 -0
- package/node_modules/lru-cache/LICENSE +15 -0
- package/node_modules/lru-cache/README.md +158 -0
- package/node_modules/lru-cache/index.js +468 -0
- package/node_modules/lru-cache/package.json +36 -0
- package/node_modules/make-dir/index.js +85 -0
- package/node_modules/make-dir/license +9 -0
- package/node_modules/make-dir/package.json +54 -0
- package/node_modules/make-dir/readme.md +116 -0
- package/node_modules/nopt/.npmignore +0 -0
- package/node_modules/nopt/LICENSE +23 -0
- package/node_modules/nopt/README.md +208 -0
- package/node_modules/nopt/bin/nopt.js +44 -0
- package/node_modules/nopt/examples/my-program.js +30 -0
- package/node_modules/nopt/lib/nopt.js +552 -0
- package/node_modules/nopt/package.json +12 -0
- package/node_modules/npm/CHANGELOG.md +9 -0
- package/node_modules/npm/docs/public/cli-commands/npm/index.html +3 -3
- package/node_modules/npm/docs/public/cli-commands/npm-access/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-adduser/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-audit/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-bin/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-bugs/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-build/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-bundle/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-cache/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-ci/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-completion/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-config/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-dedupe/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-deprecate/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-dist-tag/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-docs/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-doctor/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-edit/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-explore/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-fund/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-help/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-help-search/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-hook/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-init/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-install/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-install-ci-test/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-install-test/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-link/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-logout/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-ls/index.html +3 -3
- package/node_modules/npm/docs/public/cli-commands/npm-org/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-outdated/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-owner/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-pack/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-ping/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-prefix/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-profile/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-prune/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-publish/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-rebuild/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-repo/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-restart/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-root/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-run-script/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-search/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-shrinkwrap/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-star/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-stars/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-start/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-stop/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-team/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-test/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-token/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-uninstall/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-unpublish/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-update/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-version/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-view/index.html +2 -2
- package/node_modules/npm/docs/public/cli-commands/npm-whoami/index.html +2 -2
- package/node_modules/npm/docs/public/configuring-npm/folders/index.html +2 -2
- package/node_modules/npm/docs/public/configuring-npm/install/index.html +2 -2
- package/node_modules/npm/docs/public/configuring-npm/npmrc/index.html +2 -2
- package/node_modules/npm/docs/public/configuring-npm/package-json/index.html +2 -2
- package/node_modules/npm/docs/public/configuring-npm/package-lock-json/index.html +2 -2
- package/node_modules/npm/docs/public/configuring-npm/package-locks/index.html +2 -2
- package/node_modules/npm/docs/public/configuring-npm/shrinkwrap-json/index.html +2 -2
- package/node_modules/npm/docs/public/index.html +1 -1
- package/node_modules/npm/docs/public/using-npm/config/index.html +2 -2
- package/node_modules/npm/docs/public/using-npm/developers/index.html +2 -2
- package/node_modules/npm/docs/public/using-npm/disputes/index.html +2 -2
- package/node_modules/npm/docs/public/using-npm/orgs/index.html +2 -2
- package/node_modules/npm/docs/public/using-npm/registry/index.html +2 -2
- package/node_modules/npm/docs/public/using-npm/removal/index.html +2 -2
- package/node_modules/npm/docs/public/using-npm/scope/index.html +2 -2
- package/node_modules/npm/docs/public/using-npm/scripts/index.html +2 -2
- package/node_modules/npm/docs/public/using-npm/semver/index.html +2 -2
- package/node_modules/npm/man/man1/npm-README.1 +1 -1
- package/node_modules/npm/man/man1/npm-access.1 +1 -1
- package/node_modules/npm/man/man1/npm-adduser.1 +1 -1
- package/node_modules/npm/man/man1/npm-audit.1 +1 -1
- package/node_modules/npm/man/man1/npm-bin.1 +1 -1
- package/node_modules/npm/man/man1/npm-bugs.1 +1 -1
- package/node_modules/npm/man/man1/npm-build.1 +1 -1
- package/node_modules/npm/man/man1/npm-bundle.1 +1 -1
- package/node_modules/npm/man/man1/npm-cache.1 +1 -1
- package/node_modules/npm/man/man1/npm-ci.1 +1 -1
- package/node_modules/npm/man/man1/npm-completion.1 +1 -1
- package/node_modules/npm/man/man1/npm-config.1 +1 -1
- package/node_modules/npm/man/man1/npm-dedupe.1 +1 -1
- package/node_modules/npm/man/man1/npm-deprecate.1 +1 -1
- package/node_modules/npm/man/man1/npm-dist-tag.1 +1 -1
- package/node_modules/npm/man/man1/npm-docs.1 +1 -1
- package/node_modules/npm/man/man1/npm-doctor.1 +1 -1
- package/node_modules/npm/man/man1/npm-edit.1 +1 -1
- package/node_modules/npm/man/man1/npm-explore.1 +1 -1
- package/node_modules/npm/man/man1/npm-fund.1 +1 -1
- package/node_modules/npm/man/man1/npm-help-search.1 +1 -1
- package/node_modules/npm/man/man1/npm-help.1 +1 -1
- package/node_modules/npm/man/man1/npm-hook.1 +1 -1
- package/node_modules/npm/man/man1/npm-init.1 +1 -1
- package/node_modules/npm/man/man1/npm-install-ci-test.1 +1 -1
- package/node_modules/npm/man/man1/npm-install-test.1 +1 -1
- package/node_modules/npm/man/man1/npm-install.1 +1 -1
- package/node_modules/npm/man/man1/npm-link.1 +1 -1
- package/node_modules/npm/man/man1/npm-logout.1 +1 -1
- package/node_modules/npm/man/man1/npm-ls.1 +2 -2
- package/node_modules/npm/man/man1/npm-org.1 +1 -1
- package/node_modules/npm/man/man1/npm-outdated.1 +1 -1
- package/node_modules/npm/man/man1/npm-owner.1 +1 -1
- package/node_modules/npm/man/man1/npm-pack.1 +1 -1
- package/node_modules/npm/man/man1/npm-ping.1 +1 -1
- package/node_modules/npm/man/man1/npm-prefix.1 +1 -1
- package/node_modules/npm/man/man1/npm-profile.1 +1 -1
- package/node_modules/npm/man/man1/npm-prune.1 +1 -1
- package/node_modules/npm/man/man1/npm-publish.1 +1 -1
- package/node_modules/npm/man/man1/npm-rebuild.1 +1 -1
- package/node_modules/npm/man/man1/npm-repo.1 +1 -1
- package/node_modules/npm/man/man1/npm-restart.1 +1 -1
- package/node_modules/npm/man/man1/npm-root.1 +1 -1
- package/node_modules/npm/man/man1/npm-run-script.1 +1 -1
- package/node_modules/npm/man/man1/npm-search.1 +1 -1
- package/node_modules/npm/man/man1/npm-shrinkwrap.1 +1 -1
- package/node_modules/npm/man/man1/npm-star.1 +1 -1
- package/node_modules/npm/man/man1/npm-stars.1 +1 -1
- package/node_modules/npm/man/man1/npm-start.1 +1 -1
- package/node_modules/npm/man/man1/npm-stop.1 +1 -1
- package/node_modules/npm/man/man1/npm-team.1 +1 -1
- package/node_modules/npm/man/man1/npm-test.1 +1 -1
- package/node_modules/npm/man/man1/npm-token.1 +1 -1
- package/node_modules/npm/man/man1/npm-uninstall.1 +1 -1
- package/node_modules/npm/man/man1/npm-unpublish.1 +1 -1
- package/node_modules/npm/man/man1/npm-update.1 +1 -1
- package/node_modules/npm/man/man1/npm-version.1 +1 -1
- package/node_modules/npm/man/man1/npm-view.1 +1 -1
- package/node_modules/npm/man/man1/npm-whoami.1 +1 -1
- package/node_modules/npm/man/man1/npm.1 +2 -2
- package/node_modules/npm/man/man5/folders.5 +1 -1
- package/node_modules/npm/man/man5/install.5 +1 -1
- package/node_modules/npm/man/man5/npmrc.5 +1 -1
- package/node_modules/npm/man/man5/package-json.5 +1 -1
- package/node_modules/npm/man/man5/package-lock-json.5 +1 -1
- package/node_modules/npm/man/man5/package-locks.5 +1 -1
- package/node_modules/npm/man/man5/shrinkwrap-json.5 +1 -1
- package/node_modules/npm/man/man7/config.7 +1 -1
- package/node_modules/npm/man/man7/developers.7 +1 -1
- package/node_modules/npm/man/man7/disputes.7 +1 -1
- package/node_modules/npm/man/man7/orgs.7 +1 -1
- package/node_modules/npm/man/man7/registry.7 +1 -1
- package/node_modules/npm/man/man7/removal.7 +1 -1
- package/node_modules/npm/man/man7/scope.7 +1 -1
- package/node_modules/npm/man/man7/scripts.7 +1 -1
- package/node_modules/npm/man/man7/semver.7 +1 -1
- package/node_modules/npm/node_modules/cliui/node_modules/ansi-regex/index.js +1 -1
- package/node_modules/npm/node_modules/cliui/node_modules/ansi-regex/package.json +1 -1
- package/node_modules/npm/node_modules/minimist/index.js +6 -2
- package/node_modules/npm/node_modules/minimist/package.json +1 -1
- package/node_modules/npm/node_modules/minimist/readme.markdown +4 -1
- package/node_modules/npm/node_modules/minimist/test/proto.js +16 -0
- package/node_modules/npm/node_modules/mkdirp/node_modules/minimist/index.js +6 -2
- package/node_modules/npm/node_modules/mkdirp/node_modules/minimist/package.json +1 -1
- package/node_modules/npm/node_modules/mkdirp/node_modules/minimist/readme.markdown +4 -1
- package/node_modules/npm/node_modules/mkdirp/node_modules/minimist/test/proto.js +16 -0
- package/node_modules/npm/node_modules/wrap-ansi/node_modules/ansi-regex/index.js +1 -1
- package/node_modules/npm/node_modules/wrap-ansi/node_modules/ansi-regex/package.json +1 -1
- package/node_modules/npm/package.json +1 -1
- package/node_modules/npm-run-path/index.js +39 -0
- package/node_modules/npm-run-path/license +21 -0
- package/node_modules/npm-run-path/package.json +45 -0
- package/node_modules/npm-run-path/readme.md +81 -0
- package/node_modules/object-assign/index.js +90 -0
- package/node_modules/object-assign/license +21 -0
- package/node_modules/object-assign/package.json +42 -0
- package/node_modules/object-assign/readme.md +61 -0
- package/node_modules/object-inspect/CHANGELOG.md +18 -0
- package/node_modules/object-inspect/index.js +7 -6
- package/node_modules/object-inspect/package-support.json +20 -0
- package/node_modules/object-inspect/package.json +20 -10
- package/node_modules/object-inspect/test/err.js +3 -3
- package/node_modules/object-inspect/test/has.js +6 -25
- package/node_modules/object-inspect/test/inspect.js +37 -0
- package/node_modules/object-inspect/test/values.js +3 -3
- package/node_modules/p-finally/index.js +15 -0
- package/node_modules/p-finally/license +21 -0
- package/node_modules/p-finally/package.json +42 -0
- package/node_modules/p-finally/readme.md +47 -0
- package/node_modules/package-json/index.js +67 -0
- package/node_modules/package-json/license +21 -0
- package/node_modules/package-json/package.json +43 -0
- package/node_modules/package-json/readme.md +91 -0
- package/node_modules/path-exists/index.js +17 -0
- package/node_modules/path-exists/license +21 -0
- package/node_modules/path-exists/package.json +40 -0
- package/node_modules/path-exists/readme.md +50 -0
- package/node_modules/path-is-inside/LICENSE.txt +47 -0
- package/node_modules/path-is-inside/lib/path-is-inside.js +28 -0
- package/node_modules/path-is-inside/package.json +21 -0
- package/node_modules/path-key/index.js +13 -0
- package/node_modules/path-key/license +21 -0
- package/node_modules/path-key/package.json +39 -0
- package/node_modules/path-key/readme.md +51 -0
- package/node_modules/pify/index.js +84 -0
- package/node_modules/pify/license +9 -0
- package/node_modules/pify/package.json +51 -0
- package/node_modules/pify/readme.md +131 -0
- package/node_modules/prepend-http/index.js +14 -0
- package/node_modules/prepend-http/license +21 -0
- package/node_modules/prepend-http/package.json +35 -0
- package/node_modules/prepend-http/readme.md +31 -0
- package/node_modules/process-nextick-args/index.js +45 -0
- package/node_modules/process-nextick-args/license.md +19 -0
- package/node_modules/process-nextick-args/package.json +25 -0
- package/node_modules/process-nextick-args/readme.md +18 -0
- package/node_modules/pseudomap/LICENSE +15 -0
- package/node_modules/pseudomap/README.md +60 -0
- package/node_modules/pseudomap/map.js +9 -0
- package/node_modules/pseudomap/package.json +25 -0
- package/node_modules/pseudomap/pseudomap.js +113 -0
- package/node_modules/pseudomap/test/basic.js +86 -0
- package/node_modules/rc/LICENSE.APACHE2 +15 -0
- package/node_modules/rc/LICENSE.BSD +26 -0
- package/node_modules/rc/LICENSE.MIT +24 -0
- package/node_modules/rc/README.md +227 -0
- package/node_modules/rc/browser.js +7 -0
- package/node_modules/rc/cli.js +4 -0
- package/node_modules/rc/index.js +53 -0
- package/node_modules/rc/lib/utils.js +104 -0
- package/node_modules/rc/package.json +29 -0
- package/node_modules/rc/test/ini.js +16 -0
- package/node_modules/rc/test/nested-env-vars.js +50 -0
- package/node_modules/rc/test/test.js +59 -0
- package/node_modules/registry-auth-token/.npmignore +6 -0
- package/node_modules/registry-auth-token/CHANGELOG.md +112 -0
- package/node_modules/registry-auth-token/LICENSE +21 -0
- package/node_modules/registry-auth-token/README.md +65 -0
- package/node_modules/registry-auth-token/base64.js +14 -0
- package/node_modules/registry-auth-token/index.js +123 -0
- package/node_modules/registry-auth-token/package.json +46 -0
- package/node_modules/registry-auth-token/registry-url.js +5 -0
- package/node_modules/registry-auth-token/test/auth-token.test.js +455 -0
- package/node_modules/registry-auth-token/test/registry-url.test.js +64 -0
- package/node_modules/registry-auth-token/yarn.lock +1516 -0
- package/node_modules/registry-url/index.js +6 -0
- package/node_modules/registry-url/license +21 -0
- package/node_modules/registry-url/package.json +40 -0
- package/node_modules/registry-url/readme.md +50 -0
- package/node_modules/rimraf/LICENSE +15 -0
- package/node_modules/rimraf/README.md +101 -0
- package/node_modules/rimraf/bin.js +50 -0
- package/node_modules/rimraf/package.json +29 -0
- package/node_modules/rimraf/rimraf.js +364 -0
- package/node_modules/semver/CHANGELOG.md +39 -0
- package/node_modules/semver/LICENSE +15 -0
- package/node_modules/semver/README.md +412 -0
- package/node_modules/semver/bin/semver +160 -0
- package/node_modules/semver/package.json +28 -0
- package/node_modules/semver/range.bnf +16 -0
- package/node_modules/semver/semver.js +1483 -0
- package/node_modules/semver-diff/index.js +27 -0
- package/node_modules/semver-diff/license +21 -0
- package/node_modules/semver-diff/package.json +34 -0
- package/node_modules/semver-diff/readme.md +52 -0
- package/node_modules/send/HISTORY.md +15 -0
- package/node_modules/send/LICENSE +1 -1
- package/node_modules/send/README.md +2 -2
- package/node_modules/send/SECURITY.md +24 -0
- package/node_modules/send/index.js +37 -27
- package/node_modules/send/package.json +10 -9
- package/node_modules/serve-static/HISTORY.md +12 -0
- package/node_modules/serve-static/README.md +1 -1
- package/node_modules/serve-static/package.json +5 -5
- package/node_modules/shebang-command/index.js +19 -0
- package/node_modules/shebang-command/license +21 -0
- package/node_modules/shebang-command/package.json +39 -0
- package/node_modules/shebang-command/readme.md +39 -0
- package/node_modules/shebang-regex/index.js +2 -0
- package/node_modules/shebang-regex/license +21 -0
- package/node_modules/shebang-regex/package.json +32 -0
- package/node_modules/shebang-regex/readme.md +29 -0
- package/node_modules/signal-exit/LICENSE.txt +16 -0
- package/node_modules/signal-exit/README.md +39 -0
- package/node_modules/signal-exit/index.js +202 -0
- package/node_modules/signal-exit/package.json +38 -0
- package/node_modules/signal-exit/signals.js +53 -0
- package/node_modules/statuses/HISTORY.md +17 -0
- package/node_modules/statuses/README.md +51 -42
- package/node_modules/statuses/codes.json +2 -3
- package/node_modules/statuses/index.js +52 -19
- package/node_modules/statuses/package.json +17 -16
- package/node_modules/string-width/index.js +36 -0
- package/node_modules/string-width/license +9 -0
- package/node_modules/string-width/package.json +55 -0
- package/node_modules/string-width/readme.md +42 -0
- package/node_modules/strip-ansi/index.js +4 -0
- package/node_modules/strip-ansi/license +9 -0
- package/node_modules/strip-ansi/package.json +52 -0
- package/node_modules/strip-ansi/readme.md +39 -0
- package/node_modules/strip-eof/index.js +15 -0
- package/node_modules/strip-eof/license +21 -0
- package/node_modules/strip-eof/package.json +39 -0
- package/node_modules/strip-eof/readme.md +28 -0
- package/node_modules/strip-json-comments/index.js +70 -0
- package/node_modules/strip-json-comments/license +21 -0
- package/node_modules/strip-json-comments/package.json +42 -0
- package/node_modules/strip-json-comments/readme.md +64 -0
- package/node_modules/supports-color/browser.js +5 -0
- package/node_modules/supports-color/index.js +131 -0
- package/node_modules/supports-color/license +9 -0
- package/node_modules/supports-color/package.json +53 -0
- package/node_modules/supports-color/readme.md +66 -0
- package/node_modules/term-size/index.js +70 -0
- package/node_modules/term-size/license +21 -0
- package/node_modules/term-size/package.json +43 -0
- package/node_modules/term-size/readme.md +41 -0
- package/node_modules/term-size/vendor/macos/term-size +0 -0
- package/node_modules/term-size/vendor/windows/term-size.exe +0 -0
- package/node_modules/timed-out/index.js +55 -0
- package/node_modules/{send/node_modules/destroy/LICENSE → timed-out/license} +1 -2
- package/node_modules/timed-out/package.json +36 -0
- package/node_modules/timed-out/readme.md +42 -0
- package/node_modules/underscore/LICENSE +1 -1
- package/node_modules/underscore/amd/_collectNonEnumProps.js +1 -1
- package/node_modules/underscore/amd/_setup.js +3 -3
- package/node_modules/underscore/amd/isObject.js +1 -1
- package/node_modules/underscore/amd/max.js +2 -2
- package/node_modules/underscore/amd/min.js +2 -2
- package/node_modules/underscore/amd/unzip.js +1 -1
- package/node_modules/underscore/cjs/_collectNonEnumProps.js +1 -1
- package/node_modules/underscore/cjs/_setup.js +3 -3
- package/node_modules/underscore/cjs/isObject.js +1 -1
- package/node_modules/underscore/cjs/max.js +2 -2
- package/node_modules/underscore/cjs/min.js +2 -2
- package/node_modules/underscore/cjs/unzip.js +1 -1
- package/node_modules/underscore/modules/.eslintrc +10 -1
- package/node_modules/underscore/modules/_collectNonEnumProps.js +1 -1
- package/node_modules/underscore/modules/_setup.js +3 -3
- package/node_modules/underscore/modules/index.js +2 -2
- package/node_modules/underscore/modules/isObject.js +1 -1
- package/node_modules/underscore/modules/max.js +2 -2
- package/node_modules/underscore/modules/min.js +2 -2
- package/node_modules/underscore/modules/package.json +1 -3
- package/node_modules/underscore/modules/unzip.js +1 -1
- package/node_modules/underscore/package.json +7 -3
- package/node_modules/underscore/underscore-esm-min.js +3 -3
- package/node_modules/underscore/underscore-esm-min.js.map +1 -1
- package/node_modules/underscore/underscore-esm.js +12 -12
- package/node_modules/underscore/underscore-esm.js.map +1 -1
- package/node_modules/underscore/underscore-min.js +3 -3
- package/node_modules/underscore/underscore-min.js.map +1 -1
- package/node_modules/underscore/underscore-node-f.cjs +12 -12
- package/node_modules/underscore/underscore-node-f.cjs.map +1 -1
- package/node_modules/underscore/underscore-node.cjs +2 -2
- package/node_modules/underscore/underscore-node.mjs +2 -2
- package/node_modules/underscore/underscore-umd-min.js +3 -3
- package/node_modules/underscore/underscore-umd-min.js.map +1 -1
- package/node_modules/underscore/underscore-umd.js +12 -12
- package/node_modules/underscore/underscore-umd.js.map +1 -1
- package/node_modules/underscore/underscore.js +12 -12
- package/node_modules/unique-string/index.js +4 -0
- package/node_modules/unique-string/license +21 -0
- package/node_modules/unique-string/package.json +44 -0
- package/node_modules/unique-string/readme.md +32 -0
- package/node_modules/unzip-response/index.js +36 -0
- package/node_modules/unzip-response/license +21 -0
- package/node_modules/unzip-response/package.json +49 -0
- package/node_modules/unzip-response/readme.md +29 -0
- package/node_modules/update-notifier/check.js +22 -0
- package/node_modules/update-notifier/index.js +155 -0
- package/node_modules/update-notifier/license +9 -0
- package/node_modules/update-notifier/package.json +55 -0
- package/node_modules/update-notifier/readme.md +193 -0
- package/node_modules/url-parse-lax/index.js +14 -0
- package/node_modules/url-parse-lax/license +21 -0
- package/node_modules/url-parse-lax/package.json +41 -0
- package/node_modules/url-parse-lax/readme.md +100 -0
- package/node_modules/util-deprecate/History.md +16 -0
- package/node_modules/util-deprecate/LICENSE +24 -0
- package/node_modules/util-deprecate/README.md +53 -0
- package/node_modules/util-deprecate/browser.js +67 -0
- package/node_modules/util-deprecate/node.js +6 -0
- package/node_modules/util-deprecate/package.json +27 -0
- package/node_modules/which/CHANGELOG.md +152 -0
- package/node_modules/which/LICENSE +15 -0
- package/node_modules/which/README.md +51 -0
- package/node_modules/which/bin/which +52 -0
- package/node_modules/which/package.json +30 -0
- package/node_modules/which/which.js +135 -0
- package/node_modules/widest-line/index.js +8 -0
- package/node_modules/widest-line/license +9 -0
- package/node_modules/widest-line/package.json +54 -0
- package/node_modules/widest-line/readme.md +34 -0
- package/node_modules/write-file-atomic/CHANGELOG.md +25 -0
- package/node_modules/write-file-atomic/LICENSE +6 -0
- package/node_modules/write-file-atomic/README.md +56 -0
- package/node_modules/write-file-atomic/index.js +238 -0
- package/node_modules/write-file-atomic/package.json +41 -0
- package/node_modules/xdg-basedir/index.js +28 -0
- package/node_modules/xdg-basedir/license +21 -0
- package/node_modules/xdg-basedir/package.json +40 -0
- package/node_modules/xdg-basedir/readme.md +60 -0
- package/node_modules/yallist/LICENSE +15 -0
- package/node_modules/yallist/README.md +204 -0
- package/node_modules/yallist/iterator.js +7 -0
- package/node_modules/yallist/package.json +29 -0
- package/node_modules/yallist/yallist.js +370 -0
- package/package.json +3 -2
- package/node_modules/express/node_modules/body-parser/HISTORY.md +0 -633
- package/node_modules/express/node_modules/body-parser/LICENSE +0 -23
- package/node_modules/express/node_modules/body-parser/README.md +0 -456
- package/node_modules/express/node_modules/body-parser/index.js +0 -157
- package/node_modules/express/node_modules/body-parser/lib/read.js +0 -181
- package/node_modules/express/node_modules/body-parser/lib/types/json.js +0 -230
- package/node_modules/express/node_modules/body-parser/lib/types/raw.js +0 -101
- package/node_modules/express/node_modules/body-parser/lib/types/text.js +0 -121
- package/node_modules/express/node_modules/body-parser/lib/types/urlencoded.js +0 -284
- package/node_modules/express/node_modules/body-parser/package.json +0 -52
- package/node_modules/express/node_modules/depd/History.md +0 -96
- package/node_modules/express/node_modules/depd/LICENSE +0 -22
- package/node_modules/express/node_modules/depd/Readme.md +0 -280
- package/node_modules/express/node_modules/depd/index.js +0 -522
- package/node_modules/express/node_modules/depd/lib/browser/index.js +0 -77
- package/node_modules/express/node_modules/depd/lib/compat/callsite-tostring.js +0 -103
- package/node_modules/express/node_modules/depd/lib/compat/event-listener-count.js +0 -22
- package/node_modules/express/node_modules/depd/lib/compat/index.js +0 -79
- package/node_modules/express/node_modules/depd/package.json +0 -41
- package/node_modules/express/node_modules/http-errors/HISTORY.md +0 -165
- package/node_modules/express/node_modules/http-errors/README.md +0 -169
- package/node_modules/express/node_modules/http-errors/index.js +0 -299
- package/node_modules/express/node_modules/http-errors/package.json +0 -49
- package/node_modules/express/node_modules/on-finished/HISTORY.md +0 -88
- package/node_modules/express/node_modules/on-finished/LICENSE +0 -23
- package/node_modules/express/node_modules/on-finished/README.md +0 -154
- package/node_modules/express/node_modules/on-finished/index.js +0 -196
- package/node_modules/express/node_modules/on-finished/package.json +0 -31
- package/node_modules/express/node_modules/qs/.eslintrc +0 -38
- package/node_modules/express/node_modules/qs/CHANGELOG.md +0 -371
- package/node_modules/express/node_modules/qs/LICENSE.md +0 -29
- package/node_modules/express/node_modules/qs/README.md +0 -616
- package/node_modules/express/node_modules/qs/dist/qs.js +0 -842
- package/node_modules/express/node_modules/qs/lib/formats.js +0 -23
- package/node_modules/express/node_modules/qs/lib/index.js +0 -11
- package/node_modules/express/node_modules/qs/lib/parse.js +0 -257
- package/node_modules/express/node_modules/qs/lib/stringify.js +0 -287
- package/node_modules/express/node_modules/qs/lib/utils.js +0 -252
- package/node_modules/express/node_modules/qs/package.json +0 -70
- package/node_modules/express/node_modules/qs/test/parse.js +0 -832
- package/node_modules/express/node_modules/qs/test/stringify.js +0 -804
- package/node_modules/express/node_modules/qs/test/utils.js +0 -136
- package/node_modules/express/node_modules/raw-body/HISTORY.md +0 -289
- package/node_modules/express/node_modules/raw-body/LICENSE +0 -22
- package/node_modules/express/node_modules/raw-body/README.md +0 -219
- package/node_modules/express/node_modules/raw-body/index.d.ts +0 -87
- package/node_modules/express/node_modules/raw-body/index.js +0 -286
- package/node_modules/express/node_modules/raw-body/package.json +0 -48
- package/node_modules/finalhandler/node_modules/on-finished/HISTORY.md +0 -88
- package/node_modules/finalhandler/node_modules/on-finished/LICENSE +0 -23
- package/node_modules/finalhandler/node_modules/on-finished/README.md +0 -154
- package/node_modules/finalhandler/node_modules/on-finished/index.js +0 -196
- package/node_modules/finalhandler/node_modules/on-finished/package.json +0 -31
- package/node_modules/http-errors/node_modules/statuses/HISTORY.md +0 -82
- package/node_modules/http-errors/node_modules/statuses/README.md +0 -136
- package/node_modules/http-errors/node_modules/statuses/codes.json +0 -65
- package/node_modules/http-errors/node_modules/statuses/index.js +0 -146
- package/node_modules/http-errors/node_modules/statuses/package.json +0 -49
- package/node_modules/object-inspect/.eslintignore +0 -1
- package/node_modules/send/node_modules/depd/History.md +0 -96
- package/node_modules/send/node_modules/depd/Readme.md +0 -280
- package/node_modules/send/node_modules/depd/index.js +0 -522
- package/node_modules/send/node_modules/depd/lib/browser/index.js +0 -77
- package/node_modules/send/node_modules/depd/lib/compat/callsite-tostring.js +0 -103
- package/node_modules/send/node_modules/depd/lib/compat/event-listener-count.js +0 -22
- package/node_modules/send/node_modules/depd/lib/compat/index.js +0 -79
- package/node_modules/send/node_modules/depd/package.json +0 -41
- package/node_modules/send/node_modules/destroy/README.md +0 -60
- package/node_modules/send/node_modules/destroy/index.js +0 -75
- package/node_modules/send/node_modules/destroy/package.json +0 -37
- package/node_modules/send/node_modules/http-errors/HISTORY.md +0 -165
- package/node_modules/send/node_modules/http-errors/README.md +0 -169
- package/node_modules/send/node_modules/http-errors/index.js +0 -299
- package/node_modules/send/node_modules/http-errors/package.json +0 -49
- package/node_modules/send/node_modules/on-finished/HISTORY.md +0 -88
- package/node_modules/send/node_modules/on-finished/LICENSE +0 -23
- package/node_modules/send/node_modules/on-finished/README.md +0 -154
- package/node_modules/send/node_modules/on-finished/index.js +0 -196
- package/node_modules/send/node_modules/on-finished/package.json +0 -31
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "lowercase-keys",
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "Lowercase the keys of an object",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"repository": "sindresorhus/lowercase-keys",
|
|
7
|
+
"author": {
|
|
8
|
+
"name": "Sindre Sorhus",
|
|
9
|
+
"email": "sindresorhus@gmail.com",
|
|
10
|
+
"url": "sindresorhus.com"
|
|
11
|
+
},
|
|
12
|
+
"engines": {
|
|
13
|
+
"node": ">=0.10.0"
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"test": "ava"
|
|
17
|
+
},
|
|
18
|
+
"files": [
|
|
19
|
+
"index.js"
|
|
20
|
+
],
|
|
21
|
+
"keywords": [
|
|
22
|
+
"object",
|
|
23
|
+
"assign",
|
|
24
|
+
"extend",
|
|
25
|
+
"properties",
|
|
26
|
+
"lowercase",
|
|
27
|
+
"lower-case",
|
|
28
|
+
"case",
|
|
29
|
+
"keys",
|
|
30
|
+
"key"
|
|
31
|
+
],
|
|
32
|
+
"devDependencies": {
|
|
33
|
+
"ava": "*"
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
# lowercase-keys [](https://travis-ci.org/sindresorhus/lowercase-keys)
|
|
2
|
+
|
|
3
|
+
> Lowercase the keys of an object
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
## Install
|
|
7
|
+
|
|
8
|
+
```
|
|
9
|
+
$ npm install --save lowercase-keys
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
## Usage
|
|
14
|
+
|
|
15
|
+
```js
|
|
16
|
+
var lowercaseKeys = require('lowercase-keys');
|
|
17
|
+
|
|
18
|
+
lowercaseKeys({FOO: true, bAr: false});
|
|
19
|
+
//=> {foo: true, bar: false}
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
## API
|
|
24
|
+
|
|
25
|
+
### lowercaseKeys(object)
|
|
26
|
+
|
|
27
|
+
Lowercases the keys and returns a new object.
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
## License
|
|
32
|
+
|
|
33
|
+
MIT © [Sindre Sorhus](http://sindresorhus.com)
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
The ISC License
|
|
2
|
+
|
|
3
|
+
Copyright (c) Isaac Z. Schlueter and Contributors
|
|
4
|
+
|
|
5
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
6
|
+
purpose with or without fee is hereby granted, provided that the above
|
|
7
|
+
copyright notice and this permission notice appear in all copies.
|
|
8
|
+
|
|
9
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
|
|
10
|
+
WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
|
|
11
|
+
MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
|
|
12
|
+
ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|
|
13
|
+
WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
|
|
14
|
+
ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR
|
|
15
|
+
IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# lru cache
|
|
2
|
+
|
|
3
|
+
A cache object that deletes the least-recently-used items.
|
|
4
|
+
|
|
5
|
+
[](https://travis-ci.org/isaacs/node-lru-cache) [](https://coveralls.io/github/isaacs/node-lru-cache)
|
|
6
|
+
|
|
7
|
+
## Installation:
|
|
8
|
+
|
|
9
|
+
```javascript
|
|
10
|
+
npm install lru-cache --save
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## Usage:
|
|
14
|
+
|
|
15
|
+
```javascript
|
|
16
|
+
var LRU = require("lru-cache")
|
|
17
|
+
, options = { max: 500
|
|
18
|
+
, length: function (n, key) { return n * 2 + key.length }
|
|
19
|
+
, dispose: function (key, n) { n.close() }
|
|
20
|
+
, maxAge: 1000 * 60 * 60 }
|
|
21
|
+
, cache = LRU(options)
|
|
22
|
+
, otherCache = LRU(50) // sets just the max size
|
|
23
|
+
|
|
24
|
+
cache.set("key", "value")
|
|
25
|
+
cache.get("key") // "value"
|
|
26
|
+
|
|
27
|
+
// non-string keys ARE fully supported
|
|
28
|
+
// but note that it must be THE SAME object, not
|
|
29
|
+
// just a JSON-equivalent object.
|
|
30
|
+
var someObject = { a: 1 }
|
|
31
|
+
cache.set(someObject, 'a value')
|
|
32
|
+
// Object keys are not toString()-ed
|
|
33
|
+
cache.set('[object Object]', 'a different value')
|
|
34
|
+
assert.equal(cache.get(someObject), 'a value')
|
|
35
|
+
// A similar object with same keys/values won't work,
|
|
36
|
+
// because it's a different object identity
|
|
37
|
+
assert.equal(cache.get({ a: 1 }), undefined)
|
|
38
|
+
|
|
39
|
+
cache.reset() // empty the cache
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
If you put more stuff in it, then items will fall out.
|
|
43
|
+
|
|
44
|
+
If you try to put an oversized thing in it, then it'll fall out right
|
|
45
|
+
away.
|
|
46
|
+
|
|
47
|
+
## Options
|
|
48
|
+
|
|
49
|
+
* `max` The maximum size of the cache, checked by applying the length
|
|
50
|
+
function to all values in the cache. Not setting this is kind of
|
|
51
|
+
silly, since that's the whole purpose of this lib, but it defaults
|
|
52
|
+
to `Infinity`.
|
|
53
|
+
* `maxAge` Maximum age in ms. Items are not pro-actively pruned out
|
|
54
|
+
as they age, but if you try to get an item that is too old, it'll
|
|
55
|
+
drop it and return undefined instead of giving it to you.
|
|
56
|
+
* `length` Function that is used to calculate the length of stored
|
|
57
|
+
items. If you're storing strings or buffers, then you probably want
|
|
58
|
+
to do something like `function(n, key){return n.length}`. The default is
|
|
59
|
+
`function(){return 1}`, which is fine if you want to store `max`
|
|
60
|
+
like-sized things. The item is passed as the first argument, and
|
|
61
|
+
the key is passed as the second argumnet.
|
|
62
|
+
* `dispose` Function that is called on items when they are dropped
|
|
63
|
+
from the cache. This can be handy if you want to close file
|
|
64
|
+
descriptors or do other cleanup tasks when items are no longer
|
|
65
|
+
accessible. Called with `key, value`. It's called *before*
|
|
66
|
+
actually removing the item from the internal cache, so if you want
|
|
67
|
+
to immediately put it back in, you'll have to do that in a
|
|
68
|
+
`nextTick` or `setTimeout` callback or it won't do anything.
|
|
69
|
+
* `stale` By default, if you set a `maxAge`, it'll only actually pull
|
|
70
|
+
stale items out of the cache when you `get(key)`. (That is, it's
|
|
71
|
+
not pre-emptively doing a `setTimeout` or anything.) If you set
|
|
72
|
+
`stale:true`, it'll return the stale value before deleting it. If
|
|
73
|
+
you don't set this, then it'll return `undefined` when you try to
|
|
74
|
+
get a stale entry, as if it had already been deleted.
|
|
75
|
+
* `noDisposeOnSet` By default, if you set a `dispose()` method, then
|
|
76
|
+
it'll be called whenever a `set()` operation overwrites an existing
|
|
77
|
+
key. If you set this option, `dispose()` will only be called when a
|
|
78
|
+
key falls out of the cache, not when it is overwritten.
|
|
79
|
+
|
|
80
|
+
## API
|
|
81
|
+
|
|
82
|
+
* `set(key, value, maxAge)`
|
|
83
|
+
* `get(key) => value`
|
|
84
|
+
|
|
85
|
+
Both of these will update the "recently used"-ness of the key.
|
|
86
|
+
They do what you think. `maxAge` is optional and overrides the
|
|
87
|
+
cache `maxAge` option if provided.
|
|
88
|
+
|
|
89
|
+
If the key is not found, `get()` will return `undefined`.
|
|
90
|
+
|
|
91
|
+
The key and val can be any value.
|
|
92
|
+
|
|
93
|
+
* `peek(key)`
|
|
94
|
+
|
|
95
|
+
Returns the key value (or `undefined` if not found) without
|
|
96
|
+
updating the "recently used"-ness of the key.
|
|
97
|
+
|
|
98
|
+
(If you find yourself using this a lot, you *might* be using the
|
|
99
|
+
wrong sort of data structure, but there are some use cases where
|
|
100
|
+
it's handy.)
|
|
101
|
+
|
|
102
|
+
* `del(key)`
|
|
103
|
+
|
|
104
|
+
Deletes a key out of the cache.
|
|
105
|
+
|
|
106
|
+
* `reset()`
|
|
107
|
+
|
|
108
|
+
Clear the cache entirely, throwing away all values.
|
|
109
|
+
|
|
110
|
+
* `has(key)`
|
|
111
|
+
|
|
112
|
+
Check if a key is in the cache, without updating the recent-ness
|
|
113
|
+
or deleting it for being stale.
|
|
114
|
+
|
|
115
|
+
* `forEach(function(value,key,cache), [thisp])`
|
|
116
|
+
|
|
117
|
+
Just like `Array.prototype.forEach`. Iterates over all the keys
|
|
118
|
+
in the cache, in order of recent-ness. (Ie, more recently used
|
|
119
|
+
items are iterated over first.)
|
|
120
|
+
|
|
121
|
+
* `rforEach(function(value,key,cache), [thisp])`
|
|
122
|
+
|
|
123
|
+
The same as `cache.forEach(...)` but items are iterated over in
|
|
124
|
+
reverse order. (ie, less recently used items are iterated over
|
|
125
|
+
first.)
|
|
126
|
+
|
|
127
|
+
* `keys()`
|
|
128
|
+
|
|
129
|
+
Return an array of the keys in the cache.
|
|
130
|
+
|
|
131
|
+
* `values()`
|
|
132
|
+
|
|
133
|
+
Return an array of the values in the cache.
|
|
134
|
+
|
|
135
|
+
* `length`
|
|
136
|
+
|
|
137
|
+
Return total length of objects in cache taking into account
|
|
138
|
+
`length` options function.
|
|
139
|
+
|
|
140
|
+
* `itemCount`
|
|
141
|
+
|
|
142
|
+
Return total quantity of objects currently in cache. Note, that
|
|
143
|
+
`stale` (see options) items are returned as part of this item
|
|
144
|
+
count.
|
|
145
|
+
|
|
146
|
+
* `dump()`
|
|
147
|
+
|
|
148
|
+
Return an array of the cache entries ready for serialization and usage
|
|
149
|
+
with 'destinationCache.load(arr)`.
|
|
150
|
+
|
|
151
|
+
* `load(cacheEntriesArray)`
|
|
152
|
+
|
|
153
|
+
Loads another cache entries array, obtained with `sourceCache.dump()`,
|
|
154
|
+
into the cache. The destination cache is reset before loading new entries
|
|
155
|
+
|
|
156
|
+
* `prune()`
|
|
157
|
+
|
|
158
|
+
Manually iterates over the entire cache proactively pruning old entries
|
|
@@ -0,0 +1,468 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
module.exports = LRUCache
|
|
4
|
+
|
|
5
|
+
// This will be a proper iterable 'Map' in engines that support it,
|
|
6
|
+
// or a fakey-fake PseudoMap in older versions.
|
|
7
|
+
var Map = require('pseudomap')
|
|
8
|
+
var util = require('util')
|
|
9
|
+
|
|
10
|
+
// A linked list to keep track of recently-used-ness
|
|
11
|
+
var Yallist = require('yallist')
|
|
12
|
+
|
|
13
|
+
// use symbols if possible, otherwise just _props
|
|
14
|
+
var hasSymbol = typeof Symbol === 'function' && process.env._nodeLRUCacheForceNoSymbol !== '1'
|
|
15
|
+
var makeSymbol
|
|
16
|
+
if (hasSymbol) {
|
|
17
|
+
makeSymbol = function (key) {
|
|
18
|
+
return Symbol(key)
|
|
19
|
+
}
|
|
20
|
+
} else {
|
|
21
|
+
makeSymbol = function (key) {
|
|
22
|
+
return '_' + key
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
var MAX = makeSymbol('max')
|
|
27
|
+
var LENGTH = makeSymbol('length')
|
|
28
|
+
var LENGTH_CALCULATOR = makeSymbol('lengthCalculator')
|
|
29
|
+
var ALLOW_STALE = makeSymbol('allowStale')
|
|
30
|
+
var MAX_AGE = makeSymbol('maxAge')
|
|
31
|
+
var DISPOSE = makeSymbol('dispose')
|
|
32
|
+
var NO_DISPOSE_ON_SET = makeSymbol('noDisposeOnSet')
|
|
33
|
+
var LRU_LIST = makeSymbol('lruList')
|
|
34
|
+
var CACHE = makeSymbol('cache')
|
|
35
|
+
|
|
36
|
+
function naiveLength () { return 1 }
|
|
37
|
+
|
|
38
|
+
// lruList is a yallist where the head is the youngest
|
|
39
|
+
// item, and the tail is the oldest. the list contains the Hit
|
|
40
|
+
// objects as the entries.
|
|
41
|
+
// Each Hit object has a reference to its Yallist.Node. This
|
|
42
|
+
// never changes.
|
|
43
|
+
//
|
|
44
|
+
// cache is a Map (or PseudoMap) that matches the keys to
|
|
45
|
+
// the Yallist.Node object.
|
|
46
|
+
function LRUCache (options) {
|
|
47
|
+
if (!(this instanceof LRUCache)) {
|
|
48
|
+
return new LRUCache(options)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (typeof options === 'number') {
|
|
52
|
+
options = { max: options }
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
if (!options) {
|
|
56
|
+
options = {}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
var max = this[MAX] = options.max
|
|
60
|
+
// Kind of weird to have a default max of Infinity, but oh well.
|
|
61
|
+
if (!max ||
|
|
62
|
+
!(typeof max === 'number') ||
|
|
63
|
+
max <= 0) {
|
|
64
|
+
this[MAX] = Infinity
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
var lc = options.length || naiveLength
|
|
68
|
+
if (typeof lc !== 'function') {
|
|
69
|
+
lc = naiveLength
|
|
70
|
+
}
|
|
71
|
+
this[LENGTH_CALCULATOR] = lc
|
|
72
|
+
|
|
73
|
+
this[ALLOW_STALE] = options.stale || false
|
|
74
|
+
this[MAX_AGE] = options.maxAge || 0
|
|
75
|
+
this[DISPOSE] = options.dispose
|
|
76
|
+
this[NO_DISPOSE_ON_SET] = options.noDisposeOnSet || false
|
|
77
|
+
this.reset()
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
// resize the cache when the max changes.
|
|
81
|
+
Object.defineProperty(LRUCache.prototype, 'max', {
|
|
82
|
+
set: function (mL) {
|
|
83
|
+
if (!mL || !(typeof mL === 'number') || mL <= 0) {
|
|
84
|
+
mL = Infinity
|
|
85
|
+
}
|
|
86
|
+
this[MAX] = mL
|
|
87
|
+
trim(this)
|
|
88
|
+
},
|
|
89
|
+
get: function () {
|
|
90
|
+
return this[MAX]
|
|
91
|
+
},
|
|
92
|
+
enumerable: true
|
|
93
|
+
})
|
|
94
|
+
|
|
95
|
+
Object.defineProperty(LRUCache.prototype, 'allowStale', {
|
|
96
|
+
set: function (allowStale) {
|
|
97
|
+
this[ALLOW_STALE] = !!allowStale
|
|
98
|
+
},
|
|
99
|
+
get: function () {
|
|
100
|
+
return this[ALLOW_STALE]
|
|
101
|
+
},
|
|
102
|
+
enumerable: true
|
|
103
|
+
})
|
|
104
|
+
|
|
105
|
+
Object.defineProperty(LRUCache.prototype, 'maxAge', {
|
|
106
|
+
set: function (mA) {
|
|
107
|
+
if (!mA || !(typeof mA === 'number') || mA < 0) {
|
|
108
|
+
mA = 0
|
|
109
|
+
}
|
|
110
|
+
this[MAX_AGE] = mA
|
|
111
|
+
trim(this)
|
|
112
|
+
},
|
|
113
|
+
get: function () {
|
|
114
|
+
return this[MAX_AGE]
|
|
115
|
+
},
|
|
116
|
+
enumerable: true
|
|
117
|
+
})
|
|
118
|
+
|
|
119
|
+
// resize the cache when the lengthCalculator changes.
|
|
120
|
+
Object.defineProperty(LRUCache.prototype, 'lengthCalculator', {
|
|
121
|
+
set: function (lC) {
|
|
122
|
+
if (typeof lC !== 'function') {
|
|
123
|
+
lC = naiveLength
|
|
124
|
+
}
|
|
125
|
+
if (lC !== this[LENGTH_CALCULATOR]) {
|
|
126
|
+
this[LENGTH_CALCULATOR] = lC
|
|
127
|
+
this[LENGTH] = 0
|
|
128
|
+
this[LRU_LIST].forEach(function (hit) {
|
|
129
|
+
hit.length = this[LENGTH_CALCULATOR](hit.value, hit.key)
|
|
130
|
+
this[LENGTH] += hit.length
|
|
131
|
+
}, this)
|
|
132
|
+
}
|
|
133
|
+
trim(this)
|
|
134
|
+
},
|
|
135
|
+
get: function () { return this[LENGTH_CALCULATOR] },
|
|
136
|
+
enumerable: true
|
|
137
|
+
})
|
|
138
|
+
|
|
139
|
+
Object.defineProperty(LRUCache.prototype, 'length', {
|
|
140
|
+
get: function () { return this[LENGTH] },
|
|
141
|
+
enumerable: true
|
|
142
|
+
})
|
|
143
|
+
|
|
144
|
+
Object.defineProperty(LRUCache.prototype, 'itemCount', {
|
|
145
|
+
get: function () { return this[LRU_LIST].length },
|
|
146
|
+
enumerable: true
|
|
147
|
+
})
|
|
148
|
+
|
|
149
|
+
LRUCache.prototype.rforEach = function (fn, thisp) {
|
|
150
|
+
thisp = thisp || this
|
|
151
|
+
for (var walker = this[LRU_LIST].tail; walker !== null;) {
|
|
152
|
+
var prev = walker.prev
|
|
153
|
+
forEachStep(this, fn, walker, thisp)
|
|
154
|
+
walker = prev
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
function forEachStep (self, fn, node, thisp) {
|
|
159
|
+
var hit = node.value
|
|
160
|
+
if (isStale(self, hit)) {
|
|
161
|
+
del(self, node)
|
|
162
|
+
if (!self[ALLOW_STALE]) {
|
|
163
|
+
hit = undefined
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
if (hit) {
|
|
167
|
+
fn.call(thisp, hit.value, hit.key, self)
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
LRUCache.prototype.forEach = function (fn, thisp) {
|
|
172
|
+
thisp = thisp || this
|
|
173
|
+
for (var walker = this[LRU_LIST].head; walker !== null;) {
|
|
174
|
+
var next = walker.next
|
|
175
|
+
forEachStep(this, fn, walker, thisp)
|
|
176
|
+
walker = next
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
LRUCache.prototype.keys = function () {
|
|
181
|
+
return this[LRU_LIST].toArray().map(function (k) {
|
|
182
|
+
return k.key
|
|
183
|
+
}, this)
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
LRUCache.prototype.values = function () {
|
|
187
|
+
return this[LRU_LIST].toArray().map(function (k) {
|
|
188
|
+
return k.value
|
|
189
|
+
}, this)
|
|
190
|
+
}
|
|
191
|
+
|
|
192
|
+
LRUCache.prototype.reset = function () {
|
|
193
|
+
if (this[DISPOSE] &&
|
|
194
|
+
this[LRU_LIST] &&
|
|
195
|
+
this[LRU_LIST].length) {
|
|
196
|
+
this[LRU_LIST].forEach(function (hit) {
|
|
197
|
+
this[DISPOSE](hit.key, hit.value)
|
|
198
|
+
}, this)
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
this[CACHE] = new Map() // hash of items by key
|
|
202
|
+
this[LRU_LIST] = new Yallist() // list of items in order of use recency
|
|
203
|
+
this[LENGTH] = 0 // length of items in the list
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
LRUCache.prototype.dump = function () {
|
|
207
|
+
return this[LRU_LIST].map(function (hit) {
|
|
208
|
+
if (!isStale(this, hit)) {
|
|
209
|
+
return {
|
|
210
|
+
k: hit.key,
|
|
211
|
+
v: hit.value,
|
|
212
|
+
e: hit.now + (hit.maxAge || 0)
|
|
213
|
+
}
|
|
214
|
+
}
|
|
215
|
+
}, this).toArray().filter(function (h) {
|
|
216
|
+
return h
|
|
217
|
+
})
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
LRUCache.prototype.dumpLru = function () {
|
|
221
|
+
return this[LRU_LIST]
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
/* istanbul ignore next */
|
|
225
|
+
LRUCache.prototype.inspect = function (n, opts) {
|
|
226
|
+
var str = 'LRUCache {'
|
|
227
|
+
var extras = false
|
|
228
|
+
|
|
229
|
+
var as = this[ALLOW_STALE]
|
|
230
|
+
if (as) {
|
|
231
|
+
str += '\n allowStale: true'
|
|
232
|
+
extras = true
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
var max = this[MAX]
|
|
236
|
+
if (max && max !== Infinity) {
|
|
237
|
+
if (extras) {
|
|
238
|
+
str += ','
|
|
239
|
+
}
|
|
240
|
+
str += '\n max: ' + util.inspect(max, opts)
|
|
241
|
+
extras = true
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
var maxAge = this[MAX_AGE]
|
|
245
|
+
if (maxAge) {
|
|
246
|
+
if (extras) {
|
|
247
|
+
str += ','
|
|
248
|
+
}
|
|
249
|
+
str += '\n maxAge: ' + util.inspect(maxAge, opts)
|
|
250
|
+
extras = true
|
|
251
|
+
}
|
|
252
|
+
|
|
253
|
+
var lc = this[LENGTH_CALCULATOR]
|
|
254
|
+
if (lc && lc !== naiveLength) {
|
|
255
|
+
if (extras) {
|
|
256
|
+
str += ','
|
|
257
|
+
}
|
|
258
|
+
str += '\n length: ' + util.inspect(this[LENGTH], opts)
|
|
259
|
+
extras = true
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
var didFirst = false
|
|
263
|
+
this[LRU_LIST].forEach(function (item) {
|
|
264
|
+
if (didFirst) {
|
|
265
|
+
str += ',\n '
|
|
266
|
+
} else {
|
|
267
|
+
if (extras) {
|
|
268
|
+
str += ',\n'
|
|
269
|
+
}
|
|
270
|
+
didFirst = true
|
|
271
|
+
str += '\n '
|
|
272
|
+
}
|
|
273
|
+
var key = util.inspect(item.key).split('\n').join('\n ')
|
|
274
|
+
var val = { value: item.value }
|
|
275
|
+
if (item.maxAge !== maxAge) {
|
|
276
|
+
val.maxAge = item.maxAge
|
|
277
|
+
}
|
|
278
|
+
if (lc !== naiveLength) {
|
|
279
|
+
val.length = item.length
|
|
280
|
+
}
|
|
281
|
+
if (isStale(this, item)) {
|
|
282
|
+
val.stale = true
|
|
283
|
+
}
|
|
284
|
+
|
|
285
|
+
val = util.inspect(val, opts).split('\n').join('\n ')
|
|
286
|
+
str += key + ' => ' + val
|
|
287
|
+
})
|
|
288
|
+
|
|
289
|
+
if (didFirst || extras) {
|
|
290
|
+
str += '\n'
|
|
291
|
+
}
|
|
292
|
+
str += '}'
|
|
293
|
+
|
|
294
|
+
return str
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
LRUCache.prototype.set = function (key, value, maxAge) {
|
|
298
|
+
maxAge = maxAge || this[MAX_AGE]
|
|
299
|
+
|
|
300
|
+
var now = maxAge ? Date.now() : 0
|
|
301
|
+
var len = this[LENGTH_CALCULATOR](value, key)
|
|
302
|
+
|
|
303
|
+
if (this[CACHE].has(key)) {
|
|
304
|
+
if (len > this[MAX]) {
|
|
305
|
+
del(this, this[CACHE].get(key))
|
|
306
|
+
return false
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
var node = this[CACHE].get(key)
|
|
310
|
+
var item = node.value
|
|
311
|
+
|
|
312
|
+
// dispose of the old one before overwriting
|
|
313
|
+
// split out into 2 ifs for better coverage tracking
|
|
314
|
+
if (this[DISPOSE]) {
|
|
315
|
+
if (!this[NO_DISPOSE_ON_SET]) {
|
|
316
|
+
this[DISPOSE](key, item.value)
|
|
317
|
+
}
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
item.now = now
|
|
321
|
+
item.maxAge = maxAge
|
|
322
|
+
item.value = value
|
|
323
|
+
this[LENGTH] += len - item.length
|
|
324
|
+
item.length = len
|
|
325
|
+
this.get(key)
|
|
326
|
+
trim(this)
|
|
327
|
+
return true
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
var hit = new Entry(key, value, len, now, maxAge)
|
|
331
|
+
|
|
332
|
+
// oversized objects fall out of cache automatically.
|
|
333
|
+
if (hit.length > this[MAX]) {
|
|
334
|
+
if (this[DISPOSE]) {
|
|
335
|
+
this[DISPOSE](key, value)
|
|
336
|
+
}
|
|
337
|
+
return false
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
this[LENGTH] += hit.length
|
|
341
|
+
this[LRU_LIST].unshift(hit)
|
|
342
|
+
this[CACHE].set(key, this[LRU_LIST].head)
|
|
343
|
+
trim(this)
|
|
344
|
+
return true
|
|
345
|
+
}
|
|
346
|
+
|
|
347
|
+
LRUCache.prototype.has = function (key) {
|
|
348
|
+
if (!this[CACHE].has(key)) return false
|
|
349
|
+
var hit = this[CACHE].get(key).value
|
|
350
|
+
if (isStale(this, hit)) {
|
|
351
|
+
return false
|
|
352
|
+
}
|
|
353
|
+
return true
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
LRUCache.prototype.get = function (key) {
|
|
357
|
+
return get(this, key, true)
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
LRUCache.prototype.peek = function (key) {
|
|
361
|
+
return get(this, key, false)
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
LRUCache.prototype.pop = function () {
|
|
365
|
+
var node = this[LRU_LIST].tail
|
|
366
|
+
if (!node) return null
|
|
367
|
+
del(this, node)
|
|
368
|
+
return node.value
|
|
369
|
+
}
|
|
370
|
+
|
|
371
|
+
LRUCache.prototype.del = function (key) {
|
|
372
|
+
del(this, this[CACHE].get(key))
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
LRUCache.prototype.load = function (arr) {
|
|
376
|
+
// reset the cache
|
|
377
|
+
this.reset()
|
|
378
|
+
|
|
379
|
+
var now = Date.now()
|
|
380
|
+
// A previous serialized cache has the most recent items first
|
|
381
|
+
for (var l = arr.length - 1; l >= 0; l--) {
|
|
382
|
+
var hit = arr[l]
|
|
383
|
+
var expiresAt = hit.e || 0
|
|
384
|
+
if (expiresAt === 0) {
|
|
385
|
+
// the item was created without expiration in a non aged cache
|
|
386
|
+
this.set(hit.k, hit.v)
|
|
387
|
+
} else {
|
|
388
|
+
var maxAge = expiresAt - now
|
|
389
|
+
// dont add already expired items
|
|
390
|
+
if (maxAge > 0) {
|
|
391
|
+
this.set(hit.k, hit.v, maxAge)
|
|
392
|
+
}
|
|
393
|
+
}
|
|
394
|
+
}
|
|
395
|
+
}
|
|
396
|
+
|
|
397
|
+
LRUCache.prototype.prune = function () {
|
|
398
|
+
var self = this
|
|
399
|
+
this[CACHE].forEach(function (value, key) {
|
|
400
|
+
get(self, key, false)
|
|
401
|
+
})
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
function get (self, key, doUse) {
|
|
405
|
+
var node = self[CACHE].get(key)
|
|
406
|
+
if (node) {
|
|
407
|
+
var hit = node.value
|
|
408
|
+
if (isStale(self, hit)) {
|
|
409
|
+
del(self, node)
|
|
410
|
+
if (!self[ALLOW_STALE]) hit = undefined
|
|
411
|
+
} else {
|
|
412
|
+
if (doUse) {
|
|
413
|
+
self[LRU_LIST].unshiftNode(node)
|
|
414
|
+
}
|
|
415
|
+
}
|
|
416
|
+
if (hit) hit = hit.value
|
|
417
|
+
}
|
|
418
|
+
return hit
|
|
419
|
+
}
|
|
420
|
+
|
|
421
|
+
function isStale (self, hit) {
|
|
422
|
+
if (!hit || (!hit.maxAge && !self[MAX_AGE])) {
|
|
423
|
+
return false
|
|
424
|
+
}
|
|
425
|
+
var stale = false
|
|
426
|
+
var diff = Date.now() - hit.now
|
|
427
|
+
if (hit.maxAge) {
|
|
428
|
+
stale = diff > hit.maxAge
|
|
429
|
+
} else {
|
|
430
|
+
stale = self[MAX_AGE] && (diff > self[MAX_AGE])
|
|
431
|
+
}
|
|
432
|
+
return stale
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
function trim (self) {
|
|
436
|
+
if (self[LENGTH] > self[MAX]) {
|
|
437
|
+
for (var walker = self[LRU_LIST].tail;
|
|
438
|
+
self[LENGTH] > self[MAX] && walker !== null;) {
|
|
439
|
+
// We know that we're about to delete this one, and also
|
|
440
|
+
// what the next least recently used key will be, so just
|
|
441
|
+
// go ahead and set it now.
|
|
442
|
+
var prev = walker.prev
|
|
443
|
+
del(self, walker)
|
|
444
|
+
walker = prev
|
|
445
|
+
}
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
function del (self, node) {
|
|
450
|
+
if (node) {
|
|
451
|
+
var hit = node.value
|
|
452
|
+
if (self[DISPOSE]) {
|
|
453
|
+
self[DISPOSE](hit.key, hit.value)
|
|
454
|
+
}
|
|
455
|
+
self[LENGTH] -= hit.length
|
|
456
|
+
self[CACHE].delete(hit.key)
|
|
457
|
+
self[LRU_LIST].removeNode(node)
|
|
458
|
+
}
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
// classy, since V8 prefers predictable objects.
|
|
462
|
+
function Entry (key, value, length, now, maxAge) {
|
|
463
|
+
this.key = key
|
|
464
|
+
this.value = value
|
|
465
|
+
this.length = length
|
|
466
|
+
this.now = now
|
|
467
|
+
this.maxAge = maxAge || 0
|
|
468
|
+
}
|