From 44ebe642f50d0dff4721bfb836d67256d4a50972 Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Wed, 30 Jul 2025 14:31:49 +0200 Subject: [PATCH 01/29] upgrade tests and benchmarks --- benchmark/benchmark.js | 30 +- package-lock.json | 2126 +++++++++++++++------------- package.json | 4 +- test/test_dayofweek.js | 4 +- test/test_formats.js | 9 +- test/test_isoutcdatetime.js | 6 +- test/test_mask-d.js | 13 +- test/test_mask-dd.js | 13 +- test/test_mask-ddd.js | 12 +- test/test_mask-dddd.js | 12 +- test/test_mask-h.js | 15 +- test/test_mask-h_.js | 15 +- test/test_mask-h_h_.js | 15 +- test/test_mask-hh.js | 15 +- test/test_mask-l.js | 15 +- test/test_mask-l_.js | 18 +- test/test_mask-m.js | 15 +- test/test_mask-m_.js | 15 +- test/test_mask-m_m_.js | 15 +- test/test_mask-mm.js | 12 +- test/test_mask-mmm.js | 12 +- test/test_mask-mmmm.js | 12 +- test/test_mask-n_.js | 18 +- test/test_mask-o.js | 4 +- test/test_mask-p.js | 4 +- test/test_mask-s.js | 12 +- test/test_mask-s_.js | 15 +- test/test_mask-ss.js | 15 +- test/test_mask-t.js | 15 +- test/test_mask-t_.js | 15 +- test/test_mask-t_t_.js | 15 +- test/test_mask-tt.js | 15 +- test/test_mask-w_.js | 15 +- test/test_mask-ww_.js | 15 +- test/test_mask-yy.js | 15 +- test/test_mask-yyyy.js | 18 +- test/test_mask-z_.js | 24 +- test/test_quotes.js | 1 + test/test_threedays.js | 37 +- test/weekofyear/test_weekofyear.js | 2 +- 40 files changed, 1372 insertions(+), 1286 deletions(-) diff --git a/benchmark/benchmark.js b/benchmark/benchmark.js index 60319fa..2ef469c 100644 --- a/benchmark/benchmark.js +++ b/benchmark/benchmark.js @@ -1,5 +1,5 @@ -var previousDateFormat = require("./previousDateFormat"); -var newDateFormat = require("../lib/dateformat"); +import { Bench } from "tinybench" +import dateFormat from "../src/dateformat.js"; const masks = [ "d", @@ -11,28 +11,16 @@ const masks = [ "longTime", "default", ]; -let results = []; + +const bench = new Bench({ name: 'simple benchmark', time: 100 }) masks.forEach((mask) => { - const previousSpeed = getSpeed(false, mask); - const newSpeed = getSpeed(true, mask); - results.push({ - mask: mask, - previous: previousSpeed + "ms", - new: newSpeed + "ms", - improvement: Math.round((previousSpeed / newSpeed - 1) * 100, 2) + "%", + bench.add(mask, () => { + dateFormat(new Date(), mask); }); }); -function getSpeed(newVersion, mask) { - const startTime = new Date(); - const date = new Date(); - for (var i = 0; i < 100_000; i++) { - if (newVersion) newDateFormat(date, mask); - else previousDateFormat(date, mask); - } - const endTime = new Date(); - return endTime - startTime; -} +await bench.run() -console.table(results); +console.log(bench.name) +console.table(bench.table()) diff --git a/package-lock.json b/package-lock.json index f92267a..73f8a44 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,17 +1,30 @@ { "name": "dateformat", - "version": "5.0.1", - "lockfileVersion": 1, + "version": "5.0.3", + "lockfileVersion": 3, "requires": true, - "dependencies": { - "@babel/cli": { + "packages": { + "": { + "name": "dateformat", + "version": "5.0.3", + "license": "MIT", + "devDependencies": { + "@babel/cli": "^7.14.8", + "@babel/core": "^7.15.0", + "@babel/preset-env": "^7.15.0", + "tinybench": "^4.0.1", + "uglify-js": "^3.14.1" + }, + "engines": { + "node": ">=12.20" + } + }, + "node_modules/@babel/cli": { "version": "7.15.7", "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.15.7.tgz", "integrity": "sha512-YW5wOprO2LzMjoWZ5ZG6jfbY9JnkDxuHDwvnrThnuYtByorova/I0HNXJedrUfwuXFQfYOjcqDA4PU3qlZGZjg==", "dev": true, - "requires": { - "@nicolo-ribaudo/chokidar-2": "2.1.8-no-fsevents.3", - "chokidar": "^3.4.0", + "dependencies": { "commander": "^4.0.1", "convert-source-map": "^1.1.0", "fs-readdir-recursive": "^1.1.0", @@ -19,29 +32,49 @@ "make-dir": "^2.1.0", "slash": "^2.0.0", "source-map": "^0.5.0" + }, + "bin": { + "babel": "bin/babel.js", + "babel-external-helpers": "bin/babel-external-helpers.js" + }, + "engines": { + "node": ">=6.9.0" + }, + "optionalDependencies": { + "@nicolo-ribaudo/chokidar-2": "2.1.8-no-fsevents.3", + "chokidar": "^3.4.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/code-frame": { + "node_modules/@babel/code-frame": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz", "integrity": "sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==", "dev": true, - "requires": { + "dependencies": { "@babel/highlight": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/compat-data": { + "node_modules/@babel/compat-data": { "version": "7.15.0", "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.15.0.tgz", "integrity": "sha512-0NqAC1IJE0S0+lL1SWFMxMkz1pKCNCjI4tr2Zx4LJSXxCLAdr6KyArnY+sno5m3yH9g737ygOyPABDsnXkpxiA==", - "dev": true + "dev": true, + "engines": { + "node": ">=6.9.0" + } }, - "@babel/core": { + "node_modules/@babel/core": { "version": "7.15.5", "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.15.5.tgz", "integrity": "sha512-pYgXxiwAgQpgM1bNkZsDEq85f0ggXMA5L7c+o3tskGMh2BunCI9QUwB9Z4jpvXUOuMdyGKiGKQiRe11VS6Jzvg==", "dev": true, - "requires": { + "dependencies": { "@babel/code-frame": "^7.14.5", "@babel/generator": "^7.15.4", "@babel/helper-compilation-targets": "^7.15.4", @@ -58,95 +91,131 @@ "semver": "^6.3.0", "source-map": "^0.5.0" }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" } }, - "@babel/generator": { + "node_modules/@babel/generator": { "version": "7.15.4", "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.15.4.tgz", "integrity": "sha512-d3itta0tu+UayjEORPNz6e1T3FtvWlP5N4V5M+lhp/CxT4oAA7/NcScnpRyspUMLK6tu9MNHmQHxRykuN2R7hw==", "dev": true, - "requires": { + "dependencies": { "@babel/types": "^7.15.4", "jsesc": "^2.5.1", "source-map": "^0.5.0" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/helper-annotate-as-pure": { + "node_modules/@babel/helper-annotate-as-pure": { "version": "7.15.4", "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.15.4.tgz", "integrity": "sha512-QwrtdNvUNsPCj2lfNQacsGSQvGX8ee1ttrBrcozUP2Sv/jylewBP/8QFe6ZkBsC8T/GYWonNAWJV4aRR9AL2DA==", "dev": true, - "requires": { + "dependencies": { "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/helper-builder-binary-assignment-operator-visitor": { + "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { "version": "7.15.4", "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.15.4.tgz", "integrity": "sha512-P8o7JP2Mzi0SdC6eWr1zF+AEYvrsZa7GSY1lTayjF5XJhVH0kjLYUZPvTMflP7tBgZoe9gIhTa60QwFpqh/E0Q==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-explode-assignable-expression": "^7.15.4", "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/helper-compilation-targets": { + "node_modules/@babel/helper-compilation-targets": { "version": "7.15.4", "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.15.4.tgz", "integrity": "sha512-rMWPCirulnPSe4d+gwdWXLfAXTTBj8M3guAf5xFQJ0nvFY7tfNAFnWdqaHegHlgDZOCT4qvhF3BYlSJag8yhqQ==", "dev": true, - "requires": { + "dependencies": { "@babel/compat-data": "^7.15.0", "@babel/helper-validator-option": "^7.14.5", "browserslist": "^4.16.6", "semver": "^6.3.0" }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, - "@babel/helper-create-class-features-plugin": { + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-create-class-features-plugin": { "version": "7.15.4", "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.15.4.tgz", "integrity": "sha512-7ZmzFi+DwJx6A7mHRwbuucEYpyBwmh2Ca0RvI6z2+WLZYCqV0JOaLb+u0zbtmDicebgKBZgqbYfLaKNqSgv5Pw==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-annotate-as-pure": "^7.15.4", "@babel/helper-function-name": "^7.15.4", "@babel/helper-member-expression-to-functions": "^7.15.4", "@babel/helper-optimise-call-expression": "^7.15.4", "@babel/helper-replace-supers": "^7.15.4", "@babel/helper-split-export-declaration": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, - "@babel/helper-create-regexp-features-plugin": { + "node_modules/@babel/helper-create-regexp-features-plugin": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.14.5.tgz", "integrity": "sha512-TLawwqpOErY2HhWbGJ2nZT5wSkR192QpN+nBg1THfBfftrlvOh+WbhrxXCH4q4xJ9Gl16BGPR/48JA+Ryiho/A==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-annotate-as-pure": "^7.14.5", "regexpu-core": "^4.7.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, - "@babel/helper-define-polyfill-provider": { + "node_modules/@babel/helper-define-polyfill-provider": { "version": "0.2.3", "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.2.3.tgz", "integrity": "sha512-RH3QDAfRMzj7+0Nqu5oqgO5q9mFtQEVvCRsi8qCEfzLR9p2BHfn5FzhSB2oj1fF7I2+DcTORkYaQ6aTR9Cofew==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-compilation-targets": "^7.13.0", "@babel/helper-module-imports": "^7.12.13", "@babel/helper-plugin-utils": "^7.13.0", @@ -156,77 +225,99 @@ "resolve": "^1.14.2", "semver": "^6.1.2" }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } + "peerDependencies": { + "@babel/core": "^7.4.0-0" } }, - "@babel/helper-explode-assignable-expression": { + "node_modules/@babel/helper-define-polyfill-provider/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-explode-assignable-expression": { "version": "7.15.4", "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.15.4.tgz", "integrity": "sha512-J14f/vq8+hdC2KoWLIQSsGrC9EFBKE4NFts8pfMpymfApds+fPqR30AOUWc4tyr56h9l/GA1Sxv2q3dLZWbQ/g==", "dev": true, - "requires": { + "dependencies": { "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/helper-function-name": { + "node_modules/@babel/helper-function-name": { "version": "7.15.4", "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.15.4.tgz", "integrity": "sha512-Z91cOMM4DseLIGOnog+Z8OI6YseR9bua+HpvLAQ2XayUGU+neTtX+97caALaLdyu53I/fjhbeCnWnRH1O3jFOw==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-get-function-arity": "^7.15.4", "@babel/template": "^7.15.4", "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/helper-get-function-arity": { + "node_modules/@babel/helper-get-function-arity": { "version": "7.15.4", "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.15.4.tgz", "integrity": "sha512-1/AlxSF92CmGZzHnC515hm4SirTxtpDnLEJ0UyEMgTMZN+6bxXKg04dKhiRx5Enel+SUA1G1t5Ed/yQia0efrA==", "dev": true, - "requires": { + "dependencies": { "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/helper-hoist-variables": { + "node_modules/@babel/helper-hoist-variables": { "version": "7.15.4", "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.15.4.tgz", "integrity": "sha512-VTy085egb3jUGVK9ycIxQiPbquesq0HUQ+tPO0uv5mPEBZipk+5FkRKiWq5apuyTE9FUrjENB0rCf8y+n+UuhA==", "dev": true, - "requires": { + "dependencies": { "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/helper-member-expression-to-functions": { + "node_modules/@babel/helper-member-expression-to-functions": { "version": "7.15.4", "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.15.4.tgz", "integrity": "sha512-cokOMkxC/BTyNP1AlY25HuBWM32iCEsLPI4BHDpJCHHm1FU2E7dKWWIXJgQgSFiu4lp8q3bL1BIKwqkSUviqtA==", "dev": true, - "requires": { + "dependencies": { "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/helper-module-imports": { + "node_modules/@babel/helper-module-imports": { "version": "7.15.4", "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.15.4.tgz", "integrity": "sha512-jeAHZbzUwdW/xHgHQ3QmWR4Jg6j15q4w/gCfwZvtqOxoo5DKtLHk8Bsf4c5RZRC7NmLEs+ohkdq8jFefuvIxAA==", "dev": true, - "requires": { + "dependencies": { "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/helper-module-transforms": { + "node_modules/@babel/helper-module-transforms": { "version": "7.15.7", "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.15.7.tgz", "integrity": "sha512-ZNqjjQG/AuFfekFTY+7nY4RgBSklgTu970c7Rj3m/JOhIu5KPBUuTA9AY6zaKcUvk4g6EbDXdBnhi35FAssdSw==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-module-imports": "^7.15.4", "@babel/helper-replace-supers": "^7.15.4", "@babel/helper-simple-access": "^7.15.4", @@ -235,464 +326,695 @@ "@babel/template": "^7.15.4", "@babel/traverse": "^7.15.4", "@babel/types": "^7.15.6" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/helper-optimise-call-expression": { + "node_modules/@babel/helper-optimise-call-expression": { "version": "7.15.4", "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.15.4.tgz", "integrity": "sha512-E/z9rfbAOt1vDW1DR7k4SzhzotVV5+qMciWV6LaG1g4jeFrkDlJedjtV4h0i4Q/ITnUu+Pk08M7fczsB9GXBDw==", "dev": true, - "requires": { + "dependencies": { "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/helper-plugin-utils": { + "node_modules/@babel/helper-plugin-utils": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz", "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==", - "dev": true + "dev": true, + "engines": { + "node": ">=6.9.0" + } }, - "@babel/helper-remap-async-to-generator": { + "node_modules/@babel/helper-remap-async-to-generator": { "version": "7.15.4", "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.15.4.tgz", "integrity": "sha512-v53MxgvMK/HCwckJ1bZrq6dNKlmwlyRNYM6ypaRTdXWGOE2c1/SCa6dL/HimhPulGhZKw9W0QhREM583F/t0vQ==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-annotate-as-pure": "^7.15.4", "@babel/helper-wrap-function": "^7.15.4", "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/helper-replace-supers": { + "node_modules/@babel/helper-replace-supers": { "version": "7.15.4", "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.15.4.tgz", "integrity": "sha512-/ztT6khaXF37MS47fufrKvIsiQkx1LBRvSJNzRqmbyeZnTwU9qBxXYLaaT/6KaxfKhjs2Wy8kG8ZdsFUuWBjzw==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-member-expression-to-functions": "^7.15.4", "@babel/helper-optimise-call-expression": "^7.15.4", "@babel/traverse": "^7.15.4", "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/helper-simple-access": { + "node_modules/@babel/helper-simple-access": { "version": "7.15.4", "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.15.4.tgz", "integrity": "sha512-UzazrDoIVOZZcTeHHEPYrr1MvTR/K+wgLg6MY6e1CJyaRhbibftF6fR2KU2sFRtI/nERUZR9fBd6aKgBlIBaPg==", "dev": true, - "requires": { + "dependencies": { "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/helper-skip-transparent-expression-wrappers": { + "node_modules/@babel/helper-skip-transparent-expression-wrappers": { "version": "7.15.4", "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.15.4.tgz", "integrity": "sha512-BMRLsdh+D1/aap19TycS4eD1qELGrCBJwzaY9IE8LrpJtJb+H7rQkPIdsfgnMtLBA6DJls7X9z93Z4U8h7xw0A==", "dev": true, - "requires": { + "dependencies": { "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/helper-split-export-declaration": { + "node_modules/@babel/helper-split-export-declaration": { "version": "7.15.4", "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.15.4.tgz", "integrity": "sha512-HsFqhLDZ08DxCpBdEVtKmywj6PQbwnF6HHybur0MAnkAKnlS6uHkwnmRIkElB2Owpfb4xL4NwDmDLFubueDXsw==", "dev": true, - "requires": { + "dependencies": { "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/helper-validator-identifier": { + "node_modules/@babel/helper-validator-identifier": { "version": "7.15.7", "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz", "integrity": "sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==", - "dev": true + "dev": true, + "engines": { + "node": ">=6.9.0" + } }, - "@babel/helper-validator-option": { + "node_modules/@babel/helper-validator-option": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz", "integrity": "sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow==", - "dev": true + "dev": true, + "engines": { + "node": ">=6.9.0" + } }, - "@babel/helper-wrap-function": { + "node_modules/@babel/helper-wrap-function": { "version": "7.15.4", "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.15.4.tgz", "integrity": "sha512-Y2o+H/hRV5W8QhIfTpRIBwl57y8PrZt6JM3V8FOo5qarjshHItyH5lXlpMfBfmBefOqSCpKZs/6Dxqp0E/U+uw==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-function-name": "^7.15.4", "@babel/template": "^7.15.4", "@babel/traverse": "^7.15.4", "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/helpers": { + "node_modules/@babel/helpers": { "version": "7.15.4", "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.15.4.tgz", "integrity": "sha512-V45u6dqEJ3w2rlryYYXf6i9rQ5YMNu4FLS6ngs8ikblhu2VdR1AqAd6aJjBzmf2Qzh6KOLqKHxEN9+TFbAkAVQ==", "dev": true, - "requires": { + "dependencies": { "@babel/template": "^7.15.4", "@babel/traverse": "^7.15.4", "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/highlight": { + "node_modules/@babel/highlight": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-validator-identifier": "^7.14.5", "chalk": "^2.0.0", "js-tokens": "^4.0.0" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/parser": { + "node_modules/@babel/parser": { "version": "7.15.7", "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.7.tgz", "integrity": "sha512-rycZXvQ+xS9QyIcJ9HXeDWf1uxqlbVFAUq0Rq0dbc50Zb/+wUe/ehyfzGfm9KZZF0kBejYgxltBXocP+gKdL2g==", - "dev": true + "dev": true, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } }, - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { + "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { "version": "7.15.4", "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.15.4.tgz", "integrity": "sha512-eBnpsl9tlhPhpI10kU06JHnrYXwg3+V6CaP2idsCXNef0aeslpqyITXQ74Vfk5uHgY7IG7XP0yIH8b42KSzHog==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.14.5", "@babel/helper-skip-transparent-expression-wrappers": "^7.15.4", "@babel/plugin-proposal-optional-chaining": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.13.0" } }, - "@babel/plugin-proposal-async-generator-functions": { + "node_modules/@babel/plugin-proposal-async-generator-functions": { "version": "7.15.4", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.15.4.tgz", "integrity": "sha512-2zt2g5vTXpMC3OmK6uyjvdXptbhBXfA77XGrd3gh93zwG8lZYBLOBImiGBEG0RANu3JqKEACCz5CGk73OJROBw==", + "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-async-generator-functions instead.", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.14.5", "@babel/helper-remap-async-to-generator": "^7.15.4", "@babel/plugin-syntax-async-generators": "^7.8.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-proposal-class-properties": { + "node_modules/@babel/plugin-proposal-class-properties": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.14.5.tgz", "integrity": "sha512-q/PLpv5Ko4dVc1LYMpCY7RVAAO4uk55qPwrIuJ5QJ8c6cVuAmhu7I/49JOppXL6gXf7ZHzpRVEUZdYoPLM04Gg==", + "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.", "dev": true, - "requires": { + "dependencies": { "@babel/helper-create-class-features-plugin": "^7.14.5", "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-proposal-class-static-block": { + "node_modules/@babel/plugin-proposal-class-static-block": { "version": "7.15.4", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.15.4.tgz", "integrity": "sha512-M682XWrrLNk3chXCjoPUQWOyYsB93B9z3mRyjtqqYJWDf2mfCdIYgDrA11cgNVhAQieaq6F2fn2f3wI0U4aTjA==", + "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-static-block instead.", "dev": true, - "requires": { + "dependencies": { "@babel/helper-create-class-features-plugin": "^7.15.4", "@babel/helper-plugin-utils": "^7.14.5", "@babel/plugin-syntax-class-static-block": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.12.0" } }, - "@babel/plugin-proposal-dynamic-import": { + "node_modules/@babel/plugin-proposal-dynamic-import": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.14.5.tgz", "integrity": "sha512-ExjiNYc3HDN5PXJx+bwC50GIx/KKanX2HiggnIUAYedbARdImiCU4RhhHfdf0Kd7JNXGpsBBBCOm+bBVy3Gb0g==", + "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-dynamic-import instead.", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.14.5", "@babel/plugin-syntax-dynamic-import": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-proposal-export-namespace-from": { + "node_modules/@babel/plugin-proposal-export-namespace-from": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.14.5.tgz", "integrity": "sha512-g5POA32bXPMmSBu5Dx/iZGLGnKmKPc5AiY7qfZgurzrCYgIztDlHFbznSNCoQuv57YQLnQfaDi7dxCtLDIdXdA==", + "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-export-namespace-from instead.", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.14.5", "@babel/plugin-syntax-export-namespace-from": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-proposal-json-strings": { + "node_modules/@babel/plugin-proposal-json-strings": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.14.5.tgz", "integrity": "sha512-NSq2fczJYKVRIsUJyNxrVUMhB27zb7N7pOFGQOhBKJrChbGcgEAqyZrmZswkPk18VMurEeJAaICbfm57vUeTbQ==", + "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-json-strings instead.", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.14.5", "@babel/plugin-syntax-json-strings": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-proposal-logical-assignment-operators": { + "node_modules/@babel/plugin-proposal-logical-assignment-operators": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.14.5.tgz", "integrity": "sha512-YGn2AvZAo9TwyhlLvCCWxD90Xq8xJ4aSgaX3G5D/8DW94L8aaT+dS5cSP+Z06+rCJERGSr9GxMBZ601xoc2taw==", + "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-logical-assignment-operators instead.", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.14.5", "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-proposal-nullish-coalescing-operator": { + "node_modules/@babel/plugin-proposal-nullish-coalescing-operator": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.14.5.tgz", "integrity": "sha512-gun/SOnMqjSb98Nkaq2rTKMwervfdAoz6NphdY0vTfuzMfryj+tDGb2n6UkDKwez+Y8PZDhE3D143v6Gepp4Hg==", + "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead.", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.14.5", "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-proposal-numeric-separator": { + "node_modules/@babel/plugin-proposal-numeric-separator": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.14.5.tgz", "integrity": "sha512-yiclALKe0vyZRZE0pS6RXgjUOt87GWv6FYa5zqj15PvhOGFO69R5DusPlgK/1K5dVnCtegTiWu9UaBSrLLJJBg==", + "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-numeric-separator instead.", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.14.5", "@babel/plugin-syntax-numeric-separator": "^7.10.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-proposal-object-rest-spread": { + "node_modules/@babel/plugin-proposal-object-rest-spread": { "version": "7.15.6", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.15.6.tgz", "integrity": "sha512-qtOHo7A1Vt+O23qEAX+GdBpqaIuD3i9VRrWgCJeq7WO6H2d14EK3q11urj5Te2MAeK97nMiIdRpwd/ST4JFbNg==", + "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-object-rest-spread instead.", "dev": true, - "requires": { + "dependencies": { "@babel/compat-data": "^7.15.0", "@babel/helper-compilation-targets": "^7.15.4", "@babel/helper-plugin-utils": "^7.14.5", "@babel/plugin-syntax-object-rest-spread": "^7.8.3", "@babel/plugin-transform-parameters": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-proposal-optional-catch-binding": { + "node_modules/@babel/plugin-proposal-optional-catch-binding": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.14.5.tgz", "integrity": "sha512-3Oyiixm0ur7bzO5ybNcZFlmVsygSIQgdOa7cTfOYCMY+wEPAYhZAJxi3mixKFCTCKUhQXuCTtQ1MzrpL3WT8ZQ==", + "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-catch-binding instead.", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.14.5", "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-proposal-optional-chaining": { + "node_modules/@babel/plugin-proposal-optional-chaining": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.14.5.tgz", "integrity": "sha512-ycz+VOzo2UbWNI1rQXxIuMOzrDdHGrI23fRiz/Si2R4kv2XZQ1BK8ccdHwehMKBlcH/joGW/tzrUmo67gbJHlQ==", + "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead.", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.14.5", "@babel/helper-skip-transparent-expression-wrappers": "^7.14.5", "@babel/plugin-syntax-optional-chaining": "^7.8.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-proposal-private-methods": { + "node_modules/@babel/plugin-proposal-private-methods": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.14.5.tgz", "integrity": "sha512-838DkdUA1u+QTCplatfq4B7+1lnDa/+QMI89x5WZHBcnNv+47N8QEj2k9I2MUU9xIv8XJ4XvPCviM/Dj7Uwt9g==", + "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-methods instead.", "dev": true, - "requires": { + "dependencies": { "@babel/helper-create-class-features-plugin": "^7.14.5", "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-proposal-private-property-in-object": { + "node_modules/@babel/plugin-proposal-private-property-in-object": { "version": "7.15.4", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.15.4.tgz", "integrity": "sha512-X0UTixkLf0PCCffxgu5/1RQyGGbgZuKoI+vXP4iSbJSYwPb7hu06omsFGBvQ9lJEvwgrxHdS8B5nbfcd8GyUNA==", + "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-property-in-object instead.", "dev": true, - "requires": { + "dependencies": { "@babel/helper-annotate-as-pure": "^7.15.4", "@babel/helper-create-class-features-plugin": "^7.15.4", "@babel/helper-plugin-utils": "^7.14.5", "@babel/plugin-syntax-private-property-in-object": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-proposal-unicode-property-regex": { + "node_modules/@babel/plugin-proposal-unicode-property-regex": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.14.5.tgz", "integrity": "sha512-6axIeOU5LnY471KenAB9vI8I5j7NQ2d652hIYwVyRfgaZT5UpiqFKCuVXCDMSrU+3VFafnu2c5m3lrWIlr6A5Q==", + "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-unicode-property-regex instead.", "dev": true, - "requires": { + "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.14.5", "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-syntax-async-generators": { + "node_modules/@babel/plugin-syntax-async-generators": { "version": "7.8.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-syntax-class-properties": { + "node_modules/@babel/plugin-syntax-class-properties": { "version": "7.12.13", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.12.13" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-syntax-class-static-block": { + "node_modules/@babel/plugin-syntax-class-static-block": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-syntax-dynamic-import": { + "node_modules/@babel/plugin-syntax-dynamic-import": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-syntax-export-namespace-from": { + "node_modules/@babel/plugin-syntax-export-namespace-from": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.8.3" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-syntax-json-strings": { + "node_modules/@babel/plugin-syntax-json-strings": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-syntax-logical-assignment-operators": { + "node_modules/@babel/plugin-syntax-logical-assignment-operators": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-syntax-nullish-coalescing-operator": { + "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-syntax-numeric-separator": { + "node_modules/@babel/plugin-syntax-numeric-separator": { "version": "7.10.4", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.10.4" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-syntax-object-rest-spread": { + "node_modules/@babel/plugin-syntax-object-rest-spread": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-syntax-optional-catch-binding": { + "node_modules/@babel/plugin-syntax-optional-catch-binding": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-syntax-optional-chaining": { + "node_modules/@babel/plugin-syntax-optional-chaining": { "version": "7.8.3", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.8.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-syntax-private-property-in-object": { + "node_modules/@babel/plugin-syntax-private-property-in-object": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-syntax-top-level-await": { + "node_modules/@babel/plugin-syntax-top-level-await": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-arrow-functions": { + "node_modules/@babel/plugin-transform-arrow-functions": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.14.5.tgz", "integrity": "sha512-KOnO0l4+tD5IfOdi4x8C1XmEIRWUjNRV8wc6K2vz/3e8yAOoZZvsRXRRIF/yo/MAOFb4QjtAw9xSxMXbSMRy8A==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-async-to-generator": { + "node_modules/@babel/plugin-transform-async-to-generator": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.14.5.tgz", "integrity": "sha512-szkbzQ0mNk0rpu76fzDdqSyPu0MuvpXgC+6rz5rpMb5OIRxdmHfQxrktL8CYolL2d8luMCZTR0DpIMIdL27IjA==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-module-imports": "^7.14.5", "@babel/helper-plugin-utils": "^7.14.5", "@babel/helper-remap-async-to-generator": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-block-scoped-functions": { + "node_modules/@babel/plugin-transform-block-scoped-functions": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.14.5.tgz", "integrity": "sha512-dtqWqdWZ5NqBX3KzsVCWfQI3A53Ft5pWFCT2eCVUftWZgjc5DpDponbIF1+c+7cSGk2wN0YK7HGL/ezfRbpKBQ==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-block-scoping": { + "node_modules/@babel/plugin-transform-block-scoping": { "version": "7.15.3", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.15.3.tgz", "integrity": "sha512-nBAzfZwZb4DkaGtOes1Up1nOAp9TDRRFw4XBzBBSG9QK7KVFmYzgj9o9sbPv7TX5ofL4Auq4wZnxCoPnI/lz2Q==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-classes": { + "node_modules/@babel/plugin-transform-classes": { "version": "7.15.4", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.15.4.tgz", "integrity": "sha512-Yjvhex8GzBmmPQUvpXRPWQ9WnxXgAFuZSrqOK/eJlOGIXwvv8H3UEdUigl1gb/bnjTrln+e8bkZUYCBt/xYlBg==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-annotate-as-pure": "^7.15.4", "@babel/helper-function-name": "^7.15.4", "@babel/helper-optimise-call-expression": "^7.15.4", @@ -700,273 +1022,441 @@ "@babel/helper-replace-supers": "^7.15.4", "@babel/helper-split-export-declaration": "^7.15.4", "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-computed-properties": { + "node_modules/@babel/plugin-transform-computed-properties": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.14.5.tgz", "integrity": "sha512-pWM+E4283UxaVzLb8UBXv4EIxMovU4zxT1OPnpHJcmnvyY9QbPPTKZfEj31EUvG3/EQRbYAGaYEUZ4yWOBC2xg==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-destructuring": { + "node_modules/@babel/plugin-transform-destructuring": { "version": "7.14.7", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.14.7.tgz", "integrity": "sha512-0mDE99nK+kVh3xlc5vKwB6wnP9ecuSj+zQCa/n0voENtP/zymdT4HH6QEb65wjjcbqr1Jb/7z9Qp7TF5FtwYGw==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-dotall-regex": { + "node_modules/@babel/plugin-transform-dotall-regex": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.14.5.tgz", "integrity": "sha512-loGlnBdj02MDsFaHhAIJzh7euK89lBrGIdM9EAtHFo6xKygCUGuuWe07o1oZVk287amtW1n0808sQM99aZt3gw==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.14.5", "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-duplicate-keys": { + "node_modules/@babel/plugin-transform-duplicate-keys": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.14.5.tgz", "integrity": "sha512-iJjbI53huKbPDAsJ8EmVmvCKeeq21bAze4fu9GBQtSLqfvzj2oRuHVx4ZkDwEhg1htQ+5OBZh/Ab0XDf5iBZ7A==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-exponentiation-operator": { + "node_modules/@babel/plugin-transform-exponentiation-operator": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.14.5.tgz", "integrity": "sha512-jFazJhMBc9D27o9jDnIE5ZErI0R0m7PbKXVq77FFvqFbzvTMuv8jaAwLZ5PviOLSFttqKIW0/wxNSDbjLk0tYA==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-builder-binary-assignment-operator-visitor": "^7.14.5", "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-for-of": { + "node_modules/@babel/plugin-transform-for-of": { "version": "7.15.4", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.15.4.tgz", "integrity": "sha512-DRTY9fA751AFBDh2oxydvVm4SYevs5ILTWLs6xKXps4Re/KG5nfUkr+TdHCrRWB8C69TlzVgA9b3RmGWmgN9LA==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-function-name": { + "node_modules/@babel/plugin-transform-function-name": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.14.5.tgz", "integrity": "sha512-vbO6kv0fIzZ1GpmGQuvbwwm+O4Cbm2NrPzwlup9+/3fdkuzo1YqOZcXw26+YUJB84Ja7j9yURWposEHLYwxUfQ==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-function-name": "^7.14.5", "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-literals": { + "node_modules/@babel/plugin-transform-literals": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.14.5.tgz", "integrity": "sha512-ql33+epql2F49bi8aHXxvLURHkxJbSmMKl9J5yHqg4PLtdE6Uc48CH1GS6TQvZ86eoB/ApZXwm7jlA+B3kra7A==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-member-expression-literals": { + "node_modules/@babel/plugin-transform-member-expression-literals": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.14.5.tgz", "integrity": "sha512-WkNXxH1VXVTKarWFqmso83xl+2V3Eo28YY5utIkbsmXoItO8Q3aZxN4BTS2k0hz9dGUloHK26mJMyQEYfkn/+Q==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-modules-amd": { + "node_modules/@babel/plugin-transform-modules-amd": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.14.5.tgz", "integrity": "sha512-3lpOU8Vxmp3roC4vzFpSdEpGUWSMsHFreTWOMMLzel2gNGfHE5UWIh/LN6ghHs2xurUp4jRFYMUIZhuFbody1g==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-module-transforms": "^7.14.5", "@babel/helper-plugin-utils": "^7.14.5", "babel-plugin-dynamic-import-node": "^2.3.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-modules-commonjs": { + "node_modules/@babel/plugin-transform-modules-commonjs": { "version": "7.15.4", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.15.4.tgz", "integrity": "sha512-qg4DPhwG8hKp4BbVDvX1s8cohM8a6Bvptu4l6Iingq5rW+yRUAhe/YRup/YcW2zCOlrysEWVhftIcKzrEZv3sA==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-module-transforms": "^7.15.4", "@babel/helper-plugin-utils": "^7.14.5", "@babel/helper-simple-access": "^7.15.4", "babel-plugin-dynamic-import-node": "^2.3.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-modules-systemjs": { + "node_modules/@babel/plugin-transform-modules-systemjs": { "version": "7.15.4", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.15.4.tgz", "integrity": "sha512-fJUnlQrl/mezMneR72CKCgtOoahqGJNVKpompKwzv3BrEXdlPspTcyxrZ1XmDTIr9PpULrgEQo3qNKp6dW7ssw==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-hoist-variables": "^7.15.4", "@babel/helper-module-transforms": "^7.15.4", "@babel/helper-plugin-utils": "^7.14.5", "@babel/helper-validator-identifier": "^7.14.9", "babel-plugin-dynamic-import-node": "^2.3.3" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-modules-umd": { + "node_modules/@babel/plugin-transform-modules-umd": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.14.5.tgz", "integrity": "sha512-RfPGoagSngC06LsGUYyM9QWSXZ8MysEjDJTAea1lqRjNECE3y0qIJF/qbvJxc4oA4s99HumIMdXOrd+TdKaAAA==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-module-transforms": "^7.14.5", "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-named-capturing-groups-regex": { + "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { "version": "7.14.9", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.14.9.tgz", "integrity": "sha512-l666wCVYO75mlAtGFfyFwnWmIXQm3kSH0C3IRnJqWcZbWkoihyAdDhFm2ZWaxWTqvBvhVFfJjMRQ0ez4oN1yYA==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" } }, - "@babel/plugin-transform-new-target": { + "node_modules/@babel/plugin-transform-new-target": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.14.5.tgz", "integrity": "sha512-Nx054zovz6IIRWEB49RDRuXGI4Gy0GMgqG0cII9L3MxqgXz/+rgII+RU58qpo4g7tNEx1jG7rRVH4ihZoP4esQ==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-object-super": { + "node_modules/@babel/plugin-transform-object-super": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.14.5.tgz", "integrity": "sha512-MKfOBWzK0pZIrav9z/hkRqIk/2bTv9qvxHzPQc12RcVkMOzpIKnFCNYJip00ssKWYkd8Sf5g0Wr7pqJ+cmtuFg==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.14.5", "@babel/helper-replace-supers": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-parameters": { + "node_modules/@babel/plugin-transform-parameters": { "version": "7.15.4", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.15.4.tgz", "integrity": "sha512-9WB/GUTO6lvJU3XQsSr6J/WKvBC2hcs4Pew8YxZagi6GkTdniyqp8On5kqdK8MN0LMeu0mGbhPN+O049NV/9FQ==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-property-literals": { + "node_modules/@babel/plugin-transform-property-literals": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.14.5.tgz", "integrity": "sha512-r1uilDthkgXW8Z1vJz2dKYLV1tuw2xsbrp3MrZmD99Wh9vsfKoob+JTgri5VUb/JqyKRXotlOtwgu4stIYCmnw==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-regenerator": { + "node_modules/@babel/plugin-transform-regenerator": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.14.5.tgz", "integrity": "sha512-NVIY1W3ITDP5xQl50NgTKlZ0GrotKtLna08/uGY6ErQt6VEQZXla86x/CTddm5gZdcr+5GSsvMeTmWA5Ii6pkg==", "dev": true, - "requires": { + "dependencies": { "regenerator-transform": "^0.14.2" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-reserved-words": { + "node_modules/@babel/plugin-transform-reserved-words": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.14.5.tgz", "integrity": "sha512-cv4F2rv1nD4qdexOGsRQXJrOcyb5CrgjUH9PKrrtyhSDBNWGxd0UIitjyJiWagS+EbUGjG++22mGH1Pub8D6Vg==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-shorthand-properties": { + "node_modules/@babel/plugin-transform-shorthand-properties": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.14.5.tgz", "integrity": "sha512-xLucks6T1VmGsTB+GWK5Pl9Jl5+nRXD1uoFdA5TSO6xtiNjtXTjKkmPdFXVLGlK5A2/or/wQMKfmQ2Y0XJfn5g==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-spread": { + "node_modules/@babel/plugin-transform-spread": { "version": "7.14.6", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.14.6.tgz", "integrity": "sha512-Zr0x0YroFJku7n7+/HH3A2eIrGMjbmAIbJSVv0IZ+t3U2WUQUA64S/oeied2e+MaGSjmt4alzBCsK9E8gh+fag==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.14.5", "@babel/helper-skip-transparent-expression-wrappers": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-sticky-regex": { + "node_modules/@babel/plugin-transform-sticky-regex": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.14.5.tgz", "integrity": "sha512-Z7F7GyvEMzIIbwnziAZmnSNpdijdr4dWt+FJNBnBLz5mwDFkqIXU9wmBcWWad3QeJF5hMTkRe4dAq2sUZiG+8A==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-template-literals": { + "node_modules/@babel/plugin-transform-template-literals": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.14.5.tgz", "integrity": "sha512-22btZeURqiepOfuy/VkFr+zStqlujWaarpMErvay7goJS6BWwdd6BY9zQyDLDa4x2S3VugxFb162IZ4m/S/+Gg==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-typeof-symbol": { + "node_modules/@babel/plugin-transform-typeof-symbol": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.14.5.tgz", "integrity": "sha512-lXzLD30ffCWseTbMQzrvDWqljvZlHkXU+CnseMhkMNqU1sASnCsz3tSzAaH3vCUXb9PHeUb90ZT1BdFTm1xxJw==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-unicode-escapes": { + "node_modules/@babel/plugin-transform-unicode-escapes": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.14.5.tgz", "integrity": "sha512-crTo4jATEOjxj7bt9lbYXcBAM3LZaUrbP2uUdxb6WIorLmjNKSpHfIybgY4B8SRpbf8tEVIWH3Vtm7ayCrKocA==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/plugin-transform-unicode-regex": { + "node_modules/@babel/plugin-transform-unicode-regex": { "version": "7.14.5", "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.14.5.tgz", "integrity": "sha512-UygduJpC5kHeCiRw/xDVzC+wj8VaYSoKl5JNVmbP7MadpNinAm3SvZCxZ42H37KZBKztz46YC73i9yV34d0Tzw==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-create-regexp-features-plugin": "^7.14.5", "@babel/helper-plugin-utils": "^7.14.5" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/preset-env": { + "node_modules/@babel/preset-env": { "version": "7.15.6", "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.15.6.tgz", "integrity": "sha512-L+6jcGn7EWu7zqaO2uoTDjjMBW+88FXzV8KvrBl2z6MtRNxlsmUNRlZPaNNPUTgqhyC5DHNFk/2Jmra+ublZWw==", "dev": true, - "requires": { + "dependencies": { "@babel/compat-data": "^7.15.0", "@babel/helper-compilation-targets": "^7.15.4", "@babel/helper-plugin-utils": "^7.14.5", @@ -1041,54 +1531,70 @@ "core-js-compat": "^3.16.0", "semver": "^6.3.0" }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/preset-modules": { + "node_modules/@babel/preset-env/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/preset-modules": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.4.tgz", "integrity": "sha512-J36NhwnfdzpmH41M1DrnkkgAqhZaqr/NBdPfQ677mLzlaXo+oDiv1deyCDtgAhz8p328otdob0Du7+xgHGZbKg==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-plugin-utils": "^7.0.0", "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", "@babel/plugin-transform-dotall-regex": "^7.4.4", "@babel/types": "^7.4.4", "esutils": "^2.0.2" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "@babel/runtime": { + "node_modules/@babel/runtime": { "version": "7.15.4", "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.4.tgz", "integrity": "sha512-99catp6bHCaxr4sJ/DbTGgHS4+Rs2RVd2g7iOap6SLGPDknRK9ztKNsE/Fg6QhSeh1FGE5f6gHGQmvvn3I3xhw==", "dev": true, - "requires": { + "dependencies": { "regenerator-runtime": "^0.13.4" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/template": { + "node_modules/@babel/template": { "version": "7.15.4", "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.15.4.tgz", "integrity": "sha512-UgBAfEa1oGuYgDIPM2G+aHa4Nlo9Lh6mGD2bDBGMTbYnc38vulXPuC1MGjYILIEmlwl6Rd+BPR9ee3gm20CBtg==", "dev": true, - "requires": { + "dependencies": { "@babel/code-frame": "^7.14.5", "@babel/parser": "^7.15.4", "@babel/types": "^7.15.4" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/traverse": { + "node_modules/@babel/traverse": { "version": "7.15.4", "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.15.4.tgz", "integrity": "sha512-W6lQD8l4rUbQR/vYgSuCAE75ADyyQvOpFVsvPPdkhf6lATXAsQIG9YdtOcu8BB1dZ0LKu+Zo3c1wEcbKeuhdlA==", "dev": true, - "requires": { + "dependencies": { "@babel/code-frame": "^7.14.5", "@babel/generator": "^7.15.4", "@babel/helper-function-name": "^7.15.4", @@ -1098,1296 +1604,986 @@ "@babel/types": "^7.15.4", "debug": "^4.1.0", "globals": "^11.1.0" + }, + "engines": { + "node": ">=6.9.0" } }, - "@babel/types": { + "node_modules/@babel/types": { "version": "7.15.6", "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.15.6.tgz", "integrity": "sha512-BPU+7QhqNjmWyDO0/vitH/CuhpV8ZmK1wpKva8nuyNF5MJfuRNWMc+hc14+u9xT93kvykMdncrJT19h74uB1Ig==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-validator-identifier": "^7.14.9", "to-fast-properties": "^2.0.0" + }, + "engines": { + "node": ">=6.9.0" } }, - "@nicolo-ribaudo/chokidar-2": { + "node_modules/@nicolo-ribaudo/chokidar-2": { "version": "2.1.8-no-fsevents.3", "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.3.tgz", "integrity": "sha512-s88O1aVtXftvp5bCPB7WnmXc5IwOZZ7YPuwNPt+GtOOXpPvad1LfbmjYv+qII7zP6RU2QGnqve27dnLycEnyEQ==", "dev": true, "optional": true }, - "@ungap/promise-all-settled": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/@ungap/promise-all-settled/-/promise-all-settled-1.1.2.tgz", - "integrity": "sha512-sL/cEvJWAnClXw0wHk85/2L0G6Sj8UB0Ctc1TEMbKSsmpRosqhwj9gWgFRZSrBr2f9tiXISwNhCPmlfqUqyb9Q==", - "dev": true - }, - "ansi-colors": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", - "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", - "dev": true - }, - "ansi-regex": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", - "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", - "dev": true - }, - "ansi-styles": { + "node_modules/ansi-styles": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", "dev": true, - "requires": { + "dependencies": { "color-convert": "^1.9.0" + }, + "engines": { + "node": ">=4" } }, - "anymatch": { + "node_modules/anymatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", "dev": true, - "requires": { + "optional": true, + "dependencies": { "normalize-path": "^3.0.0", "picomatch": "^2.0.4" + }, + "engines": { + "node": ">= 8" } }, - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "babel-plugin-dynamic-import-node": { + "node_modules/babel-plugin-dynamic-import-node": { "version": "2.3.3", "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", "dev": true, - "requires": { + "dependencies": { "object.assign": "^4.1.0" } }, - "babel-plugin-polyfill-corejs2": { + "node_modules/babel-plugin-polyfill-corejs2": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.2.2.tgz", "integrity": "sha512-kISrENsJ0z5dNPq5eRvcctITNHYXWOA4DUZRFYCz3jYCcvTb/A546LIddmoGNMVYg2U38OyFeNosQwI9ENTqIQ==", "dev": true, - "requires": { + "dependencies": { "@babel/compat-data": "^7.13.11", "@babel/helper-define-polyfill-provider": "^0.2.2", "semver": "^6.1.1" }, - "dependencies": { - "semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true - } + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "babel-plugin-polyfill-corejs3": { + "node_modules/babel-plugin-polyfill-corejs2/node_modules/semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/babel-plugin-polyfill-corejs3": { "version": "0.2.4", "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.2.4.tgz", "integrity": "sha512-z3HnJE5TY/j4EFEa/qpQMSbcUJZ5JQi+3UFjXzn6pQCmIKc5Ug5j98SuYyH+m4xQnvKlMDIW4plLfgyVnd0IcQ==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-define-polyfill-provider": "^0.2.2", "core-js-compat": "^3.14.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "babel-plugin-polyfill-regenerator": { + "node_modules/babel-plugin-polyfill-regenerator": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.2.2.tgz", "integrity": "sha512-Goy5ghsc21HgPDFtzRkSirpZVW35meGoTmTOb2bxqdl60ghub4xOidgNTHaZfQ2FaxQsKmwvXtOAkcIS4SMBWg==", "dev": true, - "requires": { + "dependencies": { "@babel/helper-define-polyfill-provider": "^0.2.2" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" } }, - "balanced-match": { + "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", "dev": true }, - "binary-extensions": { + "node_modules/binary-extensions": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true + "dev": true, + "optional": true, + "engines": { + "node": ">=8" + } }, - "brace-expansion": { + "node_modules/brace-expansion": { "version": "1.1.11", "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", "dev": true, - "requires": { + "dependencies": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" } }, - "braces": { + "node_modules/braces": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", "dev": true, - "requires": { + "optional": true, + "dependencies": { "fill-range": "^7.0.1" + }, + "engines": { + "node": ">=8" } }, - "browser-stdout": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", - "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", - "dev": true - }, - "browserslist": { + "node_modules/browserslist": { "version": "4.17.0", "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.17.0.tgz", "integrity": "sha512-g2BJ2a0nEYvEFQC208q8mVAhfNwpZ5Mu8BwgtCdZKO3qx98HChmeg448fPdUzld8aFmfLgVh7yymqV+q1lJZ5g==", "dev": true, - "requires": { + "dependencies": { "caniuse-lite": "^1.0.30001254", "colorette": "^1.3.0", "electron-to-chromium": "^1.3.830", "escalade": "^3.1.1", "node-releases": "^1.1.75" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" } }, - "call-bind": { + "node_modules/call-bind": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", "dev": true, - "requires": { + "dependencies": { "function-bind": "^1.1.1", "get-intrinsic": "^1.0.2" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "camelcase": { - "version": "6.2.0", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-6.2.0.tgz", - "integrity": "sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg==", - "dev": true - }, - "caniuse-lite": { + "node_modules/caniuse-lite": { "version": "1.0.30001259", "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001259.tgz", "integrity": "sha512-V7mQTFhjITxuk9zBpI6nYsiTXhcPe05l+364nZjK7MFK/E7ibvYBSAXr4YcA6oPR8j3ZLM/LN+lUqUVAQEUZFg==", - "dev": true + "dev": true, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + } }, - "chalk": { + "node_modules/chalk": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", "dev": true, - "requires": { + "dependencies": { "ansi-styles": "^3.2.1", "escape-string-regexp": "^1.0.5", "supports-color": "^5.3.0" + }, + "engines": { + "node": ">=4" } }, - "chokidar": { + "node_modules/chokidar": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", "dev": true, - "requires": { + "optional": true, + "dependencies": { "anymatch": "~3.1.2", "braces": "~3.0.2", - "fsevents": "~2.3.2", "glob-parent": "~5.1.2", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", "normalize-path": "~3.0.0", "readdirp": "~3.6.0" + }, + "engines": { + "node": ">= 8.10.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" } }, - "cliui": { - "version": "7.0.4", - "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", - "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", - "dev": true, - "requires": { - "string-width": "^4.2.0", - "strip-ansi": "^6.0.0", - "wrap-ansi": "^7.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - } - } - }, - "color-convert": { + "node_modules/color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", "dev": true, - "requires": { + "dependencies": { "color-name": "1.1.3" } }, - "color-name": { + "node_modules/color-name": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", "dev": true }, - "colorette": { + "node_modules/colorette": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==", "dev": true }, - "commander": { + "node_modules/commander": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", - "dev": true + "dev": true, + "engines": { + "node": ">= 6" + } }, - "concat-map": { + "node_modules/concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "dev": true }, - "convert-source-map": { + "node_modules/convert-source-map": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", "dev": true, - "requires": { + "dependencies": { "safe-buffer": "~5.1.1" } }, - "core-js-compat": { + "node_modules/core-js-compat": { "version": "3.18.0", "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.18.0.tgz", "integrity": "sha512-tRVjOJu4PxdXjRMEgbP7lqWy1TWJu9a01oBkn8d+dNrhgmBwdTkzhHZpVJnEmhISLdoJI1lX08rcBcHi3TZIWg==", "dev": true, - "requires": { + "dependencies": { "browserslist": "^4.17.0", "semver": "7.0.0" }, - "dependencies": { - "semver": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", - "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", - "dev": true - } + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/core-js" + } + }, + "node_modules/core-js-compat/node_modules/semver": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", + "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" } }, - "debug": { + "node_modules/debug": { "version": "4.3.2", "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", "dev": true, - "requires": { + "dependencies": { "ms": "2.1.2" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } } }, - "decamelize": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-4.0.0.tgz", - "integrity": "sha512-9iE1PgSik9HeIIw2JO94IidnE3eBoQrFJ3w7sFuzSX4DpmZ3v5sZpUiV5Swcf6mQEF+Y0ru8Neo+p+nyh2J+hQ==", - "dev": true - }, - "define-properties": { + "node_modules/define-properties": { "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", "dev": true, - "requires": { + "dependencies": { "object-keys": "^1.0.12" + }, + "engines": { + "node": ">= 0.4" } }, - "diff": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/diff/-/diff-5.0.0.tgz", - "integrity": "sha512-/VTCrvm5Z0JGty/BWHljh+BAiw3IK+2j87NGMu8Nwc/f48WoDAC395uomO9ZD117ZOBaHmkX1oyLvkVM/aIT3w==", - "dev": true - }, - "electron-to-chromium": { + "node_modules/electron-to-chromium": { "version": "1.3.845", "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.845.tgz", "integrity": "sha512-y0RorqmExFDI4RjLEC6j365bIT5UAXf9WIRcknvSFHVhbC/dRnCgJnPA3DUUW6SCC85QGKEafgqcHJ6uPdEP1Q==", "dev": true }, - "emoji-regex": { - "version": "8.0.0", - "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", - "dev": true - }, - "escalade": { + "node_modules/escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true + "dev": true, + "engines": { + "node": ">=6" + } }, - "escape-string-regexp": { + "node_modules/escape-string-regexp": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true + "dev": true, + "engines": { + "node": ">=0.8.0" + } }, - "esutils": { + "node_modules/esutils": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "fill-range": { + "node_modules/fill-range": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", "dev": true, - "requires": { + "optional": true, + "dependencies": { "to-regex-range": "^5.0.1" + }, + "engines": { + "node": ">=8" } }, - "find-up": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", - "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", - "dev": true, - "requires": { - "locate-path": "^6.0.0", - "path-exists": "^4.0.0" - } - }, - "flat": { - "version": "5.0.2", - "resolved": "https://registry.npmjs.org/flat/-/flat-5.0.2.tgz", - "integrity": "sha512-b6suED+5/3rTpUBdG1gupIl8MPFCAMA0QXwmljLhvCUKcUvdE4gWky9zpuGCcXHOsz4J9wPGNWq6OKpmIzz3hQ==", - "dev": true - }, - "fs-readdir-recursive": { + "node_modules/fs-readdir-recursive": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==", "dev": true }, - "fs.realpath": { + "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, - "fsevents": { + "node_modules/fsevents": { "version": "2.3.2", "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", "dev": true, - "optional": true + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } }, - "function-bind": { + "node_modules/function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", "dev": true }, - "gensync": { + "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true - }, - "get-caller-file": { - "version": "2.0.5", - "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", - "dev": true + "dev": true, + "engines": { + "node": ">=6.9.0" + } }, - "get-intrinsic": { + "node_modules/get-intrinsic": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", "dev": true, - "requires": { + "dependencies": { "function-bind": "^1.1.1", "has": "^1.0.3", "has-symbols": "^1.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "glob": { + "node_modules/glob": { "version": "7.1.7", "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", + "deprecated": "Glob versions prior to v9 are no longer supported", "dev": true, - "requires": { + "dependencies": { "fs.realpath": "^1.0.0", "inflight": "^1.0.4", "inherits": "2", "minimatch": "^3.0.4", "once": "^1.3.0", "path-is-absolute": "^1.0.0" + }, + "engines": { + "node": "*" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" } }, - "glob-parent": { + "node_modules/glob-parent": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", "dev": true, - "requires": { + "optional": true, + "dependencies": { "is-glob": "^4.0.1" + }, + "engines": { + "node": ">= 6" } }, - "globals": { + "node_modules/globals": { "version": "11.12.0", "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true - }, - "growl": { - "version": "1.10.5", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", - "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", - "dev": true + "dev": true, + "engines": { + "node": ">=4" + } }, - "has": { + "node_modules/has": { "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", "dev": true, - "requires": { + "dependencies": { "function-bind": "^1.1.1" + }, + "engines": { + "node": ">= 0.4.0" } }, - "has-flag": { + "node_modules/has-flag": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true + "dev": true, + "engines": { + "node": ">=4" + } }, - "has-symbols": { + "node_modules/has-symbols": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", - "dev": true - }, - "he": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", - "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true + "dev": true, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } }, - "inflight": { + "node_modules/inflight": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", "dev": true, - "requires": { + "dependencies": { "once": "^1.3.0", "wrappy": "1" } }, - "inherits": { + "node_modules/inherits": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", "dev": true }, - "is-binary-path": { + "node_modules/is-binary-path": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", "dev": true, - "requires": { + "optional": true, + "dependencies": { "binary-extensions": "^2.0.0" + }, + "engines": { + "node": ">=8" } }, - "is-core-module": { + "node_modules/is-core-module": { "version": "2.6.0", "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.6.0.tgz", "integrity": "sha512-wShG8vs60jKfPWpF2KZRaAtvt3a20OAn7+IJ6hLPECpSABLcKtFKTTI4ZtH5QcBruBHlq+WsdHWyz0BCZW7svQ==", "dev": true, - "requires": { + "dependencies": { "has": "^1.0.3" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "is-extglob": { + "node_modules/is-extglob": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", - "dev": true + "dev": true, + "optional": true, + "engines": { + "node": ">=0.10.0" + } }, - "is-glob": { + "node_modules/is-glob": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", "dev": true, - "requires": { + "optional": true, + "dependencies": { "is-extglob": "^2.1.1" + }, + "engines": { + "node": ">=0.10.0" } }, - "is-number": { + "node_modules/is-number": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, - "is-plain-obj": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-2.1.0.tgz", - "integrity": "sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==", - "dev": true - }, - "is-unicode-supported": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz", - "integrity": "sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw==", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", - "dev": true + "dev": true, + "optional": true, + "engines": { + "node": ">=0.12.0" + } }, - "js-tokens": { + "node_modules/js-tokens": { "version": "4.0.0", "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", "dev": true }, - "js-yaml": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-4.1.0.tgz", - "integrity": "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==", - "dev": true, - "requires": { - "argparse": "^2.0.1" - } - }, - "jsesc": { + "node_modules/jsesc": { "version": "2.5.2", "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=4" + } }, - "json5": { + "node_modules/json5": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", "dev": true, - "requires": { + "dependencies": { "minimist": "^1.2.5" + }, + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" } }, - "locate-path": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", - "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", - "dev": true, - "requires": { - "p-locate": "^5.0.0" - } - }, - "lodash.debounce": { + "node_modules/lodash.debounce": { "version": "4.0.8", "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", "dev": true }, - "log-symbols": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.1.0.tgz", - "integrity": "sha512-8XPvpAA8uyhfteu8pIvQxpJZ7SYYdpUivZpGy6sFsBuKRY/7rQGavedeB8aK+Zkyq6upMFVL/9AW6vOYzfRyLg==", - "dev": true, - "requires": { - "chalk": "^4.1.0", - "is-unicode-supported": "^0.1.0" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "make-dir": { + "node_modules/make-dir": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", "dev": true, - "requires": { + "dependencies": { "pify": "^4.0.1", "semver": "^5.6.0" + }, + "engines": { + "node": ">=6" } }, - "minimatch": { + "node_modules/minimatch": { "version": "3.0.4", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", "dev": true, - "requires": { + "dependencies": { "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" } }, - "minimist": { + "node_modules/minimist": { "version": "1.2.5", "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", "dev": true }, - "mocha": { - "version": "9.1.1", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-9.1.1.tgz", - "integrity": "sha512-0wE74YMgOkCgBUj8VyIDwmLUjTsS13WV1Pg7l0SHea2qzZzlq7MDnfbPsHKcELBRk3+izEVkRofjmClpycudCA==", - "dev": true, - "requires": { - "@ungap/promise-all-settled": "1.1.2", - "ansi-colors": "4.1.1", - "browser-stdout": "1.3.1", - "chokidar": "3.5.2", - "debug": "4.3.1", - "diff": "5.0.0", - "escape-string-regexp": "4.0.0", - "find-up": "5.0.0", - "glob": "7.1.7", - "growl": "1.10.5", - "he": "1.2.0", - "js-yaml": "4.1.0", - "log-symbols": "4.1.0", - "minimatch": "3.0.4", - "ms": "2.1.3", - "nanoid": "3.1.23", - "serialize-javascript": "6.0.0", - "strip-json-comments": "3.1.1", - "supports-color": "8.1.1", - "which": "2.0.2", - "wide-align": "1.1.3", - "workerpool": "6.1.5", - "yargs": "16.2.0", - "yargs-parser": "20.2.4", - "yargs-unparser": "2.0.0" - }, - "dependencies": { - "debug": { - "version": "4.3.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", - "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", - "dev": true, - "requires": { - "ms": "2.1.2" - }, - "dependencies": { - "ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - } - } - }, - "escape-string-regexp": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", - "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", - "dev": true - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "supports-color": { - "version": "8.1.1", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", - "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "ms": { + "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", "dev": true }, - "nanoid": { - "version": "3.1.23", - "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.1.23.tgz", - "integrity": "sha512-FiB0kzdP0FFVGDKlRLEQ1BgDzU87dy5NnzjeW9YZNt+/c3+q82EQDUwniSAUxp/F0gFNI1ZhKU1FqYsMuqZVnw==", - "dev": true - }, - "node-releases": { + "node_modules/node-releases": { "version": "1.1.76", "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.76.tgz", "integrity": "sha512-9/IECtNr8dXNmPWmFXepT0/7o5eolGesHUa3mtr0KlgnCvnZxwh2qensKL42JJY2vQKC3nIBXetFAqR+PW1CmA==", "dev": true }, - "normalize-path": { + "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true + "dev": true, + "optional": true, + "engines": { + "node": ">=0.10.0" + } }, - "object-keys": { + "node_modules/object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true + "dev": true, + "engines": { + "node": ">= 0.4" + } }, - "object.assign": { + "node_modules/object.assign": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", "dev": true, - "requires": { + "dependencies": { "call-bind": "^1.0.0", "define-properties": "^1.1.3", "has-symbols": "^1.0.1", "object-keys": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "once": { + "node_modules/once": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "dev": true, - "requires": { + "dependencies": { "wrappy": "1" } }, - "p-limit": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.1.0.tgz", - "integrity": "sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==", - "dev": true, - "requires": { - "yocto-queue": "^0.1.0" - } - }, - "p-locate": { - "version": "5.0.0", - "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", - "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", - "dev": true, - "requires": { - "p-limit": "^3.0.2" - } - }, - "path-exists": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", - "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", - "dev": true - }, - "path-is-absolute": { + "node_modules/path-is-absolute": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true + "dev": true, + "engines": { + "node": ">=0.10.0" + } }, - "path-parse": { + "node_modules/path-parse": { "version": "1.0.7", "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, - "picomatch": { + "node_modules/picomatch": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", - "dev": true + "dev": true, + "optional": true, + "engines": { + "node": ">=8.6" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } }, - "pify": { + "node_modules/pify": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true - }, - "randombytes": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", - "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", "dev": true, - "requires": { - "safe-buffer": "^5.1.0" + "engines": { + "node": ">=6" } }, - "readdirp": { + "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", "dev": true, - "requires": { + "optional": true, + "dependencies": { "picomatch": "^2.2.1" + }, + "engines": { + "node": ">=8.10.0" } }, - "regenerate": { + "node_modules/regenerate": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", "dev": true }, - "regenerate-unicode-properties": { + "node_modules/regenerate-unicode-properties": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-9.0.0.tgz", "integrity": "sha512-3E12UeNSPfjrgwjkR81m5J7Aw/T55Tu7nUyZVQYCKEOs+2dkxEY+DpPtZzO4YruuiPb7NkYLVcyJC4+zCbk5pA==", "dev": true, - "requires": { + "dependencies": { "regenerate": "^1.4.2" + }, + "engines": { + "node": ">=4" } }, - "regenerator-runtime": { + "node_modules/regenerator-runtime": { "version": "0.13.9", "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", "dev": true }, - "regenerator-transform": { + "node_modules/regenerator-transform": { "version": "0.14.5", "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.5.tgz", "integrity": "sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw==", "dev": true, - "requires": { + "dependencies": { "@babel/runtime": "^7.8.4" } }, - "regexpu-core": { + "node_modules/regexpu-core": { "version": "4.8.0", "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.8.0.tgz", "integrity": "sha512-1F6bYsoYiz6is+oz70NWur2Vlh9KWtswuRuzJOfeYUrfPX2o8n74AnUVaOGDbUqVGO9fNHu48/pjJO4sNVwsOg==", "dev": true, - "requires": { + "dependencies": { "regenerate": "^1.4.2", "regenerate-unicode-properties": "^9.0.0", "regjsgen": "^0.5.2", "regjsparser": "^0.7.0", "unicode-match-property-ecmascript": "^2.0.0", "unicode-match-property-value-ecmascript": "^2.0.0" + }, + "engines": { + "node": ">=4" } }, - "regjsgen": { + "node_modules/regjsgen": { "version": "0.5.2", "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz", "integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==", "dev": true }, - "regjsparser": { + "node_modules/regjsparser": { "version": "0.7.0", "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.7.0.tgz", "integrity": "sha512-A4pcaORqmNMDVwUjWoTzuhwMGpP+NykpfqAsEgI1FSH/EzC7lrN5TMd+kN8YCovX+jMpu8eaqXgXPCa0g8FQNQ==", "dev": true, - "requires": { + "dependencies": { "jsesc": "~0.5.0" }, - "dependencies": { - "jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", - "dev": true - } + "bin": { + "regjsparser": "bin/parser" } }, - "require-directory": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", - "dev": true + "node_modules/regjsparser/node_modules/jsesc": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", + "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", + "dev": true, + "bin": { + "jsesc": "bin/jsesc" + } }, - "resolve": { + "node_modules/resolve": { "version": "1.20.0", "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", "dev": true, - "requires": { + "dependencies": { "is-core-module": "^2.2.0", "path-parse": "^1.0.6" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" } }, - "safe-buffer": { + "node_modules/safe-buffer": { "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", "dev": true }, - "semver": { + "node_modules/semver": { "version": "5.7.1", "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, - "serialize-javascript": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.0.tgz", - "integrity": "sha512-Qr3TosvguFt8ePWqsvRfrKyQXIiW+nGbYpy8XK24NQHE83caxWt+mIymTT19DGFbNWNLfEwsrkSmN64lVWB9ag==", "dev": true, - "requires": { - "randombytes": "^2.1.0" + "bin": { + "semver": "bin/semver" } }, - "slash": { + "node_modules/slash": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "dev": true + "dev": true, + "engines": { + "node": ">=6" + } }, - "source-map": { + "node_modules/source-map": { "version": "0.5.7", "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true - }, - "string-width": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", - "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", - "dev": true, - "requires": { - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^4.0.0" - } - }, - "strip-ansi": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", - "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", "dev": true, - "requires": { - "ansi-regex": "^3.0.0" + "engines": { + "node": ">=0.10.0" } }, - "strip-json-comments": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", - "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", - "dev": true - }, - "supports-color": { + "node_modules/supports-color": { "version": "5.5.0", "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", "dev": true, - "requires": { + "dependencies": { "has-flag": "^3.0.0" + }, + "engines": { + "node": ">=4" } }, - "to-fast-properties": { + "node_modules/tinybench": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-4.0.1.tgz", + "integrity": "sha512-Nb1srn7dvzkVx0J5h1vq8f48e3TIcbrS7e/UfAI/cDSef/n8yLh4zsAEsFkfpw6auTY+ZaspEvam/xs8nMnotQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/to-fast-properties": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true + "dev": true, + "engines": { + "node": ">=4" + } }, - "to-regex-range": { + "node_modules/to-regex-range": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", "dev": true, - "requires": { + "optional": true, + "dependencies": { "is-number": "^7.0.0" + }, + "engines": { + "node": ">=8.0" } }, - "uglify-js": { + "node_modules/uglify-js": { "version": "3.14.2", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.14.2.tgz", "integrity": "sha512-rtPMlmcO4agTUfz10CbgJ1k6UAoXM2gWb3GoMPPZB/+/Ackf8lNWk11K4rYi2D0apgoFRLtQOZhb+/iGNJq26A==", - "dev": true + "dev": true, + "bin": { + "uglifyjs": "bin/uglifyjs" + }, + "engines": { + "node": ">=0.8.0" + } }, - "unicode-canonical-property-names-ecmascript": { + "node_modules/unicode-canonical-property-names-ecmascript": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", - "dev": true + "dev": true, + "engines": { + "node": ">=4" + } }, - "unicode-match-property-ecmascript": { + "node_modules/unicode-match-property-ecmascript": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", "dev": true, - "requires": { + "dependencies": { "unicode-canonical-property-names-ecmascript": "^2.0.0", "unicode-property-aliases-ecmascript": "^2.0.0" + }, + "engines": { + "node": ">=4" } }, - "unicode-match-property-value-ecmascript": { + "node_modules/unicode-match-property-value-ecmascript": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz", "integrity": "sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw==", - "dev": true + "dev": true, + "engines": { + "node": ">=4" + } }, - "unicode-property-aliases-ecmascript": { + "node_modules/unicode-property-aliases-ecmascript": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz", "integrity": "sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ==", - "dev": true - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "wide-align": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", - "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", "dev": true, - "requires": { - "string-width": "^1.0.2 || 2" + "engines": { + "node": ">=4" } }, - "workerpool": { - "version": "6.1.5", - "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.1.5.tgz", - "integrity": "sha512-XdKkCK0Zqc6w3iTxLckiuJ81tiD/o5rBE/m+nXpRCB+/Sq4DqkfXZ/x0jW02DG1tGsfUGXbTJyZDP+eu67haSw==", - "dev": true - }, - "wrap-ansi": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", - "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", - "dev": true, - "requires": { - "ansi-styles": "^4.0.0", - "string-width": "^4.1.0", - "strip-ansi": "^6.0.0" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - } - } - }, - "wrappy": { + "node_modules/wrappy": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "dev": true - }, - "y18n": { - "version": "5.0.8", - "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", - "dev": true - }, - "yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "requires": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "dependencies": { - "ansi-regex": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", - "dev": true - }, - "is-fullwidth-code-point": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", - "dev": true - }, - "string-width": { - "version": "4.2.2", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.2.tgz", - "integrity": "sha512-XBJbT3N4JhVumXE0eoLU9DCjcaF92KLNqTmFCnG1pf8duUxFGwtP6AD6nkjw9a3IdiRtL3E2w3JDiE/xi3vOeA==", - "dev": true, - "requires": { - "emoji-regex": "^8.0.0", - "is-fullwidth-code-point": "^3.0.0", - "strip-ansi": "^6.0.0" - } - }, - "strip-ansi": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", - "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", - "dev": true, - "requires": { - "ansi-regex": "^5.0.0" - } - } - } - }, - "yargs-parser": { - "version": "20.2.4", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.4.tgz", - "integrity": "sha512-WOkpgNhPTlE73h4VFAFsOnomJVaovO8VqLDzy5saChRBFQFBoMYirowyW+Q9HB4HFF4Z7VZTiG3iSzJJA29yRA==", - "dev": true - }, - "yargs-unparser": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-2.0.0.tgz", - "integrity": "sha512-7pRTIA9Qc1caZ0bZ6RYRGbHJthJWuakf+WmHK0rVeLkNrrGhfoabBNdue6kdINI6r4if7ocq9aD/n7xwKOdzOA==", - "dev": true, - "requires": { - "camelcase": "^6.0.0", - "decamelize": "^4.0.0", - "flat": "^5.0.2", - "is-plain-obj": "^2.1.0" - } - }, - "yocto-queue": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", - "integrity": "sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==", - "dev": true } } } diff --git a/package.json b/package.json index 1d1001e..8664071 100644 --- a/package.json +++ b/package.json @@ -22,7 +22,7 @@ "@babel/cli": "^7.14.8", "@babel/core": "^7.15.0", "@babel/preset-env": "^7.15.0", - "mocha": "^9.0.3", + "tinybench": "^4.0.1", "uglify-js": "^3.14.1" }, "engines": { @@ -30,7 +30,7 @@ }, "scripts": { "build": "./node_modules/.bin/babel src --out-dir lib && uglifyjs lib/dateformat.js -o lib/dateformat.js", - "test": "npm run build && mocha", + "test": "npm run build && node --test", "benchmark": "npm run build && node ./benchmark/benchmark.js" }, "repository": { diff --git a/test/test_dayofweek.js b/test/test_dayofweek.js index 1494ac9..678995d 100644 --- a/test/test_dayofweek.js +++ b/test/test_dayofweek.js @@ -1,15 +1,15 @@ +import { describe, it } from "node:test"; import { strictEqual } from 'node:assert'; import dateFormat from './../lib/dateformat.js'; describe('dayOfWeek', function() { - it('should correctly format the timezone part', function(done) { + it('should correctly format the timezone part', function() { var start = 10; // the 10 of March 2013 is a Sunday for(var dow = 1; dow <= 7; dow++){ var date = new Date('2013-03-' + (start + dow)); var N = dateFormat(date, 'N'); strictEqual(N, String(dow)); } - done(); }); }); diff --git a/test/test_formats.js b/test/test_formats.js index 4eaffb8..6f85035 100644 --- a/test/test_formats.js +++ b/test/test_formats.js @@ -1,4 +1,5 @@ -import { strictEqual } from "node:assert"; +import { describe, it } from "node:test"; +import { strictEqual } from 'node:assert'; import dateFormat,{ masks } from "../lib/dateformat.js"; @@ -47,7 +48,7 @@ function timezoneOffset(date) { describe("dateformat([now], [mask])", function () { Object.keys(masks).forEach(function (key) { - it("should format `" + key + "` mask", function (done) { + it("should format `" + key + "` mask", () => { var now = new Date(2014, 2, 8, 13, 19, 44); var tzOffset = timezoneOffset(now); var expected = expects[key] @@ -64,15 +65,13 @@ describe("dateformat([now], [mask])", function () { } var actual = dateFormat(now, key); strictEqual(actual, expected); - done(); }); }); - it("should use `default` mask, when `mask` is empty", function (done) { + it("should use `default` mask, when `mask` is empty", () => { var now = new Date(2014, 2, 8, 13, 19, 44); var expected = expects["default"]; var actual = dateFormat(now); strictEqual(actual, expected); - done(); }); }); diff --git a/test/test_isoutcdatetime.js b/test/test_isoutcdatetime.js index 3780279..6ff4795 100644 --- a/test/test_isoutcdatetime.js +++ b/test/test_isoutcdatetime.js @@ -1,13 +1,13 @@ -import { strictEqual } from "node:assert"; +import { describe, it } from "node:test"; +import { strictEqual } from 'node:assert'; import dateFormat from "./../lib/dateformat.js"; describe("isoUtcDateTime", function () { - it("should correctly format the timezone part", function (done) { + it("should correctly format the timezone part", () => { var actual = dateFormat("2014-06-02T13:23:21-08:00", "isoUtcDateTime"); strictEqual(actual, "2014-06-02T21:23:21Z"); var epochTime = dateFormat(0, "isoUtcDateTime"); strictEqual(epochTime, "1970-01-01T00:00:00Z"); - done(); }); }); diff --git a/test/test_mask-d.js b/test/test_mask-d.js index b0c3e7c..772cef0 100644 --- a/test/test_mask-d.js +++ b/test/test_mask-d.js @@ -1,32 +1,29 @@ +import { describe, it } from "node:test"; import { strictEqual,notStrictEqual } from "node:assert"; import dateFormat from "../lib/dateformat.js"; describe("Mask: 'd'", function () { - it("should format '1993-03-12' as '12'", function (done) { + it("should format '1993-03-12' as '12'", () => { var date = new Date("1993-03-12"); var d = dateFormat(date, "d"); strictEqual(d, "12"); - done(); }); - it("should format '2020-11-1' as '1'", function (done) { + it("should format '2020-11-1' as '1'", () => { var date = new Date("2020-11-1"); var d = dateFormat(date, "d"); strictEqual(d, "1"); - done(); }); - it("should format '1830-01-20' as '20'", function (done) { + it("should format '1830-01-20' as '20'", () => { var date = new Date("1830-01-20"); var d = dateFormat(date, "d"); strictEqual(d, "20"); - done(); }); - it("should not format '1830-01-06' as '06'", function (done) { + it("should not format '1830-01-06' as '06'", () => { var date = new Date("1830-01-20"); var d = dateFormat(date, "d"); notStrictEqual(d, "06"); - done(); }); }); diff --git a/test/test_mask-dd.js b/test/test_mask-dd.js index 3e972f1..05d9629 100644 --- a/test/test_mask-dd.js +++ b/test/test_mask-dd.js @@ -1,32 +1,29 @@ +import { describe, it } from "node:test"; import { strictEqual,notStrictEqual } from "node:assert"; import dateFormat from "../lib/dateformat.js"; describe("Mask: 'dd'", function () { - it("should format '2003-9-11' as '11'", function (done) { + it("should format '2003-9-11' as '11'", () => { var date = new Date("2003-9-11"); var d = dateFormat(date, "dd"); strictEqual(d, "11"); - done(); }); - it("should format '1992-02-2' as '02'", function (done) { + it("should format '1992-02-2' as '02'", () => { var date = new Date("1992-02-2"); var d = dateFormat(date, "dd"); strictEqual(d, "02"); - done(); }); - it("should format '1032-12-07' as '07'", function (done) { + it("should format '1032-12-07' as '07'", () => { var date = new Date("1032-12-07"); var d = dateFormat(date, "dd"); strictEqual(d, "07"); - done(); }); - it("should not format '2077-10-06' as '6'", function (done) { + it("should not format '2077-10-06' as '6'", () => { var date = new Date("2077-10-06"); var d = dateFormat(date, "dd"); notStrictEqual(d, "6"); - done(); }); }); diff --git a/test/test_mask-ddd.js b/test/test_mask-ddd.js index bcb930c..b48a15e 100644 --- a/test/test_mask-ddd.js +++ b/test/test_mask-ddd.js @@ -1,25 +1,23 @@ -import { strictEqual } from "node:assert"; +import { describe, it } from "node:test"; +import { strictEqual } from 'node:assert'; import dateFormat from "../lib/dateformat.js"; describe("Mask: 'ddd'", function () { - it("should format '2023-01-07' as 'Sat'", function (done) { + it("should format '2023-01-07' as 'Sat'", () => { var date = new Date("2023-01-07"); var d = dateFormat(date, "ddd"); strictEqual(d, "Sat"); - done(); }); - it("should format '1873-12-17' as 'Wed'", function (done) { + it("should format '1873-12-17' as 'Wed'", () => { var date = new Date("1873-12-17"); var d = dateFormat(date, "ddd"); strictEqual(d, "Wed"); - done(); }); - it("should format '2112-10-25' as 'Tue'", function (done) { + it("should format '2112-10-25' as 'Tue'", () => { var date = new Date("2112-10-25"); var d = dateFormat(date, "ddd"); strictEqual(d, "Tue"); - done(); }); }); diff --git a/test/test_mask-dddd.js b/test/test_mask-dddd.js index 8263254..2ae8177 100644 --- a/test/test_mask-dddd.js +++ b/test/test_mask-dddd.js @@ -1,25 +1,23 @@ -import { strictEqual } from "node:assert"; +import { describe, it } from "node:test"; +import { strictEqual } from 'node:assert'; import dateFormat from "../lib/dateformat.js"; describe("Mask: 'dddd'", function () { - it("should format '1934-11-13' as 'Tuesday'", function (done) { + it("should format '1934-11-13' as 'Tuesday'", () => { var date = new Date("1934-11-13"); var d = dateFormat(date, "dddd"); strictEqual(d, "Tuesday"); - done(); }); - it("should format '1834-01-2' as 'Thursday'", function (done) { + it("should format '1834-01-2' as 'Thursday'", () => { var date = new Date("1834-01-2"); var d = dateFormat(date, "dddd"); strictEqual(d, "Thursday"); - done(); }); - it("should format '2077-7-22' as 'Thursday'", function (done) { + it("should format '2077-7-22' as 'Thursday'", () => { var date = new Date("2077-7-22"); var d = dateFormat(date, "dddd"); strictEqual(d, "Thursday"); - done(); }); }); diff --git a/test/test_mask-h.js b/test/test_mask-h.js index 1808ad7..8562dd1 100644 --- a/test/test_mask-h.js +++ b/test/test_mask-h.js @@ -1,30 +1,27 @@ -import { strictEqual } from "node:assert"; +import { describe, it } from "node:test"; +import { strictEqual } from 'node:assert'; import dateFormat from "../lib/dateformat.js"; describe("Mask: 'h'", function () { - it("should format '2020-10-22T22:10:59.736' as '10'", function (done) { + it("should format '2020-10-22T22:10:59.736' as '10'", () => { var date = new Date("2020-10-22T22:10:59.736"); var d = dateFormat(date, "h"); strictEqual(d, "10"); - done(); }); - it("should format '2020-10-13T13:30:41.278' as '1'", function (done) { + it("should format '2020-10-13T13:30:41.278' as '1'", () => { var date = new Date("2020-10-13T13:30:41.278"); var d = dateFormat(date, "h"); strictEqual(d, "1"); - done(); }); - it("should format '1993-02-19T03:18:18.711' as '3'", function (done) { + it("should format '1993-02-19T03:18:18.711' as '3'", () => { var d = dateFormat("1993-02-19T03:18:18.711", "h"); strictEqual(d, "3"); - done(); }); - it("should format '2134-01-25T02:20:42.816' as '2'", function (done) { + it("should format '2134-01-25T02:20:42.816' as '2'", () => { var d = dateFormat("2134-01-25T02:20:42.816", "h"); strictEqual(d, "2"); - done(); }); }); diff --git a/test/test_mask-h_.js b/test/test_mask-h_.js index 85e32d4..5ab6dc6 100644 --- a/test/test_mask-h_.js +++ b/test/test_mask-h_.js @@ -1,30 +1,27 @@ -import { strictEqual } from "node:assert"; +import { describe, it } from "node:test"; +import { strictEqual } from 'node:assert'; import dateFormat from "../lib/dateformat.js"; describe("Mask: 'H'", function () { - it("should format '1883-03-22T07:35:26.419' as '7'", function (done) { + it("should format '1883-03-22T07:35:26.419' as '7'", () => { var date = new Date("1883-03-22T07:35:26.419"); var d = dateFormat(date, "H"); strictEqual(d, "7"); - done(); }); - it("should format '2012-11-07T14:39:48.988' as '14'", function (done) { + it("should format '2012-11-07T14:39:48.988' as '14'", () => { var date = new Date("2012-11-07T14:39:48.988"); var d = dateFormat(date, "H"); strictEqual(d, "14"); - done(); }); - it("should format '1882-01-16T19:37:45.965' as '19'", function (done) { + it("should format '1882-01-16T19:37:45.965' as '19'", () => { var d = dateFormat("1882-01-16T19:37:45.965", "H"); strictEqual(d, "19"); - done(); }); - it("should format '2020-08-29T11:20:47.128' as '11'", function (done) { + it("should format '2020-08-29T11:20:47.128' as '11'", () => { var d = dateFormat("2020-08-29T11:20:47.128", "H"); strictEqual(d, "11"); - done(); }); }); diff --git a/test/test_mask-h_h_.js b/test/test_mask-h_h_.js index c34038d..9a8ff7d 100644 --- a/test/test_mask-h_h_.js +++ b/test/test_mask-h_h_.js @@ -1,30 +1,27 @@ -import { strictEqual } from "node:assert"; +import { describe, it } from "node:test"; +import { strictEqual } from 'node:assert'; import dateFormat from "../lib/dateformat.js"; describe("Mask: 'HH'", function () { - it("should format '1872-02-01T15:55:16.524' as '15'", function (done) { + it("should format '1872-02-01T15:55:16.524' as '15'", () => { var date = new Date("1872-02-01T15:55:16.524"); var d = dateFormat(date, "HH"); strictEqual(d, "15"); - done(); }); - it("should format '2020-10-08T14:32:24.438' as '14'", function (done) { + it("should format '2020-10-08T14:32:24.438' as '14'", () => { var date = new Date("2020-10-08T14:32:24.438"); var d = dateFormat(date, "HH"); strictEqual(d, "14"); - done(); }); - it("should format '2077-12-24T04:20:55.795' as '04'", function (done) { + it("should format '2077-12-24T04:20:55.795' as '04'", () => { var d = dateFormat("2077-12-24T04:20:55.795", "HH"); strictEqual(d, "04"); - done(); }); - it("should format '1782-02-11T01:09:41.403' as '01'", function (done) { + it("should format '1782-02-11T01:09:41.403' as '01'", () => { var d = dateFormat("1782-02-11T01:09:41.403", "HH"); strictEqual(d, "01"); - done(); }); }); diff --git a/test/test_mask-hh.js b/test/test_mask-hh.js index 8ad4c28..f92f517 100644 --- a/test/test_mask-hh.js +++ b/test/test_mask-hh.js @@ -1,30 +1,27 @@ -import { strictEqual } from "node:assert"; +import { describe, it } from "node:test"; +import { strictEqual } from 'node:assert'; import dateFormat from "../lib/dateformat.js"; describe("Mask: 'hh'", function () { - it("should format '1987-02-11T11:03:16.637' as '11'", function (done) { + it("should format '1987-02-11T11:03:16.637' as '11'", () => { var date = new Date("1987-02-11T11:03:16.637"); var d = dateFormat(date, "hh"); strictEqual(d, "11"); - done(); }); - it("should format '2014-09-28T04:29:52.509' as '04'", function (done) { + it("should format '2014-09-28T04:29:52.509' as '04'", () => { var date = new Date("2020-09-28T04:29:52.509"); var d = dateFormat(date, "hh"); strictEqual(d, "04"); - done(); }); - it("should format '2001-08-02T19:14:19.263' as '07'", function (done) { + it("should format '2001-08-02T19:14:19.263' as '07'", () => { var d = dateFormat("2001-08-02T19:14:19.263", "hh"); strictEqual(d, "07"); - done(); }); - it("should format '1872-01-22T19:26:01.744' as '07'", function (done) { + it("should format '1872-01-22T19:26:01.744' as '07'", () => { var d = dateFormat("1872-01-22T19:26:01.744", "hh"); strictEqual(d, "07"); - done(); }); }); diff --git a/test/test_mask-l.js b/test/test_mask-l.js index c03215e..6187483 100644 --- a/test/test_mask-l.js +++ b/test/test_mask-l.js @@ -1,30 +1,27 @@ -import { strictEqual } from "node:assert"; +import { describe, it } from "node:test"; +import { strictEqual } from 'node:assert'; import dateFormat from "../lib/dateformat.js"; describe("Mask: 'l'", function () { - it("should format '2020-10-10T08:48:02.436' as '436'", function (done) { + it("should format '2020-10-10T08:48:02.436' as '436'", () => { var date = new Date("2020-10-10T08:48:02.436"); var d = dateFormat(date, "l"); strictEqual(d, "436"); - done(); }); - it("should format '1993-02-16T14:22:12.654' as '654'", function (done) { + it("should format '1993-02-16T14:22:12.654' as '654'", () => { var date = new Date("1993-02-16T14:22:12.654"); var d = dateFormat(date, "l"); strictEqual(d, "654"); - done(); }); - it("should format '2076-01-03T18:23:30.064' as '064'", function (done) { + it("should format '2076-01-03T18:23:30.064' as '064'", () => { var d = dateFormat("2076-01-03T18:23:30.064", "l"); strictEqual(d, "064"); - done(); }); - it("should format '2002-12-25T19:35:55.655' as '655'", function (done) { + it("should format '2002-12-25T19:35:55.655' as '655'", () => { var d = dateFormat("2002-12-25T19:35:55.655", "l"); strictEqual(d, "655"); - done(); }); }); diff --git a/test/test_mask-l_.js b/test/test_mask-l_.js index c14fa3a..9063f9b 100644 --- a/test/test_mask-l_.js +++ b/test/test_mask-l_.js @@ -1,36 +1,32 @@ -import { strictEqual } from "node:assert"; +import { describe, it } from "node:test"; +import { strictEqual } from 'node:assert'; import dateFormat from "../lib/dateformat.js"; describe("Mask: 'L'", function () { - it("should format '2020-10-10T08:48:02.436' as '44'", function (done) { + it("should format '2020-10-10T08:48:02.436' as '44'", () => { var date = new Date("2020-10-10T08:48:02.436"); var d = dateFormat(date, "L"); strictEqual(d, "43"); - done(); }); - it("should format '1993-02-16T14:22:12.654' as '65'", function (done) { + it("should format '1993-02-16T14:22:12.654' as '65'", () => { var date = new Date("1993-02-16T14:22:12.654"); var d = dateFormat(date, "L"); strictEqual(d, "65"); - done(); }); - it("should format '2076-01-03T18:23:30.064' as '06'", function (done) { + it("should format '2076-01-03T18:23:30.064' as '06'", () => { var d = dateFormat("2076-01-03T18:23:30.064", "L"); strictEqual(d, "06"); - done(); }); - it("should format '2002-12-25T19:35:55.655' as '66'", function (done) { + it("should format '2002-12-25T19:35:55.655' as '66'", () => { var d = dateFormat("2002-12-25T19:35:55.655", "L"); strictEqual(d, "65"); - done(); }); - it("should format '2126-07-23T03:15:25.999' as '99'", function (done) { + it("should format '2126-07-23T03:15:25.999' as '99'", () => { var d = dateFormat("2126-07-23T03:15:25.999", "L"); strictEqual(d, "99"); - done(); }); }); diff --git a/test/test_mask-m.js b/test/test_mask-m.js index f49aa28..c213bc3 100644 --- a/test/test_mask-m.js +++ b/test/test_mask-m.js @@ -1,32 +1,29 @@ -import { strictEqual } from "node:assert"; +import { describe, it } from "node:test"; +import { strictEqual } from 'node:assert'; import dateFormat from "../lib/dateformat.js"; describe("Mask: 'm'", function () { - it("should format '1974-02-7' as '2'", function (done) { + it("should format '1974-02-7' as '2'", () => { var date = new Date("1974-02-7"); var d = dateFormat(date, "m"); strictEqual(d, "2"); - done(); }); - it("should format '1992-09-03' as '9'", function (done) { + it("should format '1992-09-03' as '9'", () => { var date = new Date("1992-09-03"); var d = dateFormat(date, "m"); strictEqual(d, "9"); - done(); }); - it("should format '2043-12-22' as '12'", function (done) { + it("should format '2043-12-22' as '12'", () => { var date = new Date("2043-12-22"); var d = dateFormat(date, "m"); strictEqual(d, "12"); - done(); }); - it("should format '1800-01-01' as '1'", function (done) { + it("should format '1800-01-01' as '1'", () => { var date = new Date("1800-01-01"); var d = dateFormat(date, "m"); strictEqual(d, "1"); - done(); }); }); diff --git a/test/test_mask-m_.js b/test/test_mask-m_.js index 9638706..015a88c 100644 --- a/test/test_mask-m_.js +++ b/test/test_mask-m_.js @@ -1,30 +1,27 @@ -import { strictEqual } from "node:assert"; +import { describe, it } from "node:test"; +import { strictEqual } from 'node:assert'; import dateFormat from "../lib/dateformat.js"; describe("Mask: 'M'", function () { - it("should format '1993-02-12T17:36:01.128' as '36'", function (done) { + it("should format '1993-02-12T17:36:01.128' as '36'", () => { var date = new Date("1993-02-12T17:36:01.128"); var d = dateFormat(date, "M"); strictEqual(d, "36"); - done(); }); - it("should format '2013-11-02T07:00:54.270' as '0'", function (done) { + it("should format '2013-11-02T07:00:54.270' as '0'", () => { var date = new Date("2013-11-02T07:00:54.270"); var d = dateFormat(date, "M"); strictEqual(d, "0"); - done(); }); - it("should format '1873-01-04T11:11:34.700' as '11'", function (done) { + it("should format '1873-01-04T11:11:34.700' as '11'", () => { var d = dateFormat("1873-01-04T11:11:34.700", "M"); strictEqual(d, "11"); - done(); }); - it("should format '1734-12-07T09:05:07.972' as '5'", function (done) { + it("should format '1734-12-07T09:05:07.972' as '5'", () => { var d = dateFormat("1734-12-07T09:05:07.972", "M"); strictEqual(d, "5"); - done(); }); }); diff --git a/test/test_mask-m_m_.js b/test/test_mask-m_m_.js index 02f47d6..5806af4 100644 --- a/test/test_mask-m_m_.js +++ b/test/test_mask-m_m_.js @@ -1,30 +1,27 @@ -import { strictEqual } from "node:assert"; +import { describe, it } from "node:test"; +import { strictEqual } from 'node:assert'; import dateFormat from "../lib/dateformat.js"; describe("Mask: 'MM'", function () { - it("should format '1876-07-11T13:19:36.341' as '19'", function (done) { + it("should format '1876-07-11T13:19:36.341' as '19'", () => { var date = new Date("1876-07-11T13:19:36.341"); var d = dateFormat(date, "MM"); strictEqual(d, "19"); - done(); }); - it("should format '2013-01-23T07:08:07.942' as '08'", function (done) { + it("should format '2013-01-23T07:08:07.942' as '08'", () => { var date = new Date("2013-01-23T07:08:07.942"); var d = dateFormat(date, "MM"); strictEqual(d, "08"); - done(); }); - it("should format '1982-12-03T08:04:07.203' as '04'", function (done) { + it("should format '1982-12-03T08:04:07.203' as '04'", () => { var d = dateFormat("1982-12-03T08:04:07.203", "MM"); strictEqual(d, "04"); - done(); }); - it("should format '2063-09-03T02:38:08.815' as '38'", function (done) { + it("should format '2063-09-03T02:38:08.815' as '38'", () => { var d = dateFormat("2063-09-03T02:38:08.815", "MM"); strictEqual(d, "38"); - done(); }); }); diff --git a/test/test_mask-mm.js b/test/test_mask-mm.js index 51f1eef..a1bbfbe 100644 --- a/test/test_mask-mm.js +++ b/test/test_mask-mm.js @@ -1,25 +1,23 @@ -import { strictEqual } from "node:assert"; +import { describe, it } from "node:test"; +import { strictEqual } from 'node:assert'; import dateFormat from "../lib/dateformat.js"; describe("Mask: 'mm'", function () { - it("should format '2014-11-17' as '11'", function (done) { + it("should format '2014-11-17' as '11'", () => { var date = new Date("2014-11-17"); var d = dateFormat(date, "mm"); strictEqual(d, "11"); - done(); }); - it("should format '1992-02-11' as '02'", function (done) { + it("should format '1992-02-11' as '02'", () => { var date = new Date("1992-02-11"); var d = dateFormat(date, "mm"); strictEqual(d, "02"); - done(); }); - it("should format '2077-01-25' as '01'", function (done) { + it("should format '2077-01-25' as '01'", () => { var date = new Date("2077-01-25"); var d = dateFormat(date, "mm"); strictEqual(d, "01"); - done(); }); }); diff --git a/test/test_mask-mmm.js b/test/test_mask-mmm.js index fd567a9..bbdc5ba 100644 --- a/test/test_mask-mmm.js +++ b/test/test_mask-mmm.js @@ -1,25 +1,23 @@ -import { strictEqual } from "node:assert"; +import { describe, it } from "node:test"; +import { strictEqual } from 'node:assert'; import dateFormat from "../lib/dateformat.js"; describe("Mask: 'mmm'", function () { - it("should format '2099-1-11' as 'Jan'", function (done) { + it("should format '2099-1-11' as 'Jan'", () => { var date = new Date("2099-1-11"); var d = dateFormat(date, "mmm"); strictEqual(d, "Jan"); - done(); }); - it("should format '1982-10-01' as 'Oct'", function (done) { + it("should format '1982-10-01' as 'Oct'", () => { var date = new Date("1982-10-01"); var d = dateFormat(date, "mmm"); strictEqual(d, "Oct"); - done(); }); - it("should format '1871-03-22' as 'Mar'", function (done) { + it("should format '1871-03-22' as 'Mar'", () => { var date = new Date("1871-03-22"); var d = dateFormat(date, "mmm"); strictEqual(d, "Mar"); - done(); }); }); diff --git a/test/test_mask-mmmm.js b/test/test_mask-mmmm.js index 2d9c2e8..09f2863 100644 --- a/test/test_mask-mmmm.js +++ b/test/test_mask-mmmm.js @@ -1,25 +1,23 @@ -import { strictEqual } from "node:assert"; +import { describe, it } from "node:test"; +import { strictEqual } from 'node:assert'; import dateFormat from "../lib/dateformat.js"; describe("Mask: 'mmmm'", function () { - it("should format '1993-02-11' as 'February'", function (done) { + it("should format '1993-02-11' as 'February'", function () { var date = new Date("1993-02-11"); var d = dateFormat(date, "mmmm"); strictEqual(d, "February"); - done(); }); - it("should format '2023-11-13' as 'November'", function (done) { + it("should format '2023-11-13' as 'November'", function () { var date = new Date("2023-11-13"); var d = dateFormat(date, "mmmm"); strictEqual(d, "November"); - done(); }); - it("should format '2077-10-01' as 'October'", function (done) { + it("should format '2077-10-01' as 'October'", function () { var date = new Date("2077-10-01"); var d = dateFormat(date, "mmmm"); strictEqual(d, "October"); - done(); }); }); diff --git a/test/test_mask-n_.js b/test/test_mask-n_.js index e1d8c6a..510527c 100644 --- a/test/test_mask-n_.js +++ b/test/test_mask-n_.js @@ -1,36 +1,32 @@ -import { strictEqual } from "node:assert"; +import { describe, it } from "node:test"; +import { strictEqual } from 'node:assert'; import dateFormat from "../lib/dateformat.js"; describe("Mask: 'N'", function () { - it("should format '1984-02-7' as '2'", function (done) { + it("should format '1984-02-7' as '2'", () => { var date = new Date("1984-02-7"); var d = dateFormat(date, "N"); strictEqual(d, "2"); - done(); }); - it("should format '2013-01-17' as '4'", function (done) { + it("should format '2013-01-17' as '4'", () => { var date = new Date("2013-01-17"); var d = dateFormat(date, "N"); strictEqual(d, "4"); - done(); }); - it("should format '2034-11-24' as '5'", function (done) { + it("should format '2034-11-24' as '5'", () => { var d = dateFormat("2034-11-24", "N"); strictEqual(d, "5"); - done(); }); - it("should format '2002-02-3' as '7'", function (done) { + it("should format '2002-02-3' as '7'", () => { var d = dateFormat("2002-02-3", "N"); strictEqual(d, "7"); - done(); }); - it("should format '2002-02-4' as '1'", function (done) { + it("should format '2002-02-4' as '1'", () => { var d = dateFormat("2002-02-4", "N"); strictEqual(d, "1"); - done(); }); }); diff --git a/test/test_mask-o.js b/test/test_mask-o.js index 2ffd871..c0afd52 100644 --- a/test/test_mask-o.js +++ b/test/test_mask-o.js @@ -1,11 +1,11 @@ +import { describe, it } from "node:test"; import { ok } from "node:assert"; import dateFormat from "../lib/dateformat.js"; describe("Mask: 'o'", function () { - it("should get timezone for any date as something like [+-]XXXX", function (done) { + it("should get timezone for any date as something like [+-]XXXX", () => { var date = new Date(); var d = dateFormat(date, "o"); ok(d.match(/^[+-]\d{4}$/), d); - done(); }); }); diff --git a/test/test_mask-p.js b/test/test_mask-p.js index fe52d62..2bf4d85 100644 --- a/test/test_mask-p.js +++ b/test/test_mask-p.js @@ -1,12 +1,12 @@ +import { describe, it } from "node:test"; import { ok } from "node:assert"; import dateFormat from "../lib/dateformat.js"; describe("Mask: 'p'", function () { - it("should get timezone for any date as something like [+-]XX:XX", function (done) { + it("should get timezone for any date as something like [+-]XX:XX", () => { var date = new Date(); var d = dateFormat(date, "p"); ok(d.match(/^[+-]\d{2}:\d{2}$/), d); - done(); console.log( dateFormat(date, "isoDateTime")); }); diff --git a/test/test_mask-s.js b/test/test_mask-s.js index e7a396f..1d9db13 100644 --- a/test/test_mask-s.js +++ b/test/test_mask-s.js @@ -1,24 +1,22 @@ -import { strictEqual } from "node:assert"; +import { describe, it } from "node:test"; +import { strictEqual } from 'node:assert'; import dateFormat from "../lib/dateformat.js"; describe("Mask: 's'", function () { - it("should format '1993-10-08T10:31:40.811' as '40'", function (done) { + it("should format '1993-10-08T10:31:40.811' as '40'", () => { var date = new Date("1993-10-08T10:31:40.811"); var d = dateFormat(date, "s"); strictEqual(d, "40"); - done(); }); - it("should format '2020-10-25T01:29:02.327' as '2'", function (done) { + it("should format '2020-10-25T01:29:02.327' as '2'", () => { var date = new Date("2020-10-25T01:29:02.327"); var d = dateFormat(date, "s"); strictEqual(d, "2"); - done(); }); - it("should format '2003-07-02T01:29:00.327' as '0'", function (done) { + it("should format '2003-07-02T01:29:00.327' as '0'", () => { var d = dateFormat("2003-07-02T01:29:00.327", "s"); strictEqual(d, "0"); - done(); }); }); diff --git a/test/test_mask-s_.js b/test/test_mask-s_.js index 0c8bce1..1e85d36 100644 --- a/test/test_mask-s_.js +++ b/test/test_mask-s_.js @@ -1,30 +1,27 @@ -import { strictEqual } from "node:assert"; +import { describe, it } from "node:test"; +import { strictEqual } from 'node:assert'; import dateFormat from "../lib/dateformat.js"; describe("Mask: 'S'", function () { - it("should format '1984-02-7' as 'th'", function (done) { + it("should format '1984-02-7' as 'th'", () => { var date = new Date("1984-02-7"); var d = dateFormat(date, "S"); strictEqual(d, "th"); - done(); }); - it("should format '2013-01-3' as 'rd'", function (done) { + it("should format '2013-01-3' as 'rd'", () => { var date = new Date("2013-01-3"); var d = dateFormat(date, "S"); strictEqual(d, "rd"); - done(); }); - it("should format '2034-11-22' as 'nd'", function (done) { + it("should format '2034-11-22' as 'nd'", () => { var d = dateFormat("2034-11-22", "S"); strictEqual(d, "nd"); - done(); }); - it("should format '2002-02-1' as 'st'", function (done) { + it("should format '2002-02-1' as 'st'", () => { var d = dateFormat("2002-02-1", "S"); strictEqual(d, "st"); - done(); }); }); diff --git a/test/test_mask-ss.js b/test/test_mask-ss.js index c7d99eb..6953970 100644 --- a/test/test_mask-ss.js +++ b/test/test_mask-ss.js @@ -1,30 +1,27 @@ -import { strictEqual } from "node:assert"; +import { describe, it } from "node:test"; +import { strictEqual } from 'node:assert'; import dateFormat from "../lib/dateformat.js"; describe("Mask: 'ss'", function () { - it("should format '1876-03-22T23:08:02.429' as '02'", function (done) { + it("should format '1876-03-22T23:08:02.429' as '02'", () => { var date = new Date("1876-03-22T23:08:02.429"); var d = dateFormat(date, "ss"); strictEqual(d, "02"); - done(); }); - it("should format '2013-12-11T05:34:35.350' as '35'", function (done) { + it("should format '2013-12-11T05:34:35.350' as '35'", () => { var date = new Date("2013-12-11T05:34:35.350"); var d = dateFormat(date, "ss"); strictEqual(d, "35"); - done(); }); - it("should format '2020-08-29T00:32:00.101' as '00'", function (done) { + it("should format '2020-08-29T00:32:00.101' as '00'", () => { var d = dateFormat("2020-08-29T00:32:00.101", "ss"); strictEqual(d, "00"); - done(); }); - it("should format '2020-09-22T07:04:09.358' as '09'", function (done) { + it("should format '2020-09-22T07:04:09.358' as '09'", () => { var d = dateFormat("2020-09-22T07:04:09.358", "ss"); strictEqual(d, "09"); - done(); }); }); diff --git a/test/test_mask-t.js b/test/test_mask-t.js index beb5d65..cad540a 100644 --- a/test/test_mask-t.js +++ b/test/test_mask-t.js @@ -1,30 +1,27 @@ -import { strictEqual } from "node:assert"; +import { describe, it } from "node:test"; +import { strictEqual } from 'node:assert'; import dateFormat from "../lib/dateformat.js"; describe("Mask: 't'", function () { - it("should format '1876-03-22T23:08:02.429' as 'p'", function (done) { + it("should format '1876-03-22T23:08:02.429' as 'p'", () => { var date = new Date("1876-03-22T23:08:02.429"); var d = dateFormat(date, "t"); strictEqual(d, "p"); - done(); }); - it("should format '2013-12-11T05:34:35.350' as 'a'", function (done) { + it("should format '2013-12-11T05:34:35.350' as 'a'", () => { var date = new Date("2013-12-11T05:34:35.350"); var d = dateFormat(date, "t"); strictEqual(d, "a"); - done(); }); - it("should format '2020-08-29T00:32:00.101' as 'a'", function (done) { + it("should format '2020-08-29T00:32:00.101' as 'a'", () => { var d = dateFormat("2020-08-29T00:32:00.101", "t"); strictEqual(d, "a"); - done(); }); - it("should format '2020-09-22T23:04:09.358' as 'p'", function (done) { + it("should format '2020-09-22T23:04:09.358' as 'p'", () => { var d = dateFormat("2020-09-22T23:04:09.358", "t"); strictEqual(d, "p"); - done(); }); }); diff --git a/test/test_mask-t_.js b/test/test_mask-t_.js index 13338ef..7eb4104 100644 --- a/test/test_mask-t_.js +++ b/test/test_mask-t_.js @@ -1,30 +1,27 @@ -import { strictEqual } from "node:assert"; +import { describe, it } from "node:test"; +import { strictEqual } from 'node:assert'; import dateFormat from "../lib/dateformat.js"; describe("Mask: 'T'", function () { - it("should format '1654-04-11T08:47:34.086' as 'A'", function (done) { + it("should format '1654-04-11T08:47:34.086' as 'A'", () => { var date = new Date("1654-04-11T08:47:34.086"); var d = dateFormat(date, "T"); strictEqual(d, "A"); - done(); }); - it("should format '2001-02-06T15:10:43.798' as 'P'", function (done) { + it("should format '2001-02-06T15:10:43.798' as 'P'", () => { var date = new Date("2001-02-06T15:10:43.798"); var d = dateFormat(date, "T"); strictEqual(d, "P"); - done(); }); - it("should format '1998-12-01T12:43:14.920' as 'A'", function (done) { + it("should format '1998-12-01T12:43:14.920' as 'A'", () => { var d = dateFormat("2020-08-29T00:32:00.101", "T"); strictEqual(d, "A"); - done(); }); - it("should format '2020-10-01T17:20:03.223' as 'p'", function (done) { + it("should format '2020-10-01T17:20:03.223' as 'p'", () => { var d = dateFormat("2020-10-01T17:20:03.223", "T"); strictEqual(d, "P"); - done(); }); }); diff --git a/test/test_mask-t_t_.js b/test/test_mask-t_t_.js index 2046bac..803adce 100644 --- a/test/test_mask-t_t_.js +++ b/test/test_mask-t_t_.js @@ -1,30 +1,27 @@ -import { strictEqual } from "node:assert"; +import { describe, it } from "node:test"; +import { strictEqual } from 'node:assert'; import dateFormat from "../lib/dateformat.js"; describe("Mask: 'TT'", function () { - it("should format '1876-04-23T07:35:20.830' as 'AM'", function (done) { + it("should format '1876-04-23T07:35:20.830' as 'AM'", () => { var date = new Date("1876-04-23T07:35:20.830"); var d = dateFormat(date, "TT"); strictEqual(d, "AM"); - done(); }); - it("should format '2018-04-27T18:50:35.567' as 'PM'", function (done) { + it("should format '2018-04-27T18:50:35.567' as 'PM'", () => { var date = new Date("2018-04-27T18:50:35.567"); var d = dateFormat(date, "TT"); strictEqual(d, "PM"); - done(); }); - it("should format '2032-05-07T06:45:41.382' as 'AM'", function (done) { + it("should format '2032-05-07T06:45:41.382' as 'AM'", () => { var d = dateFormat("2032-05-07T06:45:41.382", "TT"); strictEqual(d, "AM"); - done(); }); - it("should format '1976-11-25T19:44:08.918' as 'PM'", function (done) { + it("should format '1976-11-25T19:44:08.918' as 'PM'", () => { var d = dateFormat("1976-11-25T19:44:08.918", "TT"); strictEqual(d, "PM"); - done(); }); }); diff --git a/test/test_mask-tt.js b/test/test_mask-tt.js index 6393271..9821639 100644 --- a/test/test_mask-tt.js +++ b/test/test_mask-tt.js @@ -1,30 +1,27 @@ -import { strictEqual } from "node:assert"; +import { describe, it } from "node:test"; +import { strictEqual } from 'node:assert'; import dateFormat from "../lib/dateformat.js"; describe("Mask: 'tt'", function () { - it("should format '1876-03-22T23:08:02.429' as 'pm'", function (done) { + it("should format '1876-03-22T23:08:02.429' as 'pm'", () => { var date = new Date("1876-03-22T23:08:02.429"); var d = dateFormat(date, "tt"); strictEqual(d, "pm"); - done(); }); - it("should format '2013-12-11T05:34:35.350' as 'am'", function (done) { + it("should format '2013-12-11T05:34:35.350' as 'am'", () => { var date = new Date("2013-12-11T05:34:35.350"); var d = dateFormat(date, "tt"); strictEqual(d, "am"); - done(); }); - it("should format '2020-08-29T00:32:00.101' as 'am'", function (done) { + it("should format '2020-08-29T00:32:00.101' as 'am'", () => { var d = dateFormat("2020-08-29T00:32:00.101", "tt"); strictEqual(d, "am"); - done(); }); - it("should format '2020-09-22T23:04:09.358' as 'pm'", function (done) { + it("should format '2020-09-22T23:04:09.358' as 'pm'", () => { var d = dateFormat("2020-09-22T23:04:09.358", "tt"); strictEqual(d, "pm"); - done(); }); }); diff --git a/test/test_mask-w_.js b/test/test_mask-w_.js index 0ccb261..2fc97ea 100644 --- a/test/test_mask-w_.js +++ b/test/test_mask-w_.js @@ -1,30 +1,27 @@ -import { strictEqual } from "node:assert"; +import { describe, it } from "node:test"; +import { strictEqual } from 'node:assert'; import dateFormat from "../lib/dateformat.js"; describe("Mask: 'W'", function () { - it("should format '1876-03-22' as '12'", function (done) { + it("should format '1876-03-22' as '12'", () => { var date = new Date("1876-03-22"); var d = dateFormat(date, "W"); strictEqual(d, "12"); - done(); }); - it("should format '2013-12-11' as '50'", function (done) { + it("should format '2013-12-11' as '50'", () => { var date = new Date("2013-12-11"); var d = dateFormat(date, "W"); strictEqual(d, "50"); - done(); }); - it("should format '2020-08-29' as '35'", function (done) { + it("should format '2020-08-29' as '35'", () => { var d = dateFormat("2020-08-29", "W"); strictEqual(d, "35"); - done(); }); - it("should format '2020-09-22' as '39'", function (done) { + it("should format '2020-09-22' as '39'", () => { var d = dateFormat("2020-09-22", "W"); strictEqual(d, "39"); - done(); }); }); diff --git a/test/test_mask-ww_.js b/test/test_mask-ww_.js index 9c4c562..64249ed 100644 --- a/test/test_mask-ww_.js +++ b/test/test_mask-ww_.js @@ -1,30 +1,27 @@ -import { strictEqual } from "node:assert"; +import { describe, it } from "node:test"; +import { strictEqual } from 'node:assert'; import dateFormat from "../lib/dateformat.js"; describe("Mask: 'WW'", function () { - it("should format '1876-01-12' as '02'", function (done) { + it("should format '1876-01-12' as '02'", () => { var date = new Date("1876-01-12"); var d = dateFormat(date, "WW"); strictEqual(d, "02"); - done(); }); - it("should format '2013-12-11' as '50'", function (done) { + it("should format '2013-12-11' as '50'", () => { var date = new Date("2013-12-11"); var d = dateFormat(date, "WW"); strictEqual(d, "50"); - done(); }); - it("should format '2020-03-04' as '10'", function (done) { + it("should format '2020-03-04' as '10'", () => { var d = dateFormat("2020-03-04", "WW"); strictEqual(d, "10"); - done(); }); - it("should format '2020-02-01' as '05'", function (done) { + it("should format '2020-02-01' as '05'", () => { var d = dateFormat("2020-02-01", "WW"); strictEqual(d, "05"); - done(); }); }); diff --git a/test/test_mask-yy.js b/test/test_mask-yy.js index 7d27ff9..f2b32f3 100644 --- a/test/test_mask-yy.js +++ b/test/test_mask-yy.js @@ -1,32 +1,29 @@ -import { strictEqual } from "node:assert"; +import { describe, it } from "node:test"; +import { strictEqual } from 'node:assert'; import dateFormat from "../lib/dateformat.js"; describe("Mask: 'yy'", function () { - it("should format '1789-11-12' as '89'", function (done) { + it("should format '1789-11-12' as '89'", () => { var date = new Date("1789-11-12"); var d = dateFormat(date, "yy"); strictEqual(d, "89"); - done(); }); - it("should format '2089-10-2' as '89'", function (done) { + it("should format '2089-10-2' as '89'", () => { var date = new Date("2089-10-2"); var d = dateFormat(date, "yy"); strictEqual(d, "89"); - done(); }); - it("should format '2000-02-7' as '00'", function (done) { + it("should format '2000-02-7' as '00'", () => { var date = new Date("2000-02-7"); var d = dateFormat(date, "yy"); strictEqual(d, "00"); - done(); }); - it("should format '1999-11-27' as '99'", function (done) { + it("should format '1999-11-27' as '99'", () => { var date = new Date("1999-11-27"); var d = dateFormat(date, "yy"); strictEqual(d, "99"); - done(); }); }); diff --git a/test/test_mask-yyyy.js b/test/test_mask-yyyy.js index a02b65c..bc4924d 100644 --- a/test/test_mask-yyyy.js +++ b/test/test_mask-yyyy.js @@ -1,39 +1,35 @@ -import { strictEqual } from "node:assert"; +import { describe, it } from "node:test"; +import { strictEqual } from 'node:assert'; import dateFormat from "../lib/dateformat.js"; describe("Mask: 'yyyy'", function () { - it("should format '1992-10-6' as '1992'", function (done) { + it("should format '1992-10-6' as '1992'", () => { var date = new Date("1992-10-6"); var d = dateFormat(date, "yyyy"); strictEqual(d, "1992"); - done(); }); - it("should format '2078-02-11' as '2078'", function (done) { + it("should format '2078-02-11' as '2078'", () => { var date = new Date("2078-02-11"); var d = dateFormat(date, "yyyy"); strictEqual(d, "2078"); - done(); }); - it("should format '1763-12-02' as '1763'", function (done) { + it("should format '1763-12-02' as '1763'", () => { var date = new Date("1763-12-02"); var d = dateFormat(date, "yyyy"); strictEqual(d, "1763"); - done(); }); - it("should format '0999-01-01' as '0999'", function (done) { + it("should format '0999-01-01' as '0999'", () => { var date = new Date("0999-01-01"); var d = dateFormat(date, "yyyy"); strictEqual(d, "0999"); - done(); }); - it("should format '0002-12-11' as '0002'", function (done) { + it("should format '0002-12-11' as '0002'", () => { var date = new Date("0002-12-11"); var d = dateFormat(date, "yyyy"); strictEqual(d, "0002"); - done(); }); }); diff --git a/test/test_mask-z_.js b/test/test_mask-z_.js index ea63700..e65a5fc 100644 --- a/test/test_mask-z_.js +++ b/test/test_mask-z_.js @@ -1,47 +1,41 @@ -import { strictEqual } from "node:assert"; +import { describe, it } from "node:test"; +import { strictEqual } from 'node:assert'; import { formatTimezone } from "../lib/dateformat.js"; describe("Mask: 'Z'", function () { - it("should format 'Tue Sep 08 2020 13:26:11 GMT-0500 (Central Daylight Time)' as 'CDT'", function (done) { + it("should format 'Tue Sep 08 2020 13:26:11 GMT-0500 (Central Daylight Time)' as 'CDT'", () => { var d = formatTimezone("Tue Sep 08 2020 13:26:11 GMT-0500 (Central Daylight Time)"); strictEqual(d, "CDT"); - done(); }); - it("should format 'Tue Sep 08 2020 12:26:11 GMT-0600 (Mountain Daylight Time)' as 'MDT'", function (done) { + it("should format 'Tue Sep 08 2020 12:26:11 GMT-0600 (Mountain Daylight Time)' as 'MDT'", () => { var d = formatTimezone("Tue Sep 08 2020 12:26:11 GMT-0600 (Mountain Daylight Time)"); strictEqual(d, "MDT"); - done(); }); - it("should format 'Wed Sep 09 2020 04:28:21 GMT+1000 (Australian Eastern Standard Time)' as 'AEST'", function (done) { + it("should format 'Wed Sep 09 2020 04:28:21 GMT+1000 (Australian Eastern Standard Time)' as 'AEST'", () => { var d = formatTimezone("Wed Sep 09 2020 04:28:21 GMT+1000 (Australian Eastern Standard Time)"); strictEqual(d, "AEST"); - done(); }); - it("should format 'Wed Sep 09 2020 03:56:05 GMT+0930 (Australian Central Standard Time)' as 'ACST'", function (done) { + it("should format 'Wed Sep 09 2020 03:56:05 GMT+0930 (Australian Central Standard Time)' as 'ACST'", () => { var d = formatTimezone("Wed Sep 09 2020 03:56:05 GMT+0930 (Australian Central Standard Time)"); strictEqual(d, "ACST"); - done(); }); - it("should format 'Tue Feb 02 2021 09:51:33 GMT+1030 (Australian Central Daylight Time)' as 'ACDT'", function (done) { + it("should format 'Tue Feb 02 2021 09:51:33 GMT+1030 (Australian Central Daylight Time)' as 'ACDT'", () => { var d = formatTimezone("Tue Feb 02 2021 09:51:33 GMT+1030 (Australian Central Daylight Time)"); strictEqual(d, "ACDT"); - done(); }); /* Since CEST is not currently supported abbreviation we fall back to GMT+xxxx */ - it("should format 'Tue Feb 02 2021 00:21:33 GMT+0100 (Central European Standard Time)' as 'GMT+0100' (fallback)", function (done) { + it("should format 'Tue Feb 02 2021 00:21:33 GMT+0100 (Central European Standard Time)' as 'GMT+0100' (fallback)", () => { var d = formatTimezone("Tue Feb 02 2021 00:21:33 GMT+0100 (Central European Standard Time)"); strictEqual(d, "GMT+0100"); - done(); }); - it("should format 'Tue Sep 08 2020 20:26:22 GMT+0200 (Central European Summer Time)' as 'GMT+0200' (fallback)", function (done) { + it("should format 'Tue Sep 08 2020 20:26:22 GMT+0200 (Central European Summer Time)' as 'GMT+0200' (fallback)", () => { var d = formatTimezone("Tue Sep 08 2020 20:26:22 GMT+0200 (Central European Summer Time)"); strictEqual(d, "GMT+0200"); - done(); }); }); diff --git a/test/test_quotes.js b/test/test_quotes.js index 527e682..54bc3f8 100644 --- a/test/test_quotes.js +++ b/test/test_quotes.js @@ -1,3 +1,4 @@ +import { describe, it } from "node:test"; import { strictEqual } from 'node:assert'; import dateFormat from './../lib/dateformat.js'; diff --git a/test/test_threedays.js b/test/test_threedays.js index 066d894..e972c6c 100644 --- a/test/test_threedays.js +++ b/test/test_threedays.js @@ -1,3 +1,4 @@ +import { describe, it, beforeEach } from "node:test"; import { strictEqual,notStrictEqual } from 'node:assert'; import dateFormat from './../lib/dateformat.js'; @@ -11,78 +12,66 @@ describe('threeDays', function () { beforeEach(function () { date = new Date(); }); - it('should return "Yesterday" (Today - 1 day)', function (done) { + it('should return "Yesterday" (Today - 1 day)', () => { date.setDate(date.getDate() - 1); DDDD = dateFormat(date, 'DDDD'); strictEqual(DDDD, "Yesterday"); - done(); }); - it('should return "Ysd" (Today - 1 day)', function (done) { + it('should return "Ysd" (Today - 1 day)', () => { date.setDate(date.getDate() - 1); DDD = dateFormat(date, 'DDD'); strictEqual(DDD, "Ysd"); - done(); }); - it('should return "Today" (Today)', function (done) { + it('should return "Today" (Today)', () => { DDDD = dateFormat(date, 'DDDD'); strictEqual(DDDD, "Today"); - done(); }); - it('should return "Tdy" (Today)', function (done) { + it('should return "Tdy" (Today)', () => { DDD = dateFormat(date, 'DDD'); strictEqual(DDD, "Tdy"); - done(); }); - it('should return "Tomorrow" (Today + 1 day)', function (done) { + it('should return "Tomorrow" (Today + 1 day)', () => { date.setDate(date.getDate() + 1); DDDD = dateFormat(date, 'DDDD'); strictEqual(DDDD, "Tomorrow"); - done(); }); - it('should return "Tmw" (Today + 1 day)', function (done) { + it('should return "Tmw" (Today + 1 day)', () => { date.setDate(date.getDate() + 1); DDD = dateFormat(date, 'DDD'); strictEqual(DDD, "Tmw"); - done(); }); - it('should not return "Yesterday", "Today", "Tomorrow", "Ysd", "Tdy", or "Tmw" (Today - 2 days)', function (done) { + it('should not return "Yesterday", "Today", "Tomorrow", "Ysd", "Tdy", or "Tmw" (Today - 2 days)', () => { date.setDate(date.getDate() - 2); DDD = dateFormat(date, 'DDD'); DDDD = dateFormat(date, 'DDDD'); strictEqual(threeDays.indexOf(DDD), -1); strictEqual(threeDays.indexOf(DDDD), -1); - done(); }); - it('should not return "Yesterday", "Today" or "Tomorrow", "Ysd", "Tdy", or "Tmw" (Today + 2 days)', function (done) { + it('should not return "Yesterday", "Today" or "Tomorrow", "Ysd", "Tdy", or "Tmw" (Today + 2 days)', () => { date.setDate(date.getDate() + 2); DDD = dateFormat(date, 'DDD'); DDDD = dateFormat(date, 'DDDD'); strictEqual(threeDays.indexOf(DDD), -1); strictEqual(threeDays.indexOf(DDDD), -1); - done(); }); - it('should return short day name (Today - 2 days)', function (done) { + it('should return short day name (Today - 2 days)', () => { date.setDate(date.getDate() - 2); DDD = dateFormat(date, 'DDD'); notStrictEqual(dayNamesShort.indexOf(DDD), -1); - done(); }); - it('should return short day name (Today + 2 days)', function (done) { + it('should return short day name (Today + 2 days)', () => { date.setDate(date.getDate() + 2); DDD = dateFormat(date, 'DDD'); notStrictEqual(dayNamesShort.indexOf(DDD), -1); - done(); }); - it('should return long day name (Today - 2 days)', function (done) { + it('should return long day name (Today - 2 days)', () => { date.setDate(date.getDate() - 2); DDDD = dateFormat(date, 'DDDD'); notStrictEqual(dayNamesLong.indexOf(DDDD), -1); - done(); }); - it('should return short day name (Today + 2 days)', function (done) { + it('should return short day name (Today + 2 days)', () => { date.setDate(date.getDate() + 2); DDDD = dateFormat(date, 'DDDD'); notStrictEqual(dayNamesLong.indexOf(DDDD), -1); - done(); }); }); diff --git a/test/weekofyear/test_weekofyear.js b/test/weekofyear/test_weekofyear.js index e045d7c..393a04e 100644 --- a/test/weekofyear/test_weekofyear.js +++ b/test/weekofyear/test_weekofyear.js @@ -1,4 +1,4 @@ -import dateFormat from '../lib/dateformat.js'; +import dateFormat from '../../lib/dateformat.js'; var val = process.argv[2] || new Date(); console.log(dateFormat(val, 'W')); From 2537253736e9ece40a8f3e95a1b2194a3c4b83e1 Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Thu, 31 Jul 2025 12:08:27 +0200 Subject: [PATCH 02/29] cache more --- benchmark/benchmark.js | 3 ++- src/dateformat.js | 44 +++++++++++++++++++++++++++++------------- 2 files changed, 33 insertions(+), 14 deletions(-) diff --git a/benchmark/benchmark.js b/benchmark/benchmark.js index 2ef469c..657e54c 100644 --- a/benchmark/benchmark.js +++ b/benchmark/benchmark.js @@ -15,8 +15,9 @@ const masks = [ const bench = new Bench({ name: 'simple benchmark', time: 100 }) masks.forEach((mask) => { + const date = new Date(); bench.add(mask, () => { - dateFormat(new Date(), mask); + dateFormat(date, mask); }); }); diff --git a/src/dateformat.js b/src/dateformat.js index 8b742f8..58ff480 100644 --- a/src/dateformat.js +++ b/src/dateformat.js @@ -23,7 +23,7 @@ const timezoneClip = /[^-+\dA-Z]/g; * @param {boolean} utc * @param {boolean} gmt */ -export default function dateFormat (date, mask, utc, gmt) { +export default function dateFormat(date, mask, utc, gmt) { // You can't provide utc if you skip other args (use the 'UTC:' mask prefix) if ( arguments.length === 1 && @@ -139,10 +139,10 @@ export default function dateFormat (date, mask, utc, gmt) { pad(Math.floor(Math.abs(o()) % 60), 2), S: () => ["th", "st", "nd", "rd"][ - d() % 10 > 3 ? 0 : (((d() % 100) - (d() % 10) != 10) * d()) % 10 + d() % 10 > 3 ? 0 : (((d() % 100) - (d() % 10) != 10) * d()) % 10 ], W: () => W(), - WW: () => pad( W() ), + WW: () => pad(W()), N: () => N(), }; @@ -254,6 +254,18 @@ const getDayName = ({ y, m, d, _, dayName, short = false }) => { return dayName; }; +/** + * @type {Map} + */ +const firstThursdays = new Map(); + +/** + * @type {(0|1|2|3|4|5|6)[]} + */ +const firstDaysOfWeekLookup = [1, 7, 6, 5, 4, 3, 2]; + +const thursdaySameWeekLookup = [6, 0, 1, 2, 3, 4, 5]; + /** * Get the ISO 8601 week number * Based on comments from @@ -263,25 +275,31 @@ const getDayName = ({ y, m, d, _, dayName, short = false }) => { * @return {Number} */ const getWeek = (date) => { + const Y = date.getFullYear(); + const m = date.getMonth(); + const d = date.getDate(); + // Remove time components of date const targetThursday = new Date( - date.getFullYear(), - date.getMonth(), - date.getDate() + Y, + m, + d ); // Change date to Thursday same week targetThursday.setDate( - targetThursday.getDate() - ((targetThursday.getDay() + 6) % 7) + 3 + targetThursday.getDate() - thursdaySameWeekLookup[targetThursday.getDay()] + 3 ); - // Take January 4th as it is always in week 1 (see ISO 8601) - const firstThursday = new Date(targetThursday.getFullYear(), 0, 4); + let firstThursday = firstThursdays.get(Y); + if (!firstThursday) { + // Take January 4th as it is always in week 1 (see ISO 8601) + firstThursday = new Date(Y, 0, 4); - // Change date to Thursday same week - firstThursday.setDate( - firstThursday.getDate() - ((firstThursday.getDay() + 6) % 7) + 3 - ); + // Change date to Thursday same week + firstThursday.setDate(firstDaysOfWeekLookup[firstThursday.getDay()]); + firstThursdays.set(Y, firstThursday); + } // Check if daylight-saving-time-switch occurred and correct for it const ds = From efbce6747edaf677ea671110bd8ab19a018369ca Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Thu, 31 Jul 2025 12:23:06 +0200 Subject: [PATCH 03/29] blub --- src/dateformat.js | 22 +++++++++++++++------- 1 file changed, 15 insertions(+), 7 deletions(-) diff --git a/src/dateformat.js b/src/dateformat.js index 58ff480..3f63baf 100644 --- a/src/dateformat.js +++ b/src/dateformat.js @@ -1,3 +1,5 @@ +// @ts-check + /* * Date Format 1.2.3 * (c) 2007-2009 Steven Levithan @@ -218,6 +220,11 @@ export let i18n = { timeNames: ["a", "p", "am", "pm", "A", "P", "AM", "PM"], }; +/** + * @param {number} val + * @param {2|4} len + * @returns {string} + */ const pad = (val, len = 2) => String(val).padStart(len, '0'); /** @@ -260,10 +267,13 @@ const getDayName = ({ y, m, d, _, dayName, short = false }) => { const firstThursdays = new Map(); /** - * @type {(0|1|2|3|4|5|6)[]} + * @type {(1|2|3|4|5|6|7)[]} */ const firstDaysOfWeekLookup = [1, 7, 6, 5, 4, 3, 2]; +/** + * @type {(0|1|2|3|4|5|6)[]} + */ const thursdaySameWeekLookup = [6, 0, 1, 2, 3, 4, 5]; /** @@ -288,7 +298,7 @@ const getWeek = (date) => { // Change date to Thursday same week targetThursday.setDate( - targetThursday.getDate() - thursdaySameWeekLookup[targetThursday.getDay()] + 3 + d - thursdaySameWeekLookup[targetThursday.getDay()] + 3 ); let firstThursday = firstThursdays.get(Y); @@ -311,6 +321,8 @@ const getWeek = (date) => { return 1 + Math.floor(weekDiff); }; +const dayOfWeekLookup = [7, 1, 2, 3, 4, 5, 6]; + /** * Get ISO-8601 numeric representation of the day of the week * 1 (for Monday) through 7 (for Sunday) @@ -319,11 +331,7 @@ const getWeek = (date) => { * @return {Number} */ const getDayOfWeek = (date) => { - let dow = date.getDay(); - if (dow === 0) { - dow = 7; - } - return dow; + return dayOfWeekLookup[date.getDay()]; }; /** From f0abfc78d8622817983bc45f0b6153cd155ddeef Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Thu, 31 Jul 2025 12:26:26 +0200 Subject: [PATCH 04/29] use lookup etc. --- src/dateformat.js | 47 ++++++++++++++++++++++------------------------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/src/dateformat.js b/src/dateformat.js index 3f63baf..3bbbc0b 100644 --- a/src/dateformat.js +++ b/src/dateformat.js @@ -74,8 +74,8 @@ export default function dateFormat(date, mask, utc, gmt) { const N = () => getDayOfWeek(date); const flags = { - d: () => d(), - dd: () => pad(d()), + d: d, + dd: () => PAD_2[d()], ddd: () => i18n.dayNames[D()], DDD: () => getDayName({ y: y(), @@ -94,21 +94,21 @@ export default function dateFormat(date, mask, utc, gmt) { dayName: i18n.dayNames[D() + 7] }), m: () => m() + 1, - mm: () => pad(m() + 1), + mm: () => PAD_2[m() + 1], mmm: () => i18n.monthNames[m()], mmmm: () => i18n.monthNames[m() + 12], yy: () => String(y()).slice(2), - yyyy: () => pad(y(), 4), + yyyy: () => PAD_4[y()], h: () => H() % 12 || 12, - hh: () => pad(H() % 12 || 12), - H: () => H(), - HH: () => pad(H()), - M: () => M(), - MM: () => pad(M()), - s: () => s(), - ss: () => pad(s()), - l: () => pad(L(), 3), - L: () => pad(Math.floor(L() / 10)), + hh: () => PAD_2[(H() % 12 || 12)], + H: H, + HH: () => PAD_2[H()], + M: M, + MM: () => PAD_2[M()], + s: s, + ss: () => PAD_2[s()], + l: () => PAD_3[L()], + L: () => PAD_2[Math.floor(L() / 10)], t: () => H() < 12 ? i18n.timeNames[0] @@ -133,19 +133,19 @@ export default function dateFormat(date, mask, utc, gmt) { : formatTimezone(date), o: () => (o() > 0 ? "-" : "+") + - pad(Math.floor(Math.abs(o()) / 60) * 100 + (Math.abs(o()) % 60), 4), + PAD_4[Math.floor(Math.abs(o()) / 60) * 100 + (Math.abs(o()) % 60)], p: () => (o() > 0 ? "-" : "+") + - pad(Math.floor(Math.abs(o()) / 60), 2) + + PAD_2[Math.floor(Math.abs(o()) / 60)] + ":" + - pad(Math.floor(Math.abs(o()) % 60), 2), + PAD_2[Math.floor(Math.abs(o()) % 60)], S: () => ["th", "st", "nd", "rd"][ d() % 10 > 3 ? 0 : (((d() % 100) - (d() % 10) != 10) * d()) % 10 ], - W: () => W(), - WW: () => pad(W()), - N: () => N(), + W: W, + WW: () => PAD_2[W()], + N: N, }; return mask.replace(token, (match) => { @@ -220,12 +220,9 @@ export let i18n = { timeNames: ["a", "p", "am", "pm", "A", "P", "AM", "PM"], }; -/** - * @param {number} val - * @param {2|4} len - * @returns {string} - */ -const pad = (val, len = 2) => String(val).padStart(len, '0'); +const PAD_2 = new Array(1e2).fill(0).map((_, i) => String(i).padStart(2, '0')); +const PAD_3 = new Array(1e3).fill(0).map((_, i) => String(i).padStart(3, '0')); +const PAD_4 = new Array(1e4).fill(0).map((_, i) => String(i).padStart(4, '0')); /** * Get day name From 3582b64643bbecba7eed6a4a7f45e65105fc8775 Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Thu, 31 Jul 2025 12:32:38 +0200 Subject: [PATCH 05/29] avoid calculation --- src/dateformat.js | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/src/dateformat.js b/src/dateformat.js index 3bbbc0b..a6872b7 100644 --- a/src/dateformat.js +++ b/src/dateformat.js @@ -76,27 +76,27 @@ export default function dateFormat(date, mask, utc, gmt) { const flags = { d: d, dd: () => PAD_2[d()], - ddd: () => i18n.dayNames[D()], + ddd: () => i18n.dayNamesShort[D()], DDD: () => getDayName({ y: y(), m: m(), d: d(), _: _(), - dayName: i18n.dayNames[D()], + dayName: i18n.dayNamesShort[D()], short: true }), - dddd: () => i18n.dayNames[D() + 7], + dddd: () => i18n.dayNamesLong[D()], DDDD: () => getDayName({ y: y(), m: m(), d: d(), _: _(), - dayName: i18n.dayNames[D() + 7] + dayName: i18n.dayNamesLong[D()] }), m: () => m() + 1, mm: () => PAD_2[m() + 1], - mmm: () => i18n.monthNames[m()], - mmmm: () => i18n.monthNames[m() + 12], + mmm: () => i18n.monthNamesShort[m()], + mmmm: () => i18n.monthNamesLong[m()], yy: () => String(y()).slice(2), yyyy: () => PAD_4[y()], h: () => H() % 12 || 12, @@ -175,7 +175,7 @@ export let masks = { // Internationalization strings export let i18n = { - dayNames: [ + dayNamesShort: [ "Sun", "Mon", "Tue", @@ -183,6 +183,8 @@ export let i18n = { "Thu", "Fri", "Sat", + ], + dayNamesLong: [ "Sunday", "Monday", "Tuesday", @@ -191,7 +193,7 @@ export let i18n = { "Friday", "Saturday", ], - monthNames: [ + monthNamesShort: [ "Jan", "Feb", "Mar", @@ -204,6 +206,8 @@ export let i18n = { "Oct", "Nov", "Dec", + ], + monthNamesLong: [ "January", "February", "March", From 483b70bb9e1ba4c2bc49f32de5ddeadc64edfb55 Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Thu, 31 Jul 2025 14:28:50 +0200 Subject: [PATCH 06/29] reduce string stuff --- src/dateformat.js | 91 +++++++++++++++++++++++++++++++---------------- 1 file changed, 61 insertions(+), 30 deletions(-) diff --git a/src/dateformat.js b/src/dateformat.js index a6872b7..921499b 100644 --- a/src/dateformat.js +++ b/src/dateformat.js @@ -19,6 +19,30 @@ const token = /d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^ const timezone = /\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g; const timezoneClip = /[^-+\dA-Z]/g; +const UTC_FNS = { + getDate: Date.prototype.getUTCDate.call.bind(Date.prototype.getUTCDate), + getDay: Date.prototype.getUTCDay.call.bind(Date.prototype.getUTCDay), + getMonth: Date.prototype.getUTCMonth.call.bind(Date.prototype.getUTCMonth), + getFullYear: Date.prototype.getUTCFullYear.call.bind(Date.prototype.getUTCFullYear), + getHours: Date.prototype.getUTCHours.call.bind(Date.prototype.getUTCHours), + getMinutes: Date.prototype.getUTCMinutes.call.bind(Date.prototype.getUTCMinutes), + getSeconds: Date.prototype.getUTCSeconds.call.bind(Date.prototype.getUTCSeconds), + getMilliseconds: Date.prototype.getUTCMilliseconds.call.bind(Date.prototype.getUTCMilliseconds), + getTimezoneOffset: () => 0, // UTC does not have a timezone offset +} + +const GMT_FNS = { + getDate: Date.prototype.getDate.call.bind(Date.prototype.getDate), + getDay: Date.prototype.getDay.call.bind(Date.prototype.getDay), + getMonth: Date.prototype.getMonth.call.bind(Date.prototype.getMonth), + getFullYear: Date.prototype.getFullYear.call.bind(Date.prototype.getFullYear), + getHours: Date.prototype.getHours.call.bind(Date.prototype.getHours), + getMinutes: Date.prototype.getMinutes.call.bind(Date.prototype.getMinutes), + getSeconds: Date.prototype.getSeconds.call.bind(Date.prototype.getSeconds), + getMilliseconds: Date.prototype.getUTCMilliseconds.call.bind(Date.prototype.getUTCMilliseconds), + getTimezoneOffset: Date.prototype.getTimezoneOffset.call.bind(Date.prototype.getTimezoneOffset), +} + /** * @param {string | number | Date} date * @param {string} mask @@ -46,9 +70,13 @@ export default function dateFormat(date, mask, utc, gmt) { throw TypeError("Invalid date"); } - mask = String( - masks[mask] || mask || masks["default"] - ); + if (mask) { + mask = maskNames.includes(mask) + ? masks[mask] + : mask; + } else { + mask = masks["default"]; + } // Allow setting the utc/gmt argument via the mask const maskSlice = mask.slice(0, 4); @@ -60,16 +88,16 @@ export default function dateFormat(date, mask, utc, gmt) { } } - const _ = () => (utc ? "getUTC" : "get"); - const d = () => date[_() + "Date"](); - const D = () => date[_() + "Day"](); - const m = () => date[_() + "Month"](); - const y = () => date[_() + "FullYear"](); - const H = () => date[_() + "Hours"](); - const M = () => date[_() + "Minutes"](); - const s = () => date[_() + "Seconds"](); - const L = () => date[_() + "Milliseconds"](); - const o = () => (utc ? 0 : date.getTimezoneOffset()); + const _ = utc ? UTC_FNS : GMT_FNS; + const d = () => _.getDate(date); + const D = () => _.getDay(date); + const m = () => _.getMonth(date); + const y = () => _.getFullYear(date); + const H = () => _.getHours(date); + const M = () => _.getMinutes(date); + const s = () => _.getSeconds(date); + const L = () => _.getMilliseconds(date); + const o = () => _.getTimezoneOffset(date); const W = () => getWeek(date); const N = () => getDayOfWeek(date); @@ -81,7 +109,7 @@ export default function dateFormat(date, mask, utc, gmt) { y: y(), m: m(), d: d(), - _: _(), + _: _, dayName: i18n.dayNamesShort[D()], short: true }), @@ -90,7 +118,7 @@ export default function dateFormat(date, mask, utc, gmt) { y: y(), m: m(), d: d(), - _: _(), + _: _, dayName: i18n.dayNamesLong[D()] }), m: () => m() + 1, @@ -156,7 +184,9 @@ export default function dateFormat(date, mask, utc, gmt) { }); } -export let masks = { +const maskNames = /** @type {const} */(['default', 'shortDate', 'paddedShortDate', 'mediumDate', 'longDate', 'fullDate', 'shortTime', 'mediumTime', 'longTime', 'isoDate', 'isoTime', 'isoDateTime', 'isoUtcDateTime', 'expiresHeaderFormat']); + +export const masks = /** @type {Record} */ ({ default: "ddd mmm dd yyyy HH:MM:ss", shortDate: "m/d/yy", paddedShortDate: "mm/dd/yyyy", @@ -171,10 +201,11 @@ export let masks = { isoDateTime: "yyyy-mm-dd'T'HH:MM:sso", isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'", expiresHeaderFormat: "ddd, dd mmm yyyy HH:MM:ss Z", -}; +}); + // Internationalization strings -export let i18n = { +export let i18n = /** @type {const} */ ({ dayNamesShort: [ "Sun", "Mon", @@ -222,7 +253,7 @@ export let i18n = { "December", ], timeNames: ["a", "p", "am", "pm", "A", "P", "AM", "PM"], -}; +}); const PAD_2 = new Array(1e2).fill(0).map((_, i) => String(i).padStart(2, '0')); const PAD_3 = new Array(1e3).fill(0).map((_, i) => String(i).padStart(3, '0')); @@ -237,18 +268,18 @@ const PAD_4 = new Array(1e4).fill(0).map((_, i) => String(i).padStart(4, '0')); const getDayName = ({ y, m, d, _, dayName, short = false }) => { const today = new Date(); const yesterday = new Date(); - yesterday.setDate(yesterday[_ + 'Date']() - 1); + yesterday.setDate(_.getDate(yesterday) - 1); const tomorrow = new Date(); - tomorrow.setDate(tomorrow[_ + 'Date']() + 1); - const today_d = () => today[_ + 'Date'](); - const today_m = () => today[_ + 'Month'](); - const today_y = () => today[_ + 'FullYear'](); - const yesterday_d = () => yesterday[_ + 'Date'](); - const yesterday_m = () => yesterday[_ + 'Month'](); - const yesterday_y = () => yesterday[_ + 'FullYear'](); - const tomorrow_d = () => tomorrow[_ + 'Date'](); - const tomorrow_m = () => tomorrow[_ + 'Month'](); - const tomorrow_y = () => tomorrow[_ + 'FullYear'](); + tomorrow.setDate(_.getDate(tomorrow)+ 1); + const today_d = () => _.getDate(today); + const today_m = () => _.getMonth(today); + const today_y = () => _.getFullYear(today); + const yesterday_d = () => _.getDate(yesterday); + const yesterday_m = () => _.getMonth(yesterday); + const yesterday_y = () => _.getFullYear(yesterday); + const tomorrow_d = () => _.getDate(tomorrow); + const tomorrow_m = () => _.getMonth(tomorrow); + const tomorrow_y = () => _.getFullYear(tomorrow); if (today_y() === y && today_m() === m && today_d() === d) { return short ? 'Tdy' : 'Today'; From c198c7a44c5f3a637038564c03ef26e951397c05 Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Thu, 31 Jul 2025 23:06:09 +0200 Subject: [PATCH 07/29] improve S --- benchmark/benchmark.js | 1 + src/dateformat.js | 77 ++++++++++++++++++++++++++++-------------- test/test_mask-s_.js | 5 +++ 3 files changed, 57 insertions(+), 26 deletions(-) diff --git a/benchmark/benchmark.js b/benchmark/benchmark.js index 657e54c..62216cb 100644 --- a/benchmark/benchmark.js +++ b/benchmark/benchmark.js @@ -6,6 +6,7 @@ const masks = [ "W", "o", "N", + "S", "shortDate", "fullDate", "longTime", diff --git a/src/dateformat.js b/src/dateformat.js index 921499b..c0c07de 100644 --- a/src/dateformat.js +++ b/src/dateformat.js @@ -71,21 +71,33 @@ export default function dateFormat(date, mask, utc, gmt) { } if (mask) { - mask = maskNames.includes(mask) - ? masks[mask] - : mask; - } else { - mask = masks["default"]; - } - - // Allow setting the utc/gmt argument via the mask - const maskSlice = mask.slice(0, 4); - if (maskSlice === "UTC:" || maskSlice === "GMT:") { - mask = mask.slice(4); - utc = true; - if (maskSlice === "GMT:") { - gmt = true; + if (maskNames.includes(/** @type {typeof maskNames[number]} */ (mask))) { + if (mask === 'isoUtcDateTime') { + utc = true; + } + mask = masks[mask] + } else { + // Allow setting the utc/gmt argument via the mask + if (mask[3] === ":") { + if ( + mask[0] === "U" && + mask[1] === "T" && + mask[2] === "C" + ) { + utc = true; + mask = mask.slice(4); + } else if ( + mask[0] === "G" && + mask[1] === "M" && + mask[2] === "T" + ) { + gmt = true; + mask = mask.slice(4); + } + } } + } else { + mask = masks.default; } const _ = utc ? UTC_FNS : GMT_FNS; @@ -159,18 +171,19 @@ export default function dateFormat(date, mask, utc, gmt) { : utc ? "UTC" : formatTimezone(date), - o: () => - (o() > 0 ? "-" : "+") + - PAD_4[Math.floor(Math.abs(o()) / 60) * 100 + (Math.abs(o()) % 60)], - p: () => - (o() > 0 ? "-" : "+") + - PAD_2[Math.floor(Math.abs(o()) / 60)] + + o: () => { + const timezoneOffset = o(); + return (timezoneOffset > 0 ? "-" : "+") + + PAD_4[Math.floor(Math.abs(timezoneOffset) / 60) * 100 + (Math.abs(timezoneOffset) % 60)] + }, + p: () => { + const timezoneOffset = o(); + return (timezoneOffset > 0 ? "-" : "+") + + PAD_2[Math.floor(Math.abs(timezoneOffset) / 60)] + ":" + - PAD_2[Math.floor(Math.abs(o()) % 60)], - S: () => - ["th", "st", "nd", "rd"][ - d() % 10 > 3 ? 0 : (((d() % 100) - (d() % 10) != 10) * d()) % 10 - ], + PAD_2[Math.floor(Math.abs(timezoneOffset) % 60)]; + }, + S: () => { return daySuffix[d()] }, W: W, WW: () => PAD_2[W()], N: N, @@ -199,7 +212,7 @@ export const masks = /** @type {Record} */ ({ isoDate: "yyyy-mm-dd", isoTime: "HH:MM:ss", isoDateTime: "yyyy-mm-dd'T'HH:MM:sso", - isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'", + isoUtcDateTime: "yyyy-mm-dd'T'HH:MM:ss'Z'", expiresHeaderFormat: "ddd, dd mmm yyyy HH:MM:ss Z", }); @@ -255,6 +268,18 @@ export let i18n = /** @type {const} */ ({ timeNames: ["a", "p", "am", "pm", "A", "P", "AM", "PM"], }); +const daySuffix = new Array(32).fill(0).map((_, i) => { + if (i === 1 || i === 21 || i === 31) { + return "st"; + } else if (i === 2 || i === 22) { + return "nd"; + } else if (i === 3 || i === 23) { + return "rd"; + } else { + return "th"; + } +}); + const PAD_2 = new Array(1e2).fill(0).map((_, i) => String(i).padStart(2, '0')); const PAD_3 = new Array(1e3).fill(0).map((_, i) => String(i).padStart(3, '0')); const PAD_4 = new Array(1e4).fill(0).map((_, i) => String(i).padStart(4, '0')); diff --git a/test/test_mask-s_.js b/test/test_mask-s_.js index 1e85d36..8a08035 100644 --- a/test/test_mask-s_.js +++ b/test/test_mask-s_.js @@ -24,4 +24,9 @@ describe("Mask: 'S'", function () { var d = dateFormat("2002-02-1", "S"); strictEqual(d, "st"); }); + + it("should format '2002-03-31' as 'st'", () => { + var d = dateFormat("2002-03-31", "S"); + strictEqual(d, "st"); + }); }); From 59b0af5d7c00a70221b5362a0a02c0b809503dd6 Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Fri, 1 Aug 2025 00:14:50 +0200 Subject: [PATCH 08/29] DDDD and dddd --- benchmark/benchmark.js | 23 ++++++++++++++++++++ src/dateformat.js | 49 +++++++++++++++++++++++------------------- 2 files changed, 50 insertions(+), 22 deletions(-) diff --git a/benchmark/benchmark.js b/benchmark/benchmark.js index 62216cb..03ffba4 100644 --- a/benchmark/benchmark.js +++ b/benchmark/benchmark.js @@ -22,6 +22,29 @@ masks.forEach((mask) => { }); }); +{ + const date = new Date(); + bench.add("DDDD - today", () => { + dateFormat(date, "DDDD"); + }); +} + +{ + const date = new Date() + date.setDate(new Date().getDate() + 1); + bench.add("DDDD - tomorrow", () => { + dateFormat(date, "DDDD"); + }); +} + +{ + const date = new Date() + date.setDate(new Date().getDate() - 1); + bench.add("DDDD - yesterday", () => { + dateFormat(date, "DDDD"); + }); +} + await bench.run() console.log(bench.name) diff --git a/src/dateformat.js b/src/dateformat.js index c0c07de..574522a 100644 --- a/src/dateformat.js +++ b/src/dateformat.js @@ -122,7 +122,7 @@ export default function dateFormat(date, mask, utc, gmt) { m: m(), d: d(), _: _, - dayName: i18n.dayNamesShort[D()], + D: D, short: true }), dddd: () => i18n.dayNamesLong[D()], @@ -131,7 +131,8 @@ export default function dateFormat(date, mask, utc, gmt) { m: m(), d: d(), _: _, - dayName: i18n.dayNamesLong[D()] + D: D, + short: false }), m: () => m() + 1, mm: () => PAD_2[m() + 1], @@ -290,32 +291,36 @@ const PAD_4 = new Array(1e4).fill(0).map((_, i) => String(i).padStart(4, '0')); * @param {Object} * @return {String} */ -const getDayName = ({ y, m, d, _, dayName, short = false }) => { - const today = new Date(); - const yesterday = new Date(); - yesterday.setDate(_.getDate(yesterday) - 1); - const tomorrow = new Date(); - tomorrow.setDate(_.getDate(tomorrow)+ 1); - const today_d = () => _.getDate(today); - const today_m = () => _.getMonth(today); - const today_y = () => _.getFullYear(today); - const yesterday_d = () => _.getDate(yesterday); - const yesterday_m = () => _.getMonth(yesterday); - const yesterday_y = () => _.getFullYear(yesterday); - const tomorrow_d = () => _.getDate(tomorrow); - const tomorrow_m = () => _.getMonth(tomorrow); - const tomorrow_y = () => _.getFullYear(tomorrow); - - if (today_y() === y && today_m() === m && today_d() === d) { +const getDayName = ({ y, m, d, _, D, short = false }) => { + + const referenceDate = new Date(); + if ( + _.getDate(referenceDate) === d && + _.getMonth(referenceDate) === m && + _.getFullYear(referenceDate) === y + ) { return short ? 'Tdy' : 'Today'; } - else if (yesterday_y() === y && yesterday_m() === m && yesterday_d() === d) { + + referenceDate.setDate(referenceDate.getDate() - 1); + if ( + _.getDate(referenceDate) === d && + _.getMonth(referenceDate) === m && + _.getFullYear(referenceDate) === y + ) { return short ? 'Ysd' : 'Yesterday'; } - else if (tomorrow_y() === y && tomorrow_m() === m && tomorrow_d() === d) { + + referenceDate.setDate(referenceDate.getDate() + 2); + if ( + _.getDate(referenceDate) === d && + _.getMonth(referenceDate) === m && + _.getFullYear(referenceDate) === y + ) { return short ? 'Tmw' : 'Tomorrow'; } - return dayName; + + return short ? i18n.dayNamesShort[D()] : i18n.dayNamesLong[D()]; }; /** From b4e3f082ec4b3c5fd12f59f0cb3e02cb041c7c67 Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Fri, 1 Aug 2025 00:18:30 +0200 Subject: [PATCH 09/29] yy, yyyy --- benchmark/benchmark.js | 2 ++ src/dateformat.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/benchmark/benchmark.js b/benchmark/benchmark.js index 03ffba4..b68a718 100644 --- a/benchmark/benchmark.js +++ b/benchmark/benchmark.js @@ -7,6 +7,8 @@ const masks = [ "o", "N", "S", + "yy", + "yyyy", "shortDate", "fullDate", "longTime", diff --git a/src/dateformat.js b/src/dateformat.js index 574522a..4232c17 100644 --- a/src/dateformat.js +++ b/src/dateformat.js @@ -138,7 +138,7 @@ export default function dateFormat(date, mask, utc, gmt) { mm: () => PAD_2[m() + 1], mmm: () => i18n.monthNamesShort[m()], mmmm: () => i18n.monthNamesLong[m()], - yy: () => String(y()).slice(2), + yy: () => PAD_2[y() % 100], yyyy: () => PAD_4[y()], h: () => H() % 12 || 12, hh: () => PAD_2[(H() % 12 || 12)], From 23e5c91bb3a605611b8abc2d8d0d555703af9864 Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Fri, 1 Aug 2025 00:34:06 +0200 Subject: [PATCH 10/29] L --- benchmark/benchmark.js | 1 + src/dateformat.js | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/benchmark/benchmark.js b/benchmark/benchmark.js index b68a718..5783918 100644 --- a/benchmark/benchmark.js +++ b/benchmark/benchmark.js @@ -7,6 +7,7 @@ const masks = [ "o", "N", "S", + "L", "yy", "yyyy", "shortDate", diff --git a/src/dateformat.js b/src/dateformat.js index 4232c17..8abd7d8 100644 --- a/src/dateformat.js +++ b/src/dateformat.js @@ -149,7 +149,7 @@ export default function dateFormat(date, mask, utc, gmt) { s: s, ss: () => PAD_2[s()], l: () => PAD_3[L()], - L: () => PAD_2[Math.floor(L() / 10)], + L: () => MILLISECONDS_L[L()], t: () => H() < 12 ? i18n.timeNames[0] @@ -217,7 +217,6 @@ export const masks = /** @type {Record} */ ({ expiresHeaderFormat: "ddd, dd mmm yyyy HH:MM:ss Z", }); - // Internationalization strings export let i18n = /** @type {const} */ ({ dayNamesShort: [ @@ -284,6 +283,7 @@ const daySuffix = new Array(32).fill(0).map((_, i) => { const PAD_2 = new Array(1e2).fill(0).map((_, i) => String(i).padStart(2, '0')); const PAD_3 = new Array(1e3).fill(0).map((_, i) => String(i).padStart(3, '0')); const PAD_4 = new Array(1e4).fill(0).map((_, i) => String(i).padStart(4, '0')); +const MILLISECONDS_L = new Array(1e3).fill(0).map((_, i) => String(i).padStart(3, '0').slice(0, 2)); /** * Get day name From 57ad1edb7f015a1ee882b70ea571d17aa920d11d Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Fri, 1 Aug 2025 10:09:07 +0200 Subject: [PATCH 11/29] more direct strings --- benchmark/benchmark.js | 1 + src/dateformat.js | 15 +++++++++------ 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/benchmark/benchmark.js b/benchmark/benchmark.js index 5783918..aaa6098 100644 --- a/benchmark/benchmark.js +++ b/benchmark/benchmark.js @@ -6,6 +6,7 @@ const masks = [ "W", "o", "N", + "H", "S", "L", "yy", diff --git a/src/dateformat.js b/src/dateformat.js index 8abd7d8..ea13efe 100644 --- a/src/dateformat.js +++ b/src/dateformat.js @@ -114,7 +114,7 @@ export default function dateFormat(date, mask, utc, gmt) { const N = () => getDayOfWeek(date); const flags = { - d: d, + d: () => NO_PAD[d()], dd: () => PAD_2[d()], ddd: () => i18n.dayNamesShort[D()], DDD: () => getDayName({ @@ -134,19 +134,19 @@ export default function dateFormat(date, mask, utc, gmt) { D: D, short: false }), - m: () => m() + 1, + m: () => NO_PAD[m() + 1], mm: () => PAD_2[m() + 1], mmm: () => i18n.monthNamesShort[m()], mmmm: () => i18n.monthNamesLong[m()], yy: () => PAD_2[y() % 100], yyyy: () => PAD_4[y()], - h: () => H() % 12 || 12, + h: () => HOURS_H[H()], hh: () => PAD_2[(H() % 12 || 12)], - H: H, + H: () => NO_PAD[H()], HH: () => PAD_2[H()], - M: M, + M: () => NO_PAD[M()], MM: () => PAD_2[M()], - s: s, + s: () => NO_PAD[s()], ss: () => PAD_2[s()], l: () => PAD_3[L()], L: () => MILLISECONDS_L[L()], @@ -280,9 +280,12 @@ const daySuffix = new Array(32).fill(0).map((_, i) => { } }); +const NO_PAD = new Array(1e3).fill(0).map((_, i) => String(i)); const PAD_2 = new Array(1e2).fill(0).map((_, i) => String(i).padStart(2, '0')); const PAD_3 = new Array(1e3).fill(0).map((_, i) => String(i).padStart(3, '0')); const PAD_4 = new Array(1e4).fill(0).map((_, i) => String(i).padStart(4, '0')); + +const HOURS_H = new Array(24).fill(0).map((_, i) => String(i % 12 || 12)); const MILLISECONDS_L = new Array(1e3).fill(0).map((_, i) => String(i).padStart(3, '0').slice(0, 2)); /** From fedd11a60b0588356c6b881b8c97f489ec653ded Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Fri, 1 Aug 2025 10:16:23 +0200 Subject: [PATCH 12/29] remove babel --- babel.config.json | 11 - package-lock.json | 2562 +-------------------------------------------- package.json | 11 +- 3 files changed, 4 insertions(+), 2580 deletions(-) delete mode 100644 babel.config.json diff --git a/babel.config.json b/babel.config.json deleted file mode 100644 index 810d84a..0000000 --- a/babel.config.json +++ /dev/null @@ -1,11 +0,0 @@ -{ - "presets": [ - [ - "@babel/env", - { - "targets": "> 0.01%, not dead", - "modules": false - } - ] - ] -} diff --git a/package-lock.json b/package-lock.json index 73f8a44..390858b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,2492 +9,12 @@ "version": "5.0.3", "license": "MIT", "devDependencies": { - "@babel/cli": "^7.14.8", - "@babel/core": "^7.15.0", - "@babel/preset-env": "^7.15.0", - "tinybench": "^4.0.1", - "uglify-js": "^3.14.1" + "tinybench": "^4.0.1" }, "engines": { "node": ">=12.20" } }, - "node_modules/@babel/cli": { - "version": "7.15.7", - "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.15.7.tgz", - "integrity": "sha512-YW5wOprO2LzMjoWZ5ZG6jfbY9JnkDxuHDwvnrThnuYtByorova/I0HNXJedrUfwuXFQfYOjcqDA4PU3qlZGZjg==", - "dev": true, - "dependencies": { - "commander": "^4.0.1", - "convert-source-map": "^1.1.0", - "fs-readdir-recursive": "^1.1.0", - "glob": "^7.0.0", - "make-dir": "^2.1.0", - "slash": "^2.0.0", - "source-map": "^0.5.0" - }, - "bin": { - "babel": "bin/babel.js", - "babel-external-helpers": "bin/babel-external-helpers.js" - }, - "engines": { - "node": ">=6.9.0" - }, - "optionalDependencies": { - "@nicolo-ribaudo/chokidar-2": "2.1.8-no-fsevents.3", - "chokidar": "^3.4.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/code-frame": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.14.5.tgz", - "integrity": "sha512-9pzDqyc6OLDaqe+zbACgFkb6fKMNG6CObKpnYXChRsvYGyEdc7CA2BaqeOM+vOtCS5ndmJicPJhKAwYRI6UfFw==", - "dev": true, - "dependencies": { - "@babel/highlight": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/compat-data": { - "version": "7.15.0", - "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.15.0.tgz", - "integrity": "sha512-0NqAC1IJE0S0+lL1SWFMxMkz1pKCNCjI4tr2Zx4LJSXxCLAdr6KyArnY+sno5m3yH9g737ygOyPABDsnXkpxiA==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/core": { - "version": "7.15.5", - "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.15.5.tgz", - "integrity": "sha512-pYgXxiwAgQpgM1bNkZsDEq85f0ggXMA5L7c+o3tskGMh2BunCI9QUwB9Z4jpvXUOuMdyGKiGKQiRe11VS6Jzvg==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.14.5", - "@babel/generator": "^7.15.4", - "@babel/helper-compilation-targets": "^7.15.4", - "@babel/helper-module-transforms": "^7.15.4", - "@babel/helpers": "^7.15.4", - "@babel/parser": "^7.15.5", - "@babel/template": "^7.15.4", - "@babel/traverse": "^7.15.4", - "@babel/types": "^7.15.4", - "convert-source-map": "^1.7.0", - "debug": "^4.1.0", - "gensync": "^1.0.0-beta.2", - "json5": "^2.1.2", - "semver": "^6.3.0", - "source-map": "^0.5.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/babel" - } - }, - "node_modules/@babel/core/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/generator": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.15.4.tgz", - "integrity": "sha512-d3itta0tu+UayjEORPNz6e1T3FtvWlP5N4V5M+lhp/CxT4oAA7/NcScnpRyspUMLK6tu9MNHmQHxRykuN2R7hw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.15.4", - "jsesc": "^2.5.1", - "source-map": "^0.5.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-annotate-as-pure": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.15.4.tgz", - "integrity": "sha512-QwrtdNvUNsPCj2lfNQacsGSQvGX8ee1ttrBrcozUP2Sv/jylewBP/8QFe6ZkBsC8T/GYWonNAWJV4aRR9AL2DA==", - "dev": true, - "dependencies": { - "@babel/types": "^7.15.4" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.15.4.tgz", - "integrity": "sha512-P8o7JP2Mzi0SdC6eWr1zF+AEYvrsZa7GSY1lTayjF5XJhVH0kjLYUZPvTMflP7tBgZoe9gIhTa60QwFpqh/E0Q==", - "dev": true, - "dependencies": { - "@babel/helper-explode-assignable-expression": "^7.15.4", - "@babel/types": "^7.15.4" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-compilation-targets": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.15.4.tgz", - "integrity": "sha512-rMWPCirulnPSe4d+gwdWXLfAXTTBj8M3guAf5xFQJ0nvFY7tfNAFnWdqaHegHlgDZOCT4qvhF3BYlSJag8yhqQ==", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.15.0", - "@babel/helper-validator-option": "^7.14.5", - "browserslist": "^4.16.6", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-compilation-targets/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/helper-create-class-features-plugin": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.15.4.tgz", - "integrity": "sha512-7ZmzFi+DwJx6A7mHRwbuucEYpyBwmh2Ca0RvI6z2+WLZYCqV0JOaLb+u0zbtmDicebgKBZgqbYfLaKNqSgv5Pw==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.15.4", - "@babel/helper-function-name": "^7.15.4", - "@babel/helper-member-expression-to-functions": "^7.15.4", - "@babel/helper-optimise-call-expression": "^7.15.4", - "@babel/helper-replace-supers": "^7.15.4", - "@babel/helper-split-export-declaration": "^7.15.4" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-create-regexp-features-plugin": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.14.5.tgz", - "integrity": "sha512-TLawwqpOErY2HhWbGJ2nZT5wSkR192QpN+nBg1THfBfftrlvOh+WbhrxXCH4q4xJ9Gl16BGPR/48JA+Ryiho/A==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.14.5", - "regexpu-core": "^4.7.1" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/helper-define-polyfill-provider": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.2.3.tgz", - "integrity": "sha512-RH3QDAfRMzj7+0Nqu5oqgO5q9mFtQEVvCRsi8qCEfzLR9p2BHfn5FzhSB2oj1fF7I2+DcTORkYaQ6aTR9Cofew==", - "dev": true, - "dependencies": { - "@babel/helper-compilation-targets": "^7.13.0", - "@babel/helper-module-imports": "^7.12.13", - "@babel/helper-plugin-utils": "^7.13.0", - "@babel/traverse": "^7.13.0", - "debug": "^4.1.1", - "lodash.debounce": "^4.0.8", - "resolve": "^1.14.2", - "semver": "^6.1.2" - }, - "peerDependencies": { - "@babel/core": "^7.4.0-0" - } - }, - "node_modules/@babel/helper-define-polyfill-provider/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/helper-explode-assignable-expression": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-explode-assignable-expression/-/helper-explode-assignable-expression-7.15.4.tgz", - "integrity": "sha512-J14f/vq8+hdC2KoWLIQSsGrC9EFBKE4NFts8pfMpymfApds+fPqR30AOUWc4tyr56h9l/GA1Sxv2q3dLZWbQ/g==", - "dev": true, - "dependencies": { - "@babel/types": "^7.15.4" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-function-name": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.15.4.tgz", - "integrity": "sha512-Z91cOMM4DseLIGOnog+Z8OI6YseR9bua+HpvLAQ2XayUGU+neTtX+97caALaLdyu53I/fjhbeCnWnRH1O3jFOw==", - "dev": true, - "dependencies": { - "@babel/helper-get-function-arity": "^7.15.4", - "@babel/template": "^7.15.4", - "@babel/types": "^7.15.4" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-get-function-arity": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-get-function-arity/-/helper-get-function-arity-7.15.4.tgz", - "integrity": "sha512-1/AlxSF92CmGZzHnC515hm4SirTxtpDnLEJ0UyEMgTMZN+6bxXKg04dKhiRx5Enel+SUA1G1t5Ed/yQia0efrA==", - "dev": true, - "dependencies": { - "@babel/types": "^7.15.4" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-hoist-variables": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.15.4.tgz", - "integrity": "sha512-VTy085egb3jUGVK9ycIxQiPbquesq0HUQ+tPO0uv5mPEBZipk+5FkRKiWq5apuyTE9FUrjENB0rCf8y+n+UuhA==", - "dev": true, - "dependencies": { - "@babel/types": "^7.15.4" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-member-expression-to-functions": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.15.4.tgz", - "integrity": "sha512-cokOMkxC/BTyNP1AlY25HuBWM32iCEsLPI4BHDpJCHHm1FU2E7dKWWIXJgQgSFiu4lp8q3bL1BIKwqkSUviqtA==", - "dev": true, - "dependencies": { - "@babel/types": "^7.15.4" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-imports": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.15.4.tgz", - "integrity": "sha512-jeAHZbzUwdW/xHgHQ3QmWR4Jg6j15q4w/gCfwZvtqOxoo5DKtLHk8Bsf4c5RZRC7NmLEs+ohkdq8jFefuvIxAA==", - "dev": true, - "dependencies": { - "@babel/types": "^7.15.4" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-module-transforms": { - "version": "7.15.7", - "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.15.7.tgz", - "integrity": "sha512-ZNqjjQG/AuFfekFTY+7nY4RgBSklgTu970c7Rj3m/JOhIu5KPBUuTA9AY6zaKcUvk4g6EbDXdBnhi35FAssdSw==", - "dev": true, - "dependencies": { - "@babel/helper-module-imports": "^7.15.4", - "@babel/helper-replace-supers": "^7.15.4", - "@babel/helper-simple-access": "^7.15.4", - "@babel/helper-split-export-declaration": "^7.15.4", - "@babel/helper-validator-identifier": "^7.15.7", - "@babel/template": "^7.15.4", - "@babel/traverse": "^7.15.4", - "@babel/types": "^7.15.6" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-optimise-call-expression": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.15.4.tgz", - "integrity": "sha512-E/z9rfbAOt1vDW1DR7k4SzhzotVV5+qMciWV6LaG1g4jeFrkDlJedjtV4h0i4Q/ITnUu+Pk08M7fczsB9GXBDw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.15.4" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-plugin-utils": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.14.5.tgz", - "integrity": "sha512-/37qQCE3K0vvZKwoK4XU/irIJQdIfCJuhU5eKnNxpFDsOkgFaUAwbv+RYw6eYgsC0E4hS7r5KqGULUogqui0fQ==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-remap-async-to-generator": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.15.4.tgz", - "integrity": "sha512-v53MxgvMK/HCwckJ1bZrq6dNKlmwlyRNYM6ypaRTdXWGOE2c1/SCa6dL/HimhPulGhZKw9W0QhREM583F/t0vQ==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.15.4", - "@babel/helper-wrap-function": "^7.15.4", - "@babel/types": "^7.15.4" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-replace-supers": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.15.4.tgz", - "integrity": "sha512-/ztT6khaXF37MS47fufrKvIsiQkx1LBRvSJNzRqmbyeZnTwU9qBxXYLaaT/6KaxfKhjs2Wy8kG8ZdsFUuWBjzw==", - "dev": true, - "dependencies": { - "@babel/helper-member-expression-to-functions": "^7.15.4", - "@babel/helper-optimise-call-expression": "^7.15.4", - "@babel/traverse": "^7.15.4", - "@babel/types": "^7.15.4" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-simple-access": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.15.4.tgz", - "integrity": "sha512-UzazrDoIVOZZcTeHHEPYrr1MvTR/K+wgLg6MY6e1CJyaRhbibftF6fR2KU2sFRtI/nERUZR9fBd6aKgBlIBaPg==", - "dev": true, - "dependencies": { - "@babel/types": "^7.15.4" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-skip-transparent-expression-wrappers": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.15.4.tgz", - "integrity": "sha512-BMRLsdh+D1/aap19TycS4eD1qELGrCBJwzaY9IE8LrpJtJb+H7rQkPIdsfgnMtLBA6DJls7X9z93Z4U8h7xw0A==", - "dev": true, - "dependencies": { - "@babel/types": "^7.15.4" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-split-export-declaration": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.15.4.tgz", - "integrity": "sha512-HsFqhLDZ08DxCpBdEVtKmywj6PQbwnF6HHybur0MAnkAKnlS6uHkwnmRIkElB2Owpfb4xL4NwDmDLFubueDXsw==", - "dev": true, - "dependencies": { - "@babel/types": "^7.15.4" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-identifier": { - "version": "7.15.7", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz", - "integrity": "sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-validator-option": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz", - "integrity": "sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helper-wrap-function": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.15.4.tgz", - "integrity": "sha512-Y2o+H/hRV5W8QhIfTpRIBwl57y8PrZt6JM3V8FOo5qarjshHItyH5lXlpMfBfmBefOqSCpKZs/6Dxqp0E/U+uw==", - "dev": true, - "dependencies": { - "@babel/helper-function-name": "^7.15.4", - "@babel/template": "^7.15.4", - "@babel/traverse": "^7.15.4", - "@babel/types": "^7.15.4" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/helpers": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.15.4.tgz", - "integrity": "sha512-V45u6dqEJ3w2rlryYYXf6i9rQ5YMNu4FLS6ngs8ikblhu2VdR1AqAd6aJjBzmf2Qzh6KOLqKHxEN9+TFbAkAVQ==", - "dev": true, - "dependencies": { - "@babel/template": "^7.15.4", - "@babel/traverse": "^7.15.4", - "@babel/types": "^7.15.4" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/highlight": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.14.5.tgz", - "integrity": "sha512-qf9u2WFWVV0MppaL877j2dBtQIDgmidgjGk5VIMw3OadXvYaXn66U1BFlH2t4+t3i+8PhedppRv+i40ABzd+gg==", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.14.5", - "chalk": "^2.0.0", - "js-tokens": "^4.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/parser": { - "version": "7.15.7", - "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.15.7.tgz", - "integrity": "sha512-rycZXvQ+xS9QyIcJ9HXeDWf1uxqlbVFAUq0Rq0dbc50Zb/+wUe/ehyfzGfm9KZZF0kBejYgxltBXocP+gKdL2g==", - "dev": true, - "bin": { - "parser": "bin/babel-parser.js" - }, - "engines": { - "node": ">=6.0.0" - } - }, - "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.15.4.tgz", - "integrity": "sha512-eBnpsl9tlhPhpI10kU06JHnrYXwg3+V6CaP2idsCXNef0aeslpqyITXQ74Vfk5uHgY7IG7XP0yIH8b42KSzHog==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-skip-transparent-expression-wrappers": "^7.15.4", - "@babel/plugin-proposal-optional-chaining": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.13.0" - } - }, - "node_modules/@babel/plugin-proposal-async-generator-functions": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.15.4.tgz", - "integrity": "sha512-2zt2g5vTXpMC3OmK6uyjvdXptbhBXfA77XGrd3gh93zwG8lZYBLOBImiGBEG0RANu3JqKEACCz5CGk73OJROBw==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-async-generator-functions instead.", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-remap-async-to-generator": "^7.15.4", - "@babel/plugin-syntax-async-generators": "^7.8.4" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-class-properties": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-properties/-/plugin-proposal-class-properties-7.14.5.tgz", - "integrity": "sha512-q/PLpv5Ko4dVc1LYMpCY7RVAAO4uk55qPwrIuJ5QJ8c6cVuAmhu7I/49JOppXL6gXf7ZHzpRVEUZdYoPLM04Gg==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-properties instead.", - "dev": true, - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-class-static-block": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-class-static-block/-/plugin-proposal-class-static-block-7.15.4.tgz", - "integrity": "sha512-M682XWrrLNk3chXCjoPUQWOyYsB93B9z3mRyjtqqYJWDf2mfCdIYgDrA11cgNVhAQieaq6F2fn2f3wI0U4aTjA==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-class-static-block instead.", - "dev": true, - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.15.4", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/plugin-syntax-class-static-block": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.12.0" - } - }, - "node_modules/@babel/plugin-proposal-dynamic-import": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-dynamic-import/-/plugin-proposal-dynamic-import-7.14.5.tgz", - "integrity": "sha512-ExjiNYc3HDN5PXJx+bwC50GIx/KKanX2HiggnIUAYedbARdImiCU4RhhHfdf0Kd7JNXGpsBBBCOm+bBVy3Gb0g==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-dynamic-import instead.", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/plugin-syntax-dynamic-import": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-export-namespace-from": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-export-namespace-from/-/plugin-proposal-export-namespace-from-7.14.5.tgz", - "integrity": "sha512-g5POA32bXPMmSBu5Dx/iZGLGnKmKPc5AiY7qfZgurzrCYgIztDlHFbznSNCoQuv57YQLnQfaDi7dxCtLDIdXdA==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-export-namespace-from instead.", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-json-strings": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-json-strings/-/plugin-proposal-json-strings-7.14.5.tgz", - "integrity": "sha512-NSq2fczJYKVRIsUJyNxrVUMhB27zb7N7pOFGQOhBKJrChbGcgEAqyZrmZswkPk18VMurEeJAaICbfm57vUeTbQ==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-json-strings instead.", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/plugin-syntax-json-strings": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-logical-assignment-operators": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-logical-assignment-operators/-/plugin-proposal-logical-assignment-operators-7.14.5.tgz", - "integrity": "sha512-YGn2AvZAo9TwyhlLvCCWxD90Xq8xJ4aSgaX3G5D/8DW94L8aaT+dS5cSP+Z06+rCJERGSr9GxMBZ601xoc2taw==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-logical-assignment-operators instead.", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-nullish-coalescing-operator": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-nullish-coalescing-operator/-/plugin-proposal-nullish-coalescing-operator-7.14.5.tgz", - "integrity": "sha512-gun/SOnMqjSb98Nkaq2rTKMwervfdAoz6NphdY0vTfuzMfryj+tDGb2n6UkDKwez+Y8PZDhE3D143v6Gepp4Hg==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-nullish-coalescing-operator instead.", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-numeric-separator": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-numeric-separator/-/plugin-proposal-numeric-separator-7.14.5.tgz", - "integrity": "sha512-yiclALKe0vyZRZE0pS6RXgjUOt87GWv6FYa5zqj15PvhOGFO69R5DusPlgK/1K5dVnCtegTiWu9UaBSrLLJJBg==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-numeric-separator instead.", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/plugin-syntax-numeric-separator": "^7.10.4" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-object-rest-spread": { - "version": "7.15.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-object-rest-spread/-/plugin-proposal-object-rest-spread-7.15.6.tgz", - "integrity": "sha512-qtOHo7A1Vt+O23qEAX+GdBpqaIuD3i9VRrWgCJeq7WO6H2d14EK3q11urj5Te2MAeK97nMiIdRpwd/ST4JFbNg==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-object-rest-spread instead.", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.15.0", - "@babel/helper-compilation-targets": "^7.15.4", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-transform-parameters": "^7.15.4" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-optional-catch-binding": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-catch-binding/-/plugin-proposal-optional-catch-binding-7.14.5.tgz", - "integrity": "sha512-3Oyiixm0ur7bzO5ybNcZFlmVsygSIQgdOa7cTfOYCMY+wEPAYhZAJxi3mixKFCTCKUhQXuCTtQ1MzrpL3WT8ZQ==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-catch-binding instead.", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-optional-chaining": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-optional-chaining/-/plugin-proposal-optional-chaining-7.14.5.tgz", - "integrity": "sha512-ycz+VOzo2UbWNI1rQXxIuMOzrDdHGrI23fRiz/Si2R4kv2XZQ1BK8ccdHwehMKBlcH/joGW/tzrUmo67gbJHlQ==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-optional-chaining instead.", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-skip-transparent-expression-wrappers": "^7.14.5", - "@babel/plugin-syntax-optional-chaining": "^7.8.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-private-methods": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-methods/-/plugin-proposal-private-methods-7.14.5.tgz", - "integrity": "sha512-838DkdUA1u+QTCplatfq4B7+1lnDa/+QMI89x5WZHBcnNv+47N8QEj2k9I2MUU9xIv8XJ4XvPCviM/Dj7Uwt9g==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-methods instead.", - "dev": true, - "dependencies": { - "@babel/helper-create-class-features-plugin": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-private-property-in-object": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.15.4.tgz", - "integrity": "sha512-X0UTixkLf0PCCffxgu5/1RQyGGbgZuKoI+vXP4iSbJSYwPb7hu06omsFGBvQ9lJEvwgrxHdS8B5nbfcd8GyUNA==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-private-property-in-object instead.", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.15.4", - "@babel/helper-create-class-features-plugin": "^7.15.4", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-proposal-unicode-property-regex": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-unicode-property-regex/-/plugin-proposal-unicode-property-regex-7.14.5.tgz", - "integrity": "sha512-6axIeOU5LnY471KenAB9vI8I5j7NQ2d652hIYwVyRfgaZT5UpiqFKCuVXCDMSrU+3VFafnu2c5m3lrWIlr6A5Q==", - "deprecated": "This proposal has been merged to the ECMAScript standard and thus this plugin is no longer maintained. Please use @babel/plugin-transform-unicode-property-regex instead.", - "dev": true, - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-async-generators": { - "version": "7.8.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-async-generators/-/plugin-syntax-async-generators-7.8.4.tgz", - "integrity": "sha512-tycmZxkGfZaxhMRbXlPXuVFpdWlXpir2W4AMhSJgRKzk/eDlIXOhb2LHWoLpDF7TEHylV5zNhykX6KAgHJmTNw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-class-properties": { - "version": "7.12.13", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-properties/-/plugin-syntax-class-properties-7.12.13.tgz", - "integrity": "sha512-fm4idjKla0YahUNgFNLCB0qySdsoPiZP3iQE3rky0mBUtMZ23yDJ9SJdg6dXTSDnulOVqiF3Hgr9nbXvXTQZYA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.12.13" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-class-static-block": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-class-static-block/-/plugin-syntax-class-static-block-7.14.5.tgz", - "integrity": "sha512-b+YyPmr6ldyNnM6sqYeMWE+bgJcJpO6yS4QD7ymxgH34GBPNDM/THBh8iunyvKIZztiwLH4CJZ0RxTk9emgpjw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-dynamic-import": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-dynamic-import/-/plugin-syntax-dynamic-import-7.8.3.tgz", - "integrity": "sha512-5gdGbFon+PszYzqs83S3E5mpi7/y/8M9eC90MRTZfduQOYW76ig6SOSPNe41IG5LoP3FGBn2N0RjVDSQiS94kQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-export-namespace-from": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-export-namespace-from/-/plugin-syntax-export-namespace-from-7.8.3.tgz", - "integrity": "sha512-MXf5laXo6c1IbEbegDmzGPwGNTsHZmEy6QGznu5Sh2UCWvueywb2ee+CCE4zQiZstxU9BMoQO9i6zUFSY0Kj0Q==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.3" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-json-strings": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-json-strings/-/plugin-syntax-json-strings-7.8.3.tgz", - "integrity": "sha512-lY6kdGpWHvjoe2vk4WrAapEuBR69EMxZl+RoGRhrFGNYVK8mOPAW8VfbT/ZgrFbXlDNiiaxQnAtgVCZ6jv30EA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-logical-assignment-operators": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-logical-assignment-operators/-/plugin-syntax-logical-assignment-operators-7.10.4.tgz", - "integrity": "sha512-d8waShlpFDinQ5MtvGU9xDAOzKH47+FFoney2baFIoMr952hKOLp1HR7VszoZvOsV/4+RRszNY7D17ba0te0ig==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-nullish-coalescing-operator": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-nullish-coalescing-operator/-/plugin-syntax-nullish-coalescing-operator-7.8.3.tgz", - "integrity": "sha512-aSff4zPII1u2QD7y+F8oDsz19ew4IGEJg9SVW+bqwpwtfFleiQDMdzA/R+UlWDzfnHFCxxleFT0PMIrR36XLNQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-numeric-separator": { - "version": "7.10.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-numeric-separator/-/plugin-syntax-numeric-separator-7.10.4.tgz", - "integrity": "sha512-9H6YdfkcK/uOnY/K7/aA2xpzaAgkQn37yzWUMRK7OaPOqOpGS1+n0H5hxT9AUw9EsSjPW8SVyMJwYRtWs3X3ug==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.10.4" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-object-rest-spread": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-object-rest-spread/-/plugin-syntax-object-rest-spread-7.8.3.tgz", - "integrity": "sha512-XoqMijGZb9y3y2XskN+P1wUGiVwWZ5JmoDRwx5+3GmEplNyVM2s2Dg8ILFQm8rWM48orGy5YpI5Bl8U1y7ydlA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-catch-binding": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-catch-binding/-/plugin-syntax-optional-catch-binding-7.8.3.tgz", - "integrity": "sha512-6VPD0Pc1lpTqw0aKoeRTMiB+kWhAoT24PA+ksWSBrFtl5SIRVpZlwN3NNPQjehA2E/91FV3RjLWoVTglWcSV3Q==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-optional-chaining": { - "version": "7.8.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-optional-chaining/-/plugin-syntax-optional-chaining-7.8.3.tgz", - "integrity": "sha512-KoK9ErH1MBlCPxV0VANkXW2/dw4vlbGDrFgz8bmUsBGYkFRcbRwMh6cIJubdPrkxRwuGdtCk0v/wPTKbQgBjkg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.8.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-private-property-in-object": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-private-property-in-object/-/plugin-syntax-private-property-in-object-7.14.5.tgz", - "integrity": "sha512-0wVnp9dxJ72ZUJDV27ZfbSj6iHLoytYZmh3rFcxNnvsJF3ktkzLDZPy/mA17HGsaQT3/DQsWYX1f1QGWkCoVUg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-syntax-top-level-await": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-top-level-await/-/plugin-syntax-top-level-await-7.14.5.tgz", - "integrity": "sha512-hx++upLv5U1rgYfwe1xBQUhRmU41NEvpUvrp8jkrSCdvGSnM5/qdRMtylJ6PG5OFkBaHkbTAKTnd3/YyESRHFw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-arrow-functions": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.14.5.tgz", - "integrity": "sha512-KOnO0l4+tD5IfOdi4x8C1XmEIRWUjNRV8wc6K2vz/3e8yAOoZZvsRXRRIF/yo/MAOFb4QjtAw9xSxMXbSMRy8A==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-async-to-generator": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.14.5.tgz", - "integrity": "sha512-szkbzQ0mNk0rpu76fzDdqSyPu0MuvpXgC+6rz5rpMb5OIRxdmHfQxrktL8CYolL2d8luMCZTR0DpIMIdL27IjA==", - "dev": true, - "dependencies": { - "@babel/helper-module-imports": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-remap-async-to-generator": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-block-scoped-functions": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.14.5.tgz", - "integrity": "sha512-dtqWqdWZ5NqBX3KzsVCWfQI3A53Ft5pWFCT2eCVUftWZgjc5DpDponbIF1+c+7cSGk2wN0YK7HGL/ezfRbpKBQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-block-scoping": { - "version": "7.15.3", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.15.3.tgz", - "integrity": "sha512-nBAzfZwZb4DkaGtOes1Up1nOAp9TDRRFw4XBzBBSG9QK7KVFmYzgj9o9sbPv7TX5ofL4Auq4wZnxCoPnI/lz2Q==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-classes": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.15.4.tgz", - "integrity": "sha512-Yjvhex8GzBmmPQUvpXRPWQ9WnxXgAFuZSrqOK/eJlOGIXwvv8H3UEdUigl1gb/bnjTrln+e8bkZUYCBt/xYlBg==", - "dev": true, - "dependencies": { - "@babel/helper-annotate-as-pure": "^7.15.4", - "@babel/helper-function-name": "^7.15.4", - "@babel/helper-optimise-call-expression": "^7.15.4", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-replace-supers": "^7.15.4", - "@babel/helper-split-export-declaration": "^7.15.4", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-computed-properties": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.14.5.tgz", - "integrity": "sha512-pWM+E4283UxaVzLb8UBXv4EIxMovU4zxT1OPnpHJcmnvyY9QbPPTKZfEj31EUvG3/EQRbYAGaYEUZ4yWOBC2xg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-destructuring": { - "version": "7.14.7", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.14.7.tgz", - "integrity": "sha512-0mDE99nK+kVh3xlc5vKwB6wnP9ecuSj+zQCa/n0voENtP/zymdT4HH6QEb65wjjcbqr1Jb/7z9Qp7TF5FtwYGw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-dotall-regex": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.14.5.tgz", - "integrity": "sha512-loGlnBdj02MDsFaHhAIJzh7euK89lBrGIdM9EAtHFo6xKygCUGuuWe07o1oZVk287amtW1n0808sQM99aZt3gw==", - "dev": true, - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-duplicate-keys": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.14.5.tgz", - "integrity": "sha512-iJjbI53huKbPDAsJ8EmVmvCKeeq21bAze4fu9GBQtSLqfvzj2oRuHVx4ZkDwEhg1htQ+5OBZh/Ab0XDf5iBZ7A==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-exponentiation-operator": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.14.5.tgz", - "integrity": "sha512-jFazJhMBc9D27o9jDnIE5ZErI0R0m7PbKXVq77FFvqFbzvTMuv8jaAwLZ5PviOLSFttqKIW0/wxNSDbjLk0tYA==", - "dev": true, - "dependencies": { - "@babel/helper-builder-binary-assignment-operator-visitor": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-for-of": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.15.4.tgz", - "integrity": "sha512-DRTY9fA751AFBDh2oxydvVm4SYevs5ILTWLs6xKXps4Re/KG5nfUkr+TdHCrRWB8C69TlzVgA9b3RmGWmgN9LA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-function-name": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.14.5.tgz", - "integrity": "sha512-vbO6kv0fIzZ1GpmGQuvbwwm+O4Cbm2NrPzwlup9+/3fdkuzo1YqOZcXw26+YUJB84Ja7j9yURWposEHLYwxUfQ==", - "dev": true, - "dependencies": { - "@babel/helper-function-name": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-literals": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.14.5.tgz", - "integrity": "sha512-ql33+epql2F49bi8aHXxvLURHkxJbSmMKl9J5yHqg4PLtdE6Uc48CH1GS6TQvZ86eoB/ApZXwm7jlA+B3kra7A==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-member-expression-literals": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.14.5.tgz", - "integrity": "sha512-WkNXxH1VXVTKarWFqmso83xl+2V3Eo28YY5utIkbsmXoItO8Q3aZxN4BTS2k0hz9dGUloHK26mJMyQEYfkn/+Q==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-amd": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.14.5.tgz", - "integrity": "sha512-3lpOU8Vxmp3roC4vzFpSdEpGUWSMsHFreTWOMMLzel2gNGfHE5UWIh/LN6ghHs2xurUp4jRFYMUIZhuFbody1g==", - "dev": true, - "dependencies": { - "@babel/helper-module-transforms": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5", - "babel-plugin-dynamic-import-node": "^2.3.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-commonjs": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.15.4.tgz", - "integrity": "sha512-qg4DPhwG8hKp4BbVDvX1s8cohM8a6Bvptu4l6Iingq5rW+yRUAhe/YRup/YcW2zCOlrysEWVhftIcKzrEZv3sA==", - "dev": true, - "dependencies": { - "@babel/helper-module-transforms": "^7.15.4", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-simple-access": "^7.15.4", - "babel-plugin-dynamic-import-node": "^2.3.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-systemjs": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.15.4.tgz", - "integrity": "sha512-fJUnlQrl/mezMneR72CKCgtOoahqGJNVKpompKwzv3BrEXdlPspTcyxrZ1XmDTIr9PpULrgEQo3qNKp6dW7ssw==", - "dev": true, - "dependencies": { - "@babel/helper-hoist-variables": "^7.15.4", - "@babel/helper-module-transforms": "^7.15.4", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-validator-identifier": "^7.14.9", - "babel-plugin-dynamic-import-node": "^2.3.3" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-modules-umd": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.14.5.tgz", - "integrity": "sha512-RfPGoagSngC06LsGUYyM9QWSXZ8MysEjDJTAea1lqRjNECE3y0qIJF/qbvJxc4oA4s99HumIMdXOrd+TdKaAAA==", - "dev": true, - "dependencies": { - "@babel/helper-module-transforms": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-named-capturing-groups-regex": { - "version": "7.14.9", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.14.9.tgz", - "integrity": "sha512-l666wCVYO75mlAtGFfyFwnWmIXQm3kSH0C3IRnJqWcZbWkoihyAdDhFm2ZWaxWTqvBvhVFfJjMRQ0ez4oN1yYA==", - "dev": true, - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0" - } - }, - "node_modules/@babel/plugin-transform-new-target": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.14.5.tgz", - "integrity": "sha512-Nx054zovz6IIRWEB49RDRuXGI4Gy0GMgqG0cII9L3MxqgXz/+rgII+RU58qpo4g7tNEx1jG7rRVH4ihZoP4esQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-object-super": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.14.5.tgz", - "integrity": "sha512-MKfOBWzK0pZIrav9z/hkRqIk/2bTv9qvxHzPQc12RcVkMOzpIKnFCNYJip00ssKWYkd8Sf5g0Wr7pqJ+cmtuFg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-replace-supers": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-parameters": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.15.4.tgz", - "integrity": "sha512-9WB/GUTO6lvJU3XQsSr6J/WKvBC2hcs4Pew8YxZagi6GkTdniyqp8On5kqdK8MN0LMeu0mGbhPN+O049NV/9FQ==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-property-literals": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.14.5.tgz", - "integrity": "sha512-r1uilDthkgXW8Z1vJz2dKYLV1tuw2xsbrp3MrZmD99Wh9vsfKoob+JTgri5VUb/JqyKRXotlOtwgu4stIYCmnw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-regenerator": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.14.5.tgz", - "integrity": "sha512-NVIY1W3ITDP5xQl50NgTKlZ0GrotKtLna08/uGY6ErQt6VEQZXla86x/CTddm5gZdcr+5GSsvMeTmWA5Ii6pkg==", - "dev": true, - "dependencies": { - "regenerator-transform": "^0.14.2" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-reserved-words": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.14.5.tgz", - "integrity": "sha512-cv4F2rv1nD4qdexOGsRQXJrOcyb5CrgjUH9PKrrtyhSDBNWGxd0UIitjyJiWagS+EbUGjG++22mGH1Pub8D6Vg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-shorthand-properties": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.14.5.tgz", - "integrity": "sha512-xLucks6T1VmGsTB+GWK5Pl9Jl5+nRXD1uoFdA5TSO6xtiNjtXTjKkmPdFXVLGlK5A2/or/wQMKfmQ2Y0XJfn5g==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-spread": { - "version": "7.14.6", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.14.6.tgz", - "integrity": "sha512-Zr0x0YroFJku7n7+/HH3A2eIrGMjbmAIbJSVv0IZ+t3U2WUQUA64S/oeied2e+MaGSjmt4alzBCsK9E8gh+fag==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-skip-transparent-expression-wrappers": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-sticky-regex": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.14.5.tgz", - "integrity": "sha512-Z7F7GyvEMzIIbwnziAZmnSNpdijdr4dWt+FJNBnBLz5mwDFkqIXU9wmBcWWad3QeJF5hMTkRe4dAq2sUZiG+8A==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-template-literals": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.14.5.tgz", - "integrity": "sha512-22btZeURqiepOfuy/VkFr+zStqlujWaarpMErvay7goJS6BWwdd6BY9zQyDLDa4x2S3VugxFb162IZ4m/S/+Gg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-typeof-symbol": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.14.5.tgz", - "integrity": "sha512-lXzLD30ffCWseTbMQzrvDWqljvZlHkXU+CnseMhkMNqU1sASnCsz3tSzAaH3vCUXb9PHeUb90ZT1BdFTm1xxJw==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-unicode-escapes": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.14.5.tgz", - "integrity": "sha512-crTo4jATEOjxj7bt9lbYXcBAM3LZaUrbP2uUdxb6WIorLmjNKSpHfIybgY4B8SRpbf8tEVIWH3Vtm7ayCrKocA==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/plugin-transform-unicode-regex": { - "version": "7.14.5", - "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.14.5.tgz", - "integrity": "sha512-UygduJpC5kHeCiRw/xDVzC+wj8VaYSoKl5JNVmbP7MadpNinAm3SvZCxZ42H37KZBKztz46YC73i9yV34d0Tzw==", - "dev": true, - "dependencies": { - "@babel/helper-create-regexp-features-plugin": "^7.14.5", - "@babel/helper-plugin-utils": "^7.14.5" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/preset-env": { - "version": "7.15.6", - "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.15.6.tgz", - "integrity": "sha512-L+6jcGn7EWu7zqaO2uoTDjjMBW+88FXzV8KvrBl2z6MtRNxlsmUNRlZPaNNPUTgqhyC5DHNFk/2Jmra+ublZWw==", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.15.0", - "@babel/helper-compilation-targets": "^7.15.4", - "@babel/helper-plugin-utils": "^7.14.5", - "@babel/helper-validator-option": "^7.14.5", - "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.15.4", - "@babel/plugin-proposal-async-generator-functions": "^7.15.4", - "@babel/plugin-proposal-class-properties": "^7.14.5", - "@babel/plugin-proposal-class-static-block": "^7.15.4", - "@babel/plugin-proposal-dynamic-import": "^7.14.5", - "@babel/plugin-proposal-export-namespace-from": "^7.14.5", - "@babel/plugin-proposal-json-strings": "^7.14.5", - "@babel/plugin-proposal-logical-assignment-operators": "^7.14.5", - "@babel/plugin-proposal-nullish-coalescing-operator": "^7.14.5", - "@babel/plugin-proposal-numeric-separator": "^7.14.5", - "@babel/plugin-proposal-object-rest-spread": "^7.15.6", - "@babel/plugin-proposal-optional-catch-binding": "^7.14.5", - "@babel/plugin-proposal-optional-chaining": "^7.14.5", - "@babel/plugin-proposal-private-methods": "^7.14.5", - "@babel/plugin-proposal-private-property-in-object": "^7.15.4", - "@babel/plugin-proposal-unicode-property-regex": "^7.14.5", - "@babel/plugin-syntax-async-generators": "^7.8.4", - "@babel/plugin-syntax-class-properties": "^7.12.13", - "@babel/plugin-syntax-class-static-block": "^7.14.5", - "@babel/plugin-syntax-dynamic-import": "^7.8.3", - "@babel/plugin-syntax-export-namespace-from": "^7.8.3", - "@babel/plugin-syntax-json-strings": "^7.8.3", - "@babel/plugin-syntax-logical-assignment-operators": "^7.10.4", - "@babel/plugin-syntax-nullish-coalescing-operator": "^7.8.3", - "@babel/plugin-syntax-numeric-separator": "^7.10.4", - "@babel/plugin-syntax-object-rest-spread": "^7.8.3", - "@babel/plugin-syntax-optional-catch-binding": "^7.8.3", - "@babel/plugin-syntax-optional-chaining": "^7.8.3", - "@babel/plugin-syntax-private-property-in-object": "^7.14.5", - "@babel/plugin-syntax-top-level-await": "^7.14.5", - "@babel/plugin-transform-arrow-functions": "^7.14.5", - "@babel/plugin-transform-async-to-generator": "^7.14.5", - "@babel/plugin-transform-block-scoped-functions": "^7.14.5", - "@babel/plugin-transform-block-scoping": "^7.15.3", - "@babel/plugin-transform-classes": "^7.15.4", - "@babel/plugin-transform-computed-properties": "^7.14.5", - "@babel/plugin-transform-destructuring": "^7.14.7", - "@babel/plugin-transform-dotall-regex": "^7.14.5", - "@babel/plugin-transform-duplicate-keys": "^7.14.5", - "@babel/plugin-transform-exponentiation-operator": "^7.14.5", - "@babel/plugin-transform-for-of": "^7.15.4", - "@babel/plugin-transform-function-name": "^7.14.5", - "@babel/plugin-transform-literals": "^7.14.5", - "@babel/plugin-transform-member-expression-literals": "^7.14.5", - "@babel/plugin-transform-modules-amd": "^7.14.5", - "@babel/plugin-transform-modules-commonjs": "^7.15.4", - "@babel/plugin-transform-modules-systemjs": "^7.15.4", - "@babel/plugin-transform-modules-umd": "^7.14.5", - "@babel/plugin-transform-named-capturing-groups-regex": "^7.14.9", - "@babel/plugin-transform-new-target": "^7.14.5", - "@babel/plugin-transform-object-super": "^7.14.5", - "@babel/plugin-transform-parameters": "^7.15.4", - "@babel/plugin-transform-property-literals": "^7.14.5", - "@babel/plugin-transform-regenerator": "^7.14.5", - "@babel/plugin-transform-reserved-words": "^7.14.5", - "@babel/plugin-transform-shorthand-properties": "^7.14.5", - "@babel/plugin-transform-spread": "^7.14.6", - "@babel/plugin-transform-sticky-regex": "^7.14.5", - "@babel/plugin-transform-template-literals": "^7.14.5", - "@babel/plugin-transform-typeof-symbol": "^7.14.5", - "@babel/plugin-transform-unicode-escapes": "^7.14.5", - "@babel/plugin-transform-unicode-regex": "^7.14.5", - "@babel/preset-modules": "^0.1.4", - "@babel/types": "^7.15.6", - "babel-plugin-polyfill-corejs2": "^0.2.2", - "babel-plugin-polyfill-corejs3": "^0.2.2", - "babel-plugin-polyfill-regenerator": "^0.2.2", - "core-js-compat": "^3.16.0", - "semver": "^6.3.0" - }, - "engines": { - "node": ">=6.9.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/preset-env/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/@babel/preset-modules": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.4.tgz", - "integrity": "sha512-J36NhwnfdzpmH41M1DrnkkgAqhZaqr/NBdPfQ677mLzlaXo+oDiv1deyCDtgAhz8p328otdob0Du7+xgHGZbKg==", - "dev": true, - "dependencies": { - "@babel/helper-plugin-utils": "^7.0.0", - "@babel/plugin-proposal-unicode-property-regex": "^7.4.4", - "@babel/plugin-transform-dotall-regex": "^7.4.4", - "@babel/types": "^7.4.4", - "esutils": "^2.0.2" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/@babel/runtime": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.15.4.tgz", - "integrity": "sha512-99catp6bHCaxr4sJ/DbTGgHS4+Rs2RVd2g7iOap6SLGPDknRK9ztKNsE/Fg6QhSeh1FGE5f6gHGQmvvn3I3xhw==", - "dev": true, - "dependencies": { - "regenerator-runtime": "^0.13.4" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/template": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.15.4.tgz", - "integrity": "sha512-UgBAfEa1oGuYgDIPM2G+aHa4Nlo9Lh6mGD2bDBGMTbYnc38vulXPuC1MGjYILIEmlwl6Rd+BPR9ee3gm20CBtg==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.14.5", - "@babel/parser": "^7.15.4", - "@babel/types": "^7.15.4" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/traverse": { - "version": "7.15.4", - "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.15.4.tgz", - "integrity": "sha512-W6lQD8l4rUbQR/vYgSuCAE75ADyyQvOpFVsvPPdkhf6lATXAsQIG9YdtOcu8BB1dZ0LKu+Zo3c1wEcbKeuhdlA==", - "dev": true, - "dependencies": { - "@babel/code-frame": "^7.14.5", - "@babel/generator": "^7.15.4", - "@babel/helper-function-name": "^7.15.4", - "@babel/helper-hoist-variables": "^7.15.4", - "@babel/helper-split-export-declaration": "^7.15.4", - "@babel/parser": "^7.15.4", - "@babel/types": "^7.15.4", - "debug": "^4.1.0", - "globals": "^11.1.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@babel/types": { - "version": "7.15.6", - "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.15.6.tgz", - "integrity": "sha512-BPU+7QhqNjmWyDO0/vitH/CuhpV8ZmK1wpKva8nuyNF5MJfuRNWMc+hc14+u9xT93kvykMdncrJT19h74uB1Ig==", - "dev": true, - "dependencies": { - "@babel/helper-validator-identifier": "^7.14.9", - "to-fast-properties": "^2.0.0" - }, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/@nicolo-ribaudo/chokidar-2": { - "version": "2.1.8-no-fsevents.3", - "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/chokidar-2/-/chokidar-2-2.1.8-no-fsevents.3.tgz", - "integrity": "sha512-s88O1aVtXftvp5bCPB7WnmXc5IwOZZ7YPuwNPt+GtOOXpPvad1LfbmjYv+qII7zP6RU2QGnqve27dnLycEnyEQ==", - "dev": true, - "optional": true - }, - "node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/anymatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.2.tgz", - "integrity": "sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==", - "dev": true, - "optional": true, - "dependencies": { - "normalize-path": "^3.0.0", - "picomatch": "^2.0.4" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/babel-plugin-dynamic-import-node": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/babel-plugin-dynamic-import-node/-/babel-plugin-dynamic-import-node-2.3.3.tgz", - "integrity": "sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==", - "dev": true, - "dependencies": { - "object.assign": "^4.1.0" - } - }, - "node_modules/babel-plugin-polyfill-corejs2": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.2.2.tgz", - "integrity": "sha512-kISrENsJ0z5dNPq5eRvcctITNHYXWOA4DUZRFYCz3jYCcvTb/A546LIddmoGNMVYg2U38OyFeNosQwI9ENTqIQ==", - "dev": true, - "dependencies": { - "@babel/compat-data": "^7.13.11", - "@babel/helper-define-polyfill-provider": "^0.2.2", - "semver": "^6.1.1" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/babel-plugin-polyfill-corejs2/node_modules/semver": { - "version": "6.3.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", - "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/babel-plugin-polyfill-corejs3": { - "version": "0.2.4", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.2.4.tgz", - "integrity": "sha512-z3HnJE5TY/j4EFEa/qpQMSbcUJZ5JQi+3UFjXzn6pQCmIKc5Ug5j98SuYyH+m4xQnvKlMDIW4plLfgyVnd0IcQ==", - "dev": true, - "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.2.2", - "core-js-compat": "^3.14.0" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/babel-plugin-polyfill-regenerator": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.2.2.tgz", - "integrity": "sha512-Goy5ghsc21HgPDFtzRkSirpZVW35meGoTmTOb2bxqdl60ghub4xOidgNTHaZfQ2FaxQsKmwvXtOAkcIS4SMBWg==", - "dev": true, - "dependencies": { - "@babel/helper-define-polyfill-provider": "^0.2.2" - }, - "peerDependencies": { - "@babel/core": "^7.0.0-0" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/binary-extensions": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.2.0.tgz", - "integrity": "sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==", - "dev": true, - "optional": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "optional": true, - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browserslist": { - "version": "4.17.0", - "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.17.0.tgz", - "integrity": "sha512-g2BJ2a0nEYvEFQC208q8mVAhfNwpZ5Mu8BwgtCdZKO3qx98HChmeg448fPdUzld8aFmfLgVh7yymqV+q1lJZ5g==", - "dev": true, - "dependencies": { - "caniuse-lite": "^1.0.30001254", - "colorette": "^1.3.0", - "electron-to-chromium": "^1.3.830", - "escalade": "^3.1.1", - "node-releases": "^1.1.75" - }, - "bin": { - "browserslist": "cli.js" - }, - "engines": { - "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - } - }, - "node_modules/call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/caniuse-lite": { - "version": "1.0.30001259", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001259.tgz", - "integrity": "sha512-V7mQTFhjITxuk9zBpI6nYsiTXhcPe05l+364nZjK7MFK/E7ibvYBSAXr4YcA6oPR8j3ZLM/LN+lUqUVAQEUZFg==", - "dev": true, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/browserslist" - } - }, - "node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/chokidar": { - "version": "3.5.2", - "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.2.tgz", - "integrity": "sha512-ekGhOnNVPgT77r4K/U3GDhu+FQ2S8TnK/s2KbIGXi0SZWuwkZ2QNyfWdZW+TVfn84DpEP7rLeCt2UI6bJ8GwbQ==", - "dev": true, - "optional": true, - "dependencies": { - "anymatch": "~3.1.2", - "braces": "~3.0.2", - "glob-parent": "~5.1.2", - "is-binary-path": "~2.1.0", - "is-glob": "~4.0.1", - "normalize-path": "~3.0.0", - "readdirp": "~3.6.0" - }, - "engines": { - "node": ">= 8.10.0" - }, - "optionalDependencies": { - "fsevents": "~2.3.2" - } - }, - "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", - "dev": true - }, - "node_modules/colorette": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", - "integrity": "sha512-Y2oEozpomLn7Q3HFP7dpww7AtMJplbM9lGZP6RDfHqmbeRjiwRg4n6VM6j4KLmRke85uWEI7JqF17f3pqdRA0g==", - "dev": true - }, - "node_modules/commander": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", - "integrity": "sha512-NOKm8xhkzAjzFx8B2v5OAHT+u5pRQc2UCa2Vq9jYL/31o2wi9mxBA7LIFs3sV5VSC49z6pEhfbMULvShKj26WA==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", - "dev": true - }, - "node_modules/convert-source-map": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.8.0.tgz", - "integrity": "sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.1" - } - }, - "node_modules/core-js-compat": { - "version": "3.18.0", - "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.18.0.tgz", - "integrity": "sha512-tRVjOJu4PxdXjRMEgbP7lqWy1TWJu9a01oBkn8d+dNrhgmBwdTkzhHZpVJnEmhISLdoJI1lX08rcBcHi3TZIWg==", - "dev": true, - "dependencies": { - "browserslist": "^4.17.0", - "semver": "7.0.0" - }, - "funding": { - "type": "opencollective", - "url": "https://opencollective.com/core-js" - } - }, - "node_modules/core-js-compat/node_modules/semver": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.0.0.tgz", - "integrity": "sha512-+GB6zVA9LWh6zovYQLALHwv5rb2PHGlJi3lfiqIHxR0uuwCgefcOJc59v9fv1w8GbStwxuuqqAjI9NMAOOgq1A==", - "dev": true, - "bin": { - "semver": "bin/semver.js" - } - }, - "node_modules/debug": { - "version": "4.3.2", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.2.tgz", - "integrity": "sha512-mOp8wKcvj7XxC78zLgw/ZA+6TSgkoE2C/ienthhRD298T7UNwAg9diBpLRxC0mOezLl4B0xV7M0cCO6P/O0Xhw==", - "dev": true, - "dependencies": { - "ms": "2.1.2" - }, - "engines": { - "node": ">=6.0" - }, - "peerDependenciesMeta": { - "supports-color": { - "optional": true - } - } - }, - "node_modules/define-properties": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", - "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, - "dependencies": { - "object-keys": "^1.0.12" - }, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/electron-to-chromium": { - "version": "1.3.845", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.845.tgz", - "integrity": "sha512-y0RorqmExFDI4RjLEC6j365bIT5UAXf9WIRcknvSFHVhbC/dRnCgJnPA3DUUW6SCC85QGKEafgqcHJ6uPdEP1Q==", - "dev": true - }, - "node_modules/escalade": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "optional": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/fs-readdir-recursive": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fs-readdir-recursive/-/fs-readdir-recursive-1.1.0.tgz", - "integrity": "sha512-GNanXlVr2pf02+sPN40XN8HG+ePaNcvM0q5mZBd668Obwb0yD5GiUbZOFgwn8kGMY6I3mdyDJzieUy3PTYyTRA==", - "dev": true - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", - "dev": true - }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "node_modules/gensync": { - "version": "1.0.0-beta.2", - "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", - "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", - "dev": true, - "engines": { - "node": ">=6.9.0" - } - }, - "node_modules/get-intrinsic": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", - "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", - "deprecated": "Glob versions prior to v9 are no longer supported", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/glob-parent": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.2.tgz", - "integrity": "sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==", - "dev": true, - "optional": true, - "dependencies": { - "is-glob": "^4.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/globals": { - "version": "11.12.0", - "resolved": "https://registry.npmjs.org/globals/-/globals-11.12.0.tgz", - "integrity": "sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/has-symbols": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", - "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", - "deprecated": "This module is not supported, and leaks memory. Do not use it. Check out lru-cache if you want a good and tested way to coalesce async requests by a key value, which is much more comprehensive and powerful.", - "dev": true, - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "node_modules/is-binary-path": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", - "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", - "dev": true, - "optional": true, - "dependencies": { - "binary-extensions": "^2.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/is-core-module": { - "version": "2.6.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.6.0.tgz", - "integrity": "sha512-wShG8vs60jKfPWpF2KZRaAtvt3a20OAn7+IJ6hLPECpSABLcKtFKTTI4ZtH5QcBruBHlq+WsdHWyz0BCZW7svQ==", - "dev": true, - "dependencies": { - "has": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", - "dev": true, - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-glob": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", - "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", - "dev": true, - "optional": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "optional": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/js-tokens": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", - "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", - "dev": true - }, - "node_modules/jsesc": { - "version": "2.5.2", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-2.5.2.tgz", - "integrity": "sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==", - "dev": true, - "bin": { - "jsesc": "bin/jsesc" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/json5": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.0.tgz", - "integrity": "sha512-f+8cldu7X/y7RAJurMEJmdoKXGB/X550w2Nr3tTbezL6RwEE/iMcm+tZnXeoZtKuOq6ft8+CqzEkrIgx1fPoQA==", - "dev": true, - "dependencies": { - "minimist": "^1.2.5" - }, - "bin": { - "json5": "lib/cli.js" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/lodash.debounce": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz", - "integrity": "sha1-gteb/zCmfEAF/9XiUVMArZyk168=", - "dev": true - }, - "node_modules/make-dir": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-2.1.0.tgz", - "integrity": "sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==", - "dev": true, - "dependencies": { - "pify": "^4.0.1", - "semver": "^5.6.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/minimatch": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", - "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minimist": { - "version": "1.2.5", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", - "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", - "dev": true - }, - "node_modules/ms": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", - "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", - "dev": true - }, - "node_modules/node-releases": { - "version": "1.1.76", - "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-1.1.76.tgz", - "integrity": "sha512-9/IECtNr8dXNmPWmFXepT0/7o5eolGesHUa3mtr0KlgnCvnZxwh2qensKL42JJY2vQKC3nIBXetFAqR+PW1CmA==", - "dev": true - }, - "node_modules/normalize-path": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", - "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", - "dev": true, - "optional": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object-keys": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true, - "engines": { - "node": ">= 0.4" - } - }, - "node_modules/object.assign": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", - "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.0", - "define-properties": "^1.1.3", - "has-symbols": "^1.0.1", - "object-keys": "^1.1.1" - }, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", - "dev": true, - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "node_modules/picomatch": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.0.tgz", - "integrity": "sha512-lY1Q/PiJGC2zOv/z391WOTD+Z02bCgsFfvxoXXf6h7kv9o+WmsmzYqrAwY63sNgOxE4xEdq0WyUnXfKeBrSvYw==", - "dev": true, - "optional": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pify": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz", - "integrity": "sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/readdirp": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", - "integrity": "sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==", - "dev": true, - "optional": true, - "dependencies": { - "picomatch": "^2.2.1" - }, - "engines": { - "node": ">=8.10.0" - } - }, - "node_modules/regenerate": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", - "integrity": "sha512-zrceR/XhGYU/d/opr2EKO7aRHUeiBI8qjtfHqADTwZd6Szfy16la6kqD0MIUs5z5hx6AaKa+PixpPrR289+I0A==", - "dev": true - }, - "node_modules/regenerate-unicode-properties": { - "version": "9.0.0", - "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-9.0.0.tgz", - "integrity": "sha512-3E12UeNSPfjrgwjkR81m5J7Aw/T55Tu7nUyZVQYCKEOs+2dkxEY+DpPtZzO4YruuiPb7NkYLVcyJC4+zCbk5pA==", - "dev": true, - "dependencies": { - "regenerate": "^1.4.2" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/regenerator-runtime": { - "version": "0.13.9", - "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.13.9.tgz", - "integrity": "sha512-p3VT+cOEgxFsRRA9X4lkI1E+k2/CtnKtU4gcxyaCUreilL/vqI6CdZ3wxVUx3UOUg+gnUOQQcRI7BmSI656MYA==", - "dev": true - }, - "node_modules/regenerator-transform": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.14.5.tgz", - "integrity": "sha512-eOf6vka5IO151Jfsw2NO9WpGX58W6wWmefK3I1zEGr0lOD0u8rwPaNqQL1aRxUaxLeKO3ArNh3VYg1KbaD+FFw==", - "dev": true, - "dependencies": { - "@babel/runtime": "^7.8.4" - } - }, - "node_modules/regexpu-core": { - "version": "4.8.0", - "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-4.8.0.tgz", - "integrity": "sha512-1F6bYsoYiz6is+oz70NWur2Vlh9KWtswuRuzJOfeYUrfPX2o8n74AnUVaOGDbUqVGO9fNHu48/pjJO4sNVwsOg==", - "dev": true, - "dependencies": { - "regenerate": "^1.4.2", - "regenerate-unicode-properties": "^9.0.0", - "regjsgen": "^0.5.2", - "regjsparser": "^0.7.0", - "unicode-match-property-ecmascript": "^2.0.0", - "unicode-match-property-value-ecmascript": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/regjsgen": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.2.tgz", - "integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A==", - "dev": true - }, - "node_modules/regjsparser": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.7.0.tgz", - "integrity": "sha512-A4pcaORqmNMDVwUjWoTzuhwMGpP+NykpfqAsEgI1FSH/EzC7lrN5TMd+kN8YCovX+jMpu8eaqXgXPCa0g8FQNQ==", - "dev": true, - "dependencies": { - "jsesc": "~0.5.0" - }, - "bin": { - "regjsparser": "bin/parser" - } - }, - "node_modules/regjsparser/node_modules/jsesc": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-0.5.0.tgz", - "integrity": "sha1-597mbjXW/Bb3EP6R1c9p9w8IkR0=", - "dev": true, - "bin": { - "jsesc": "bin/jsesc" - } - }, - "node_modules/resolve": { - "version": "1.20.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.20.0.tgz", - "integrity": "sha512-wENBPt4ySzg4ybFQW2TT1zMQucPK95HSh/nq2CFTZVOGut2+pQvSsgtda4d26YrYcr067wjbmzOG8byDPBX63A==", - "dev": true, - "dependencies": { - "is-core-module": "^2.2.0", - "path-parse": "^1.0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/slash": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/slash/-/slash-2.0.0.tgz", - "integrity": "sha512-ZYKh3Wh2z1PpEXWr0MpSBZ0V6mZHAQfYevttO11c51CaWjGTaadiKZ+wVt1PbMlDV5qhMFslpZCemhwOK7C89A==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, "node_modules/tinybench": { "version": "4.0.1", "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-4.0.1.tgz", @@ -2504,86 +24,6 @@ "engines": { "node": ">=18.0.0" } - }, - "node_modules/to-fast-properties": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/to-fast-properties/-/to-fast-properties-2.0.0.tgz", - "integrity": "sha1-3F5pjL0HkmW8c+A3doGk5Og/YW4=", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "optional": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/uglify-js": { - "version": "3.14.2", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.14.2.tgz", - "integrity": "sha512-rtPMlmcO4agTUfz10CbgJ1k6UAoXM2gWb3GoMPPZB/+/Ackf8lNWk11K4rYi2D0apgoFRLtQOZhb+/iGNJq26A==", - "dev": true, - "bin": { - "uglifyjs": "bin/uglifyjs" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/unicode-canonical-property-names-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", - "integrity": "sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/unicode-match-property-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-ecmascript/-/unicode-match-property-ecmascript-2.0.0.tgz", - "integrity": "sha512-5kaZCrbp5mmbz5ulBkDkbY0SsPOjKqVS35VpL9ulMPfSl0J0Xsm+9Evphv9CoIZFwre7aJoa94AY6seMKGVN5Q==", - "dev": true, - "dependencies": { - "unicode-canonical-property-names-ecmascript": "^2.0.0", - "unicode-property-aliases-ecmascript": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/unicode-match-property-value-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.0.0.tgz", - "integrity": "sha512-7Yhkc0Ye+t4PNYzOGKedDhXbYIBe1XEQYQxOPyhcXNMJ0WCABqqj6ckydd6pWRZTHV4GuCPKdBAUiMc60tsKVw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/unicode-property-aliases-ecmascript": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.0.0.tgz", - "integrity": "sha512-5Zfuy9q/DFr4tfO7ZPeVXb1aPoeQSdeFMLpYuFebehDAhbuevLs5yxSZmIFN1tP5F9Wl4IpJrYojg85/zgyZHQ==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", - "dev": true } } } diff --git a/package.json b/package.json index 8664071..aaf4a56 100644 --- a/package.json +++ b/package.json @@ -19,19 +19,14 @@ "type": "module", "main": "lib/dateformat.js", "devDependencies": { - "@babel/cli": "^7.14.8", - "@babel/core": "^7.15.0", - "@babel/preset-env": "^7.15.0", - "tinybench": "^4.0.1", - "uglify-js": "^3.14.1" + "tinybench": "^4.0.1" }, "engines": { "node": ">=12.20" }, "scripts": { - "build": "./node_modules/.bin/babel src --out-dir lib && uglifyjs lib/dateformat.js -o lib/dateformat.js", - "test": "npm run build && node --test", - "benchmark": "npm run build && node ./benchmark/benchmark.js" + "test": "node --test", + "benchmark": "node ./benchmark/benchmark.js" }, "repository": { "type": "git", From 342872593a738ba3c891bbc3a691b84d427a80f5 Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Fri, 1 Aug 2025 10:16:38 +0200 Subject: [PATCH 13/29] dont create package-lock --- .npmrc | 1 + 1 file changed, 1 insertion(+) create mode 100644 .npmrc diff --git a/.npmrc b/.npmrc new file mode 100644 index 0000000..43c97e7 --- /dev/null +++ b/.npmrc @@ -0,0 +1 @@ +package-lock=false From 8874c7e6bf05aa24b011fff95812267c3a791f5f Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Fri, 1 Aug 2025 10:44:10 +0200 Subject: [PATCH 14/29] restructure ignore files --- .gitignore | 1 - .npmignore | 7 ------- benchmark/benchmark.js | 2 +- {src => lib}/dateformat.js | 0 4 files changed, 1 insertion(+), 9 deletions(-) delete mode 100644 .npmignore rename {src => lib}/dateformat.js (100%) diff --git a/.gitignore b/.gitignore index 6243fef..d3261a3 100644 --- a/.gitignore +++ b/.gitignore @@ -14,7 +14,6 @@ vendor build dest dist -lib lib-cov coverage nbproject diff --git a/.npmignore b/.npmignore deleted file mode 100644 index d14ccce..0000000 --- a/.npmignore +++ /dev/null @@ -1,7 +0,0 @@ -test -.travis.yml -benchmark -CONTRIBUTING.md -src -.gitignore -babel.config.json \ No newline at end of file diff --git a/benchmark/benchmark.js b/benchmark/benchmark.js index aaa6098..0b1e2b5 100644 --- a/benchmark/benchmark.js +++ b/benchmark/benchmark.js @@ -1,5 +1,5 @@ import { Bench } from "tinybench" -import dateFormat from "../src/dateformat.js"; +import dateFormat from "../lib/dateformat.js"; const masks = [ "d", diff --git a/src/dateformat.js b/lib/dateformat.js similarity index 100% rename from src/dateformat.js rename to lib/dateformat.js From 4508d41cc037aa12922a6fc4031809d7deda49cb Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Fri, 1 Aug 2025 12:04:54 +0200 Subject: [PATCH 15/29] improve --- benchmark/previousDateFormat.js | 418 -------------------------------- lib/dateformat.js | 61 +++-- 2 files changed, 39 insertions(+), 440 deletions(-) delete mode 100644 benchmark/previousDateFormat.js diff --git a/benchmark/previousDateFormat.js b/benchmark/previousDateFormat.js deleted file mode 100644 index 7ac918b..0000000 --- a/benchmark/previousDateFormat.js +++ /dev/null @@ -1,418 +0,0 @@ -"use strict"; - -function _typeof(obj) { - "@babel/helpers - typeof"; - if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { - _typeof = function _typeof(obj) { - return typeof obj; - }; - } else { - _typeof = function _typeof(obj) { - return obj && - typeof Symbol === "function" && - obj.constructor === Symbol && - obj !== Symbol.prototype - ? "symbol" - : typeof obj; - }; - } - return _typeof(obj); -} - -/* - * Date Format 1.2.3 - * (c) 2007-2009 Steven Levithan - * MIT license - * - * Includes enhancements by Scott Trenda - * and Kris Kowal - * - * Accepts a date, a mask, or a date and a mask. - * Returns a formatted version of the given date. - * The date defaults to the current date/time. - * The mask defaults to dateFormat.masks.default. - */ -(function (global) { - "use strict"; - - var dateFormat = (function () { - var token = /d{1,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|[LlopSZWN]|"[^"]*"|'[^']*'/g; - var timezone = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g; - var timezoneClip = /[^-+\dA-Z]/g; // Regexes and supporting functions are cached through closure - - return function (date, mask, utc, gmt) { - // You can't provide utc if you skip other args (use the 'UTC:' mask prefix) - if ( - arguments.length === 1 && - kindOf(date) === "string" && - !/\d/.test(date) - ) { - mask = date; - date = undefined; - } - - date = date || new Date(); - - if (!(date instanceof Date)) { - date = new Date(date); - } - - if (isNaN(date)) { - throw TypeError("Invalid date"); - } - - mask = String( - dateFormat.masks[mask] || mask || dateFormat.masks["default"] - ); // Allow setting the utc/gmt argument via the mask - - var maskSlice = mask.slice(0, 4); - - if (maskSlice === "UTC:" || maskSlice === "GMT:") { - mask = mask.slice(4); - utc = true; - - if (maskSlice === "GMT:") { - gmt = true; - } - } - - var _ = function _() { - return utc ? "getUTC" : "get"; - }; - - var _d = function d() { - return date[_() + "Date"](); - }; - - var D = function D() { - return date[_() + "Day"](); - }; - - var _m = function m() { - return date[_() + "Month"](); - }; - - var y = function y() { - return date[_() + "FullYear"](); - }; - - var _H = function H() { - return date[_() + "Hours"](); - }; - - var _M = function M() { - return date[_() + "Minutes"](); - }; - - var _s = function s() { - return date[_() + "Seconds"](); - }; - - var _L = function L() { - return date[_() + "Milliseconds"](); - }; - - var _o = function o() { - return utc ? 0 : date.getTimezoneOffset(); - }; - - var _W = function W() { - return getWeek(date); - }; - - var _N = function N() { - return getDayOfWeek(date); - }; - - var flags = { - d: function d() { - return _d(); - }, - dd: function dd() { - return pad(_d()); - }, - ddd: function ddd() { - return dateFormat.i18n.dayNames[D()]; - }, - dddd: function dddd() { - return dateFormat.i18n.dayNames[D() + 7]; - }, - m: function m() { - return _m() + 1; - }, - mm: function mm() { - return pad(_m() + 1); - }, - mmm: function mmm() { - return dateFormat.i18n.monthNames[_m()]; - }, - mmmm: function mmmm() { - return dateFormat.i18n.monthNames[_m() + 12]; - }, - yy: function yy() { - return String(y()).slice(2); - }, - yyyy: function yyyy() { - return y(); - }, - h: function h() { - return _H() % 12 || 12; - }, - hh: function hh() { - return pad(_H() % 12 || 12); - }, - H: function H() { - return _H(); - }, - HH: function HH() { - return pad(_H()); - }, - M: function M() { - return _M(); - }, - MM: function MM() { - return pad(_M()); - }, - s: function s() { - return _s(); - }, - ss: function ss() { - return pad(_s()); - }, - l: function l() { - return pad(_L(), 3); - }, - L: function L() { - return pad(Math.round(_L() / 10)); - }, - t: function t() { - return _H() < 12 - ? dateFormat.i18n.timeNames[0] - : dateFormat.i18n.timeNames[1]; - }, - tt: function tt() { - return _H() < 12 - ? dateFormat.i18n.timeNames[2] - : dateFormat.i18n.timeNames[3]; - }, - T: function T() { - return _H() < 12 - ? dateFormat.i18n.timeNames[4] - : dateFormat.i18n.timeNames[5]; - }, - TT: function TT() { - return _H() < 12 - ? dateFormat.i18n.timeNames[6] - : dateFormat.i18n.timeNames[7]; - }, - Z: function Z() { - return gmt - ? "GMT" - : utc - ? "UTC" - : (String(date).match(timezone) || [""]) - .pop() - .replace(timezoneClip, "") - .replace(/GMT\+0000/g, "UTC"); - }, - o: function o() { - return ( - (_o() > 0 ? "-" : "+") + - pad( - Math.floor(Math.abs(_o()) / 60) * 100 + (Math.abs(_o()) % 60), - 4 - ) - ); - }, - p: function p() { - return ( - (_o() > 0 ? "-" : "+") + - pad(Math.floor(Math.abs(_o()) / 60), 2) + - ':' + - pad(Math.floor(Math.abs(_o()) % 60), 2) - ); - }, - S: function S() { - return ["th", "st", "nd", "rd"][ - _d() % 10 > 3 ? 0 : (((_d() % 100) - (_d() % 10) != 10) * _d()) % 10 - ]; - }, - W: function W() { - return _W(); - }, - N: function N() { - return _N(); - }, - }; - return mask.replace(token, function (match) { - if (match in flags) { - return flags[match](); - } - - return match.slice(1, match.length - 1); - }); - }; - })(); - - dateFormat.masks = { - default: "ddd mmm dd yyyy HH:MM:ss", - shortDate: "m/d/yy", - mediumDate: "mmm d, yyyy", - longDate: "mmmm d, yyyy", - fullDate: "dddd, mmmm d, yyyy", - shortTime: "h:MM TT", - mediumTime: "h:MM:ss TT", - longTime: "h:MM:ss TT Z", - isoDate: "yyyy-mm-dd", - isoTime: "HH:MM:ss", - isoDateTime: "yyyy-mm-dd'T'HH:MM:sso", - isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'", - expiresHeaderFormat: "ddd, dd mmm yyyy HH:MM:ss Z", - }; // Internationalization strings - - dateFormat.i18n = { - dayNames: [ - "Sun", - "Mon", - "Tue", - "Wed", - "Thu", - "Fri", - "Sat", - "Sunday", - "Monday", - "Tuesday", - "Wednesday", - "Thursday", - "Friday", - "Saturday", - ], - monthNames: [ - "Jan", - "Feb", - "Mar", - "Apr", - "May", - "Jun", - "Jul", - "Aug", - "Sep", - "Oct", - "Nov", - "Dec", - "January", - "February", - "March", - "April", - "May", - "June", - "July", - "August", - "September", - "October", - "November", - "December", - ], - timeNames: ["a", "p", "am", "pm", "A", "P", "AM", "PM"], - }; - - function pad(val, len) { - val = String(val); - len = len || 2; - - while (val.length < len) { - val = "0" + val; - } - - return val; - } - /** - * Get the ISO 8601 week number - * Based on comments from - * http://techblog.procurios.nl/k/n618/news/view/33796/14863/Calculate-ISO-8601-week-and-year-in-javascript.html - * - * @param {Object} `date` - * @return {Number} - */ - - function getWeek(date) { - // Remove time components of date - var targetThursday = new Date( - date.getFullYear(), - date.getMonth(), - date.getDate() - ); // Change date to Thursday same week - - targetThursday.setDate( - targetThursday.getDate() - ((targetThursday.getDay() + 6) % 7) + 3 - ); // Take January 4th as it is always in week 1 (see ISO 8601) - - var firstThursday = new Date(targetThursday.getFullYear(), 0, 4); // Change date to Thursday same week - - firstThursday.setDate( - firstThursday.getDate() - ((firstThursday.getDay() + 6) % 7) + 3 - ); // Check if daylight-saving-time-switch occurred and correct for it - - var ds = - targetThursday.getTimezoneOffset() - firstThursday.getTimezoneOffset(); - targetThursday.setHours(targetThursday.getHours() - ds); // Number of weeks between target Thursday and first Thursday - - var weekDiff = (targetThursday - firstThursday) / (86400000 * 7); - return 1 + Math.floor(weekDiff); - } - /** - * Get ISO-8601 numeric representation of the day of the week - * 1 (for Monday) through 7 (for Sunday) - * - * @param {Object} `date` - * @return {Number} - */ - - function getDayOfWeek(date) { - var dow = date.getDay(); - - if (dow === 0) { - dow = 7; - } - - return dow; - } - /** - * kind-of shortcut - * @param {*} val - * @return {String} - */ - - function kindOf(val) { - if (val === null) { - return "null"; - } - - if (val === undefined) { - return "undefined"; - } - - if (_typeof(val) !== "object") { - return _typeof(val); - } - - if (Array.isArray(val)) { - return "array"; - } - - return {}.toString.call(val).slice(8, -1).toLowerCase(); - } - - if (typeof define === "function" && define.amd) { - define(function () { - return dateFormat; - }); - } else if ( - (typeof exports === "undefined" ? "undefined" : _typeof(exports)) === - "object" - ) { - module.exports = dateFormat; - } else { - global.dateFormat = dateFormat; - } -})(void 0); diff --git a/lib/dateformat.js b/lib/dateformat.js index ea13efe..0584465 100644 --- a/lib/dateformat.js +++ b/lib/dateformat.js @@ -1,4 +1,5 @@ // @ts-check +'use strict'; /* * Date Format 1.2.3 @@ -12,9 +13,9 @@ * Returns a formatted version of the given date. * The date defaults to the current date/time. * The mask defaults to masks.default. - */ +*/ -// Regexes and supporting functions are cached through closure +const hasNoNumberRE = /^[^\d]+$/; const token = /d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g; const timezone = /\b(?:[A-Z]{1,3}[A-Z][TC])(?:[-+]\d{4})?|((?:Australian )?(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time)\b/g; const timezoneClip = /[^-+\dA-Z]/g; @@ -43,6 +44,14 @@ const GMT_FNS = { getTimezoneOffset: Date.prototype.getTimezoneOffset.call.bind(Date.prototype.getTimezoneOffset), } +const microsecondsPerWeek = 604800000; // 7 days * 24 hours * 60 minutes * 60 seconds * 1000 milliseconds + +/** + * @param {number} value + * @returns {number} + */ +const abs = (value) => (value ^ (value >> 31)) - (value >> 31) + /** * @param {string | number | Date} date * @param {string} mask @@ -54,24 +63,26 @@ export default function dateFormat(date, mask, utc, gmt) { if ( arguments.length === 1 && typeof date === "string" && - !/\d/.test(date) + hasNoNumberRE.test(date) ) { mask = date; - date = undefined; - } - - date = date || date === 0 ? date : new Date(); - - if (!(date instanceof Date)) { - date = new Date(date); - } + date = new Date(); + } else { + if (date || date === 0) { + if (!(date instanceof Date)) { + date = new Date(date); + } - if (isNaN(date)) { - throw TypeError("Invalid date"); + if (Number.isNaN(date.getTime())) { + throw TypeError("Invalid date"); + } + } else { + date = new Date(); + } } if (mask) { - if (maskNames.includes(/** @type {typeof maskNames[number]} */ (mask))) { + if (maskNames.includes(/** @type {typeof maskNames[number]} */(mask))) { if (mask === 'isoUtcDateTime') { utc = true; } @@ -175,14 +186,14 @@ export default function dateFormat(date, mask, utc, gmt) { o: () => { const timezoneOffset = o(); return (timezoneOffset > 0 ? "-" : "+") + - PAD_4[Math.floor(Math.abs(timezoneOffset) / 60) * 100 + (Math.abs(timezoneOffset) % 60)] + PAD_4[abs((timezoneOffset) / 60) * 100 + (abs(timezoneOffset) % 60)] }, p: () => { const timezoneOffset = o(); return (timezoneOffset > 0 ? "-" : "+") + - PAD_2[Math.floor(Math.abs(timezoneOffset) / 60)] + - ":" + - PAD_2[Math.floor(Math.abs(timezoneOffset) % 60)]; + PAD_2[abs((timezoneOffset) / 60)] + + ":" + + PAD_2[abs((timezoneOffset) % 60)]; }, S: () => { return daySuffix[d()] }, W: W, @@ -291,10 +302,16 @@ const MILLISECONDS_L = new Array(1e3).fill(0).map((_, i) => String(i).padStart(3 /** * Get day name * Yesterday, Today, Tomorrow if the date lies within, else fallback to Monday - Sunday - * @param {Object} + * @param {Object} options + * @param {number} options.y - Year + * @param {number} options.m - Month (0-11) + * @param {number} options.d - Day of the month (1-31) + * @param {Object} options._ - Date functions (getDate, getMonth, getFullYear) + * @param {function} options.D - Function to get the day of the week (0-6) + * @param {boolean} options.short - Whether to return short names (Tdy, Ysd, Tmw) * @return {String} */ -const getDayName = ({ y, m, d, _, D, short = false }) => { +const getDayName = ({ y, m, d, _, D, short}) => { const referenceDate = new Date(); if ( @@ -382,8 +399,8 @@ const getWeek = (date) => { targetThursday.setHours(targetThursday.getHours() - ds); // Number of weeks between target Thursday and first Thursday - const weekDiff = (targetThursday - firstThursday) / (86400000 * 7); - return 1 + Math.floor(weekDiff); + const weekDiff = (targetThursday.getTime() - firstThursday.getTime()) / microsecondsPerWeek; + return 1 + ~~(weekDiff); }; const dayOfWeekLookup = [7, 1, 2, 3, 4, 5, 6]; From 12368b4b5988f3898779b01e3b724ace1374863d Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Fri, 1 Aug 2025 12:25:08 +0200 Subject: [PATCH 16/29] improve --- Readme.md | 10 ++++++++-- lib/dateformat.js | 31 ++++++++++++++++--------------- 2 files changed, 24 insertions(+), 17 deletions(-) diff --git a/Readme.md b/Readme.md index d2245a2..f549381 100644 --- a/Readme.md +++ b/Readme.md @@ -139,7 +139,7 @@ passing an object with the necessary strings. For example: ```js import { i18n } from "dateformat"; -i18n.dayNames = [ +i18n.dayNamesShort = [ "Sun", "Mon", "Tue", @@ -147,6 +147,9 @@ i18n.dayNames = [ "Thu", "Fri", "Sat", +]; + +i18n.dayNamesLong = [ "Sunday", "Monday", "Tuesday", @@ -156,7 +159,7 @@ i18n.dayNames = [ "Saturday", ]; -i18n.monthNames = [ +i18n.monthNamesShort = [ "Jan", "Feb", "Mar", @@ -169,6 +172,9 @@ i18n.monthNames = [ "Oct", "Nov", "Dec", +]; + +i18n.monthNamesLong = [ "January", "February", "March", diff --git a/lib/dateformat.js b/lib/dateformat.js index 0584465..756fa39 100644 --- a/lib/dateformat.js +++ b/lib/dateformat.js @@ -60,25 +60,26 @@ const abs = (value) => (value ^ (value >> 31)) - (value >> 31) */ export default function dateFormat(date, mask, utc, gmt) { // You can't provide utc if you skip other args (use the 'UTC:' mask prefix) - if ( - arguments.length === 1 && - typeof date === "string" && - hasNoNumberRE.test(date) - ) { - mask = date; - date = new Date(); - } else { - if (date || date === 0) { - if (!(date instanceof Date)) { - date = new Date(date); - } + if (date instanceof Date) { + if (Number.isNaN(date.getTime())) { + throw TypeError("Invalid date"); + } + } else if (date || date === 0) { + if ( + typeof date === "string" && + hasNoNumberRE.test(date) + ) { + mask = date; + date = new Date(); + } else { + date = new Date(date); if (Number.isNaN(date.getTime())) { throw TypeError("Invalid date"); } - } else { - date = new Date(); } + } else { + date = new Date(); } if (mask) { @@ -311,7 +312,7 @@ const MILLISECONDS_L = new Array(1e3).fill(0).map((_, i) => String(i).padStart(3 * @param {boolean} options.short - Whether to return short names (Tdy, Ysd, Tmw) * @return {String} */ -const getDayName = ({ y, m, d, _, D, short}) => { +const getDayName = ({ y, m, d, _, D, short }) => { const referenceDate = new Date(); if ( From 846b89116f5bbff92aa55bbafe312aec4ee3fc87 Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Fri, 1 Aug 2025 12:46:27 +0200 Subject: [PATCH 17/29] use set for maskName Check --- benchmark/benchmark.js | 1 + lib/dateformat.js | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/benchmark/benchmark.js b/benchmark/benchmark.js index 0b1e2b5..222b69c 100644 --- a/benchmark/benchmark.js +++ b/benchmark/benchmark.js @@ -11,6 +11,7 @@ const masks = [ "L", "yy", "yyyy", + "isoUtcDateTime", "shortDate", "fullDate", "longTime", diff --git a/lib/dateformat.js b/lib/dateformat.js index 756fa39..e54f292 100644 --- a/lib/dateformat.js +++ b/lib/dateformat.js @@ -83,7 +83,7 @@ export default function dateFormat(date, mask, utc, gmt) { } if (mask) { - if (maskNames.includes(/** @type {typeof maskNames[number]} */(mask))) { + if (maskNamesSet.has(/** @type {*} */ (mask))) { if (mask === 'isoUtcDateTime') { utc = true; } @@ -212,6 +212,9 @@ export default function dateFormat(date, mask, utc, gmt) { const maskNames = /** @type {const} */(['default', 'shortDate', 'paddedShortDate', 'mediumDate', 'longDate', 'fullDate', 'shortTime', 'mediumTime', 'longTime', 'isoDate', 'isoTime', 'isoDateTime', 'isoUtcDateTime', 'expiresHeaderFormat']); +/** @type {Set} */ +const maskNamesSet = new Set(maskNames); + export const masks = /** @type {Record} */ ({ default: "ddd mmm dd yyyy HH:MM:ss", shortDate: "m/d/yy", From bbdb0fe33c3972a83042ee49fb078cc37e8ad238 Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Fri, 1 Aug 2025 22:12:16 +0200 Subject: [PATCH 18/29] improve --- lib/dateformat.js | 55 +++++++++++++++++++++++++++++++++++++++++------ 1 file changed, 48 insertions(+), 7 deletions(-) diff --git a/lib/dateformat.js b/lib/dateformat.js index e54f292..1a2b207 100644 --- a/lib/dateformat.js +++ b/lib/dateformat.js @@ -52,6 +52,27 @@ const microsecondsPerWeek = 604800000; // 7 days * 24 hours * 60 minutes * 60 se */ const abs = (value) => (value ^ (value >> 31)) - (value >> 31) +const validFlags = /** @type {const} */ ([ + 'd', 'dd', 'ddd', 'dddd', 'DDD', 'DDDD', + 'm', 'mm', 'mmm', 'mmmm', + 'yy', 'yyyy', + 'h', 'hh', 'H', 'HH', + 'M', 'MM', + 's', 'ss', + 'l', 'L', + 't', 'tt', 'T', 'TT', + 'Z', + 'o', // timezone offset + 'p', // timezone offset with colon + 'S', // day suffix + 'W', // ISO week number + 'WW', // ISO week number padded + 'N' // ISO day of the week +]); + +/** @type {Set} */ +const validFlagsSet = new Set(validFlags); + /** * @param {string | number | Date} date * @param {string} mask @@ -87,7 +108,6 @@ export default function dateFormat(date, mask, utc, gmt) { if (mask === 'isoUtcDateTime') { utc = true; } - mask = masks[mask] } else { // Allow setting the utc/gmt argument via the mask if (mask[3] === ":") { @@ -125,6 +145,7 @@ export default function dateFormat(date, mask, utc, gmt) { const W = () => getWeek(date); const N = () => getDayOfWeek(date); + /** @type {Record string>} */ const flags = { d: () => NO_PAD[d()], dd: () => PAD_2[d()], @@ -197,16 +218,19 @@ export default function dateFormat(date, mask, utc, gmt) { PAD_2[abs((timezoneOffset) % 60)]; }, S: () => { return daySuffix[d()] }, - W: W, + W: () => NO_PAD[W()], WW: () => PAD_2[W()], - N: N, + N: () => NO_PAD[N()], }; - return mask.replace(token, (match) => { - if (match in flags) { - return flags[match](); + if (masksFnsMap.has(mask)) { + return masksFnsMap.get(mask)(flags); + } + return mask.replace(token, (flag) => { + if (validFlagsSet.has(/** @type {*} */ (flag))) { + return flags[flag](); } - return match.slice(1, match.length - 1); + return flag.slice(1, flag.length - 1); }); } @@ -232,6 +256,23 @@ export const masks = /** @type {Record} */ ({ expiresHeaderFormat: "ddd, dd mmm yyyy HH:MM:ss Z", }); +/** @type {Map string>) => string>} */ +const masksFnsMap = new Map(); +masksFnsMap.set("default", ({ ddd, mmm, dd, yyyy, HH, MM, ss}) => `${ddd()} ${mmm()} ${dd()} ${yyyy()} ${HH()}:${MM()}:${ss()}`); +masksFnsMap.set("shortDate", ({m, d, yy}) => `${m()}/${d()}/${yy()}`); +masksFnsMap.set("paddedShortDate", ({mm, dd, yyyy}) => `${mm()}/${dd()}/${yyyy()}`); +masksFnsMap.set("mediumDate", ({ mmm, d, yyyy}) => `${mmm()} ${d()}, ${yyyy()}`); +masksFnsMap.set("longDate", ({mmmm, d, yyyy}) => `${mmmm()} ${d()}, ${yyyy()}`); +masksFnsMap.set("fullDate", ({dddd, mmmm, d,yyyy}) => `${dddd()}, ${mmmm()} ${d()}, ${yyyy()}`); +masksFnsMap.set("shortTime", ({h, MM, TT}) => `${h()}:${MM()} ${TT()}`); +masksFnsMap.set("mediumTime", ({h, MM, ss, TT}) => `${h()}:${MM()}:${ss()} ${TT()}`); +masksFnsMap.set("longTime", ({h, MM, ss, TT, Z}) => `${h()}:${MM()}:${ss()} ${TT()} ${Z()}`); +masksFnsMap.set("isoDate", ({yyyy, mm, dd}) => `${yyyy()}-${mm()}-${dd()}`); +masksFnsMap.set("isoTime", ({HH, MM, ss}) => `${HH()}:${MM()}:${ss()}`); +masksFnsMap.set("isoDateTime", ({yyyy, mm, dd, HH, MM, ss, o}) => `${yyyy()}-${mm()}-${dd()}T${HH()}:${MM()}:${ss()}${o()}`); +masksFnsMap.set("isoUtcDateTime", ({ yyyy, mm, dd, HH, MM, ss}) => `${yyyy()}-${mm()}-${dd()}T${HH()}:${MM()}:${ss()}Z`); +masksFnsMap.set("expiresHeaderFormat", ({dd, ddd, mmm, yyyy, HH, MM, ss, Z}) => `${ddd()}, ${dd()} ${mmm()} ${yyyy()} ${HH()}:${MM()}:${ss()} ${Z()}`); + // Internationalization strings export let i18n = /** @type {const} */ ({ dayNamesShort: [ From f13e9aee6c3fd216bf54b6b007c8f1d7c3231af2 Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Sun, 3 Aug 2025 14:15:24 +0200 Subject: [PATCH 19/29] add date-formatter --- benchmark/benchmark-dateformatter.js | 77 +++ date-formatter.js | 831 +++++++++++++++++++++++++++ lib/dateformat.js | 64 +-- 3 files changed, 934 insertions(+), 38 deletions(-) create mode 100644 benchmark/benchmark-dateformatter.js create mode 100644 date-formatter.js diff --git a/benchmark/benchmark-dateformatter.js b/benchmark/benchmark-dateformatter.js new file mode 100644 index 0000000..4f8621a --- /dev/null +++ b/benchmark/benchmark-dateformatter.js @@ -0,0 +1,77 @@ +import { Bench } from "tinybench" +import dateFormat from "../lib/dateformat.js"; +import { DateFormatter } from "../date-formatter.js" + +const masks = [ + "d", + "W", + "o", + "N", + "H", + "S", + "L", + "yy", + "yyyy", + "isoUtcDateTime", + "shortDate", + "fullDate", + "longTime", + "default", +]; + +const bench = new Bench({ name: 'simple benchmark', time: 100 }) + +masks.forEach((mask) => { + const date = new Date(); + bench.add(`dateformat ${mask}`, () => { + dateFormat(date, mask); + }); + + const dateFormatter = new DateFormatter(mask); + bench.add(`DateFormatter ${mask}`, () => { + dateFormatter.format(date); + }); +}); + +{ + const date = new Date(); + bench.add(`dateformat DDDD - today`, () => { + dateFormat(date, "DDDD"); + }); + + const dateFormatter = new DateFormatter("DDDD"); + bench.add(`DateFormatter DDDD - today`, () => { + dateFormatter.format(date); + }); +} + +{ + const date = new Date() + date.setDate(new Date().getDate() + 1); + bench.add(`dateformat DDDD - tomorrow`, () => { + dateFormat(date, "DDDD"); + }); + + const dateFormatter = new DateFormatter("DDDD"); + bench.add(`DateFormatter DDDD - tomorrow`, () => { + dateFormatter.format(date); + }); +} + +{ + const date = new Date() + date.setDate(new Date().getDate() - 1); + bench.add(`dateformat DDDD - yesterday`, () => { + dateFormat(date, "DDDD"); + }); + + const dateFormatter = new DateFormatter("DDDD"); + bench.add(`DateFormatter DDDD - yesterday`, () => { + dateFormatter.format(date); + }); +} + +await bench.run() + +console.log(bench.name) +console.table(bench.table()) diff --git a/date-formatter.js b/date-formatter.js new file mode 100644 index 0000000..16abc9c --- /dev/null +++ b/date-formatter.js @@ -0,0 +1,831 @@ +'use strict' + +const mask = "o" + +const microsecondsPerWeek = /** @type {const} */ (604800000); // 7 days * 24 hours * 60 minutes * 60 seconds * 1000 milliseconds + +/** + * @param {number} value + * @returns {number} + */ +const abs = (value) => (value ^ (value >> 31)) - (value >> 31) + + +const daySuffix = new Array(32).fill(0).map((_, i) => { + if (i === 1 || i === 21 || i === 31) { + return "st"; + } else if (i === 2 || i === 22) { + return "nd"; + } else if (i === 3 || i === 23) { + return "rd"; + } else { + return "th"; + } +}); + +const NO_PAD = new Array(1e3).fill(0).map((_, i) => String(i)); +const PAD_2 = new Array(1e2).fill(0).map((_, i) => String(i).padStart(2, '0')); +const PAD_3 = new Array(1e3).fill(0).map((_, i) => String(i).padStart(3, '0')); +const PAD_4 = new Array(1e4).fill(0).map((_, i) => String(i).padStart(4, '0')); + +const HOURS_H = new Array(24).fill(0).map((_, i) => String(i % 12 || 12)); +const HOURS_H_PAD = new Array(24).fill(0).map((_, i) => String(i % 12 || 12).padStart(2, '0')); +const MILLISECONDS_L = new Array(1e3).fill(0).map((_, i) => String(i).padStart(3, '0').slice(0, 2)); + +const TIMEZONE_OFFSET_O = new Map(); +const TIMEZONE_OFFSET_P = new Map(); + +for (let tzOffset = -720; tzOffset <= 840; tzOffset += 15) { + TIMEZONE_OFFSET_O.set(tzOffset, (tzOffset > 0 ? "-" : "+") + + PAD_2[abs((tzOffset) / 60)] + + PAD_2[abs((tzOffset) % 60)] + ) + + TIMEZONE_OFFSET_P.set(tzOffset, (tzOffset > 0 ? "-" : "+") + + PAD_2[abs((tzOffset) / 60)] + ":" + PAD_2[abs((tzOffset) % 60)]) +} + +const dayOfWeekLookup = /**@type {const} */(["7", "1", "2", "3", "4", "5", "6"]); + +/** + * @type {Map} + */ +const firstThursdays = new Map(); + +/** + * @type {(1|2|3|4|5|6|7)[]} + */ +const firstDaysOfWeekLookup = [1, 7, 6, 5, 4, 3, 2]; + +/** + * @type {(0|1|2|3|4|5|6)[]} + */ +const thursdaySameWeekLookup = [6, 0, 1, 2, 3, 4, 5]; + +/** + * Get the ISO 8601 week number + * Based on comments from + * http://techblog.procurios.nl/k/n618/news/view/33796/14863/Calculate-ISO-8601-week-and-year-in-javascript.html + * + * @param {Date} `date` + * @return {Number} + */ +const getWeek = (date) => { + const Y = date.getFullYear(); + const m = date.getMonth(); + const d = date.getDate(); + + // Remove time components of date + const targetThursday = new Date( + Y, + m, + d + ); + + // Change date to Thursday same week + targetThursday.setDate( + d - thursdaySameWeekLookup[targetThursday.getDay()] + 3 + ); + + let firstThursday = firstThursdays.get(Y); + if (!firstThursday) { + // Take January 4th as it is always in week 1 (see ISO 8601) + firstThursday = new Date(Y, 0, 4); + + // Change date to Thursday same week + firstThursday.setDate(firstDaysOfWeekLookup[firstThursday.getDay()]); + firstThursdays.set(Y, firstThursday); + } + + // Check if daylight-saving-time-switch occurred and correct for it + const ds = + targetThursday.getTimezoneOffset() - firstThursday.getTimezoneOffset(); + targetThursday.setHours(targetThursday.getHours() - ds); + + // Number of weeks between target Thursday and first Thursday + const weekDiff = (targetThursday.getTime() - firstThursday.getTime()) / microsecondsPerWeek; + return "" + (1 + ~~(weekDiff)); +}; + +/** + * Get day name + * Yesterday, Today, Tomorrow if the date lies within, else fallback to Monday - Sunday + * @param {Object} options + * @param {Date} options.date - The date + * @param {function} options.D - Function to get the day of the week (0-6) + * @param {boolean} options.short - Whether to return short names (Tdy, Ysd, Tmw) + * @return {String} + */ +const getDayName = ({ date, D, short }) => { + // Get the timestamp of the date in milliseconds, since epoch in UTC + const dateTimestamp = date.getTime(); + + // Get the timestamp of the beginning of today in UTC by using Date.UTC, + // We use the provided date's year, month, and date, and set hours, minutes, + // seconds and milliseconds to 0. + // We correct the timestamp by using the timezone offset of the provided date, to + // ensure we are comparing the timestamps with the same timezone-offset. + const localNow = new Date(); + const todayBeginTimestamp = Date.UTC( + localNow.getFullYear(), + localNow.getMonth(), + localNow.getDate() + ) - (localNow.getTimezoneOffset() * 60000); + + if (dateTimestamp >= todayBeginTimestamp) { + if (dateTimestamp < (todayBeginTimestamp + 86400000)) { // within 24 hours + return short ? 'Tdy' : 'Today'; + } else if (dateTimestamp < (todayBeginTimestamp + 172800000)) { // within 48 hours + return short ? 'Tmw' : 'Tomorrow'; + } + } else if (dateTimestamp > (todayBeginTimestamp - 86400000)) { // within the last 24 hours + return short ? 'Ysd' : 'Yesterday'; + } + + return short ? i18n.dayNamesShort[D()] : i18n.dayNamesLong[D()]; +}; + +const UTC_FNS = { + getDate: Date.prototype.getUTCDate.call.bind(Date.prototype.getUTCDate), + getDay: Date.prototype.getUTCDay.call.bind(Date.prototype.getUTCDay), + getMonth: Date.prototype.getUTCMonth.call.bind(Date.prototype.getUTCMonth), + getFullYear: Date.prototype.getUTCFullYear.call.bind(Date.prototype.getUTCFullYear), + getHours: Date.prototype.getUTCHours.call.bind(Date.prototype.getUTCHours), + getMinutes: Date.prototype.getUTCMinutes.call.bind(Date.prototype.getUTCMinutes), + getSeconds: Date.prototype.getUTCSeconds.call.bind(Date.prototype.getUTCSeconds), + getMilliseconds: Date.prototype.getUTCMilliseconds.call.bind(Date.prototype.getUTCMilliseconds), + getTimezoneOffset: () => 0, // UTC does not have a timezone offset +} + +const GMT_FNS = { + getDate: Date.prototype.getDate.call.bind(Date.prototype.getDate), + getDay: Date.prototype.getDay.call.bind(Date.prototype.getDay), + getMonth: Date.prototype.getMonth.call.bind(Date.prototype.getMonth), + getFullYear: Date.prototype.getFullYear.call.bind(Date.prototype.getFullYear), + getHours: Date.prototype.getHours.call.bind(Date.prototype.getHours), + getMinutes: Date.prototype.getMinutes.call.bind(Date.prototype.getMinutes), + getSeconds: Date.prototype.getSeconds.call.bind(Date.prototype.getSeconds), + getMilliseconds: Date.prototype.getUTCMilliseconds.call.bind(Date.prototype.getUTCMilliseconds), + getTimezoneOffset: Date.prototype.getTimezoneOffset.call.bind(Date.prototype.getTimezoneOffset), +} + +export class DateFormatter { + #tokenRE = /d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g; + + #mode = 'GMT'; + + #mask = ''; + + #fns = GMT_FNS; + #d = GMT_FNS.getDate; + #D = GMT_FNS.getDay; + #H = GMT_FNS.getHours; + #L = GMT_FNS.getMilliseconds; + #M = GMT_FNS.getMinutes; + #m = GMT_FNS.getMonth; + #o = GMT_FNS.getTimezoneOffset; + #s = GMT_FNS.getSeconds; + #yyyy = GMT_FNS.getFullYear; + + #tokenFns = []; + + i18n = /** @type {const} */ ({ + dayNamesShort: [ + "Sun", + "Mon", + "Tue", + "Wed", + "Thu", + "Fri", + "Sat", + ], + dayNamesLong: [ + "Sunday", + "Monday", + "Tuesday", + "Wednesday", + "Thursday", + "Friday", + "Saturday", + ], + monthNamesShort: [ + "Jan", + "Feb", + "Mar", + "Apr", + "May", + "Jun", + "Jul", + "Aug", + "Sep", + "Oct", + "Nov", + "Dec", + ], + monthNamesLong: [ + "January", + "February", + "March", + "April", + "May", + "June", + "July", + "August", + "September", + "October", + "November", + "December", + ], + timeNames: ["a", "p", "am", "pm", "A", "P", "AM", "PM"], + }) + + constructor(mask, mode = 'GMT') { + this.#mask = mask + + this.#mode = mode; + + if (this.#mode === 'UTC') { + this.#d = UTC_FNS.getDate; + this.#D = UTC_FNS.getDay; + this.#H = UTC_FNS.getHours; + this.#L = UTC_FNS.getMilliseconds; + this.#M = UTC_FNS.getMinutes; + this.#m = UTC_FNS.getMonth; + this.#o = UTC_FNS.getTimezoneOffset; + this.#s = UTC_FNS.getSeconds; + this.#yyyy = UTC_FNS.getFullYear; + this.#fns = UTC_FNS; + } + + this.#tokenize() + } + + #tokenize() { + let match + let pos = 0 + while ((match = this.#tokenRE.exec(this.#mask)) != null) { + if (pos !== match.index) { + const token = this.#mask.slice(pos, match.index); + this.#tokenFns.push(() => token); + } + switch (match[0]) { + case "d": + this.#tokenFns.push(this.d.bind(this)); + break; + case "dd": + this.#tokenFns.push(this.dd.bind(this)); + break; + case "ddd": + this.#tokenFns.push(this.ddd.bind(this)); + break; + case "dddd": + this.#tokenFns.push(this.dddd.bind(this)); + break; + case "DDD": + this.#tokenFns.push(this.DDD.bind(this)); + break; + case "DDDD": + this.#tokenFns.push(this.DDDD.bind(this)); + break; + case "h": + this.#tokenFns.push(this.h.bind(this)); + break; + case "hh": + this.#tokenFns.push(this.hh.bind(this)); + case "H": + this.#tokenFns.push(this.H.bind(this)); + break; + case "HH": + this.#tokenFns.push(this.HH.bind(this)); + break; + case "l": + this.#tokenFns.push(this.l.bind(this)); + break; + case "L": + this.#tokenFns.push(this.L.bind(this)); + break; + case "m": + this.#tokenFns.push(this.m.bind(this)); + break; + case "mm": + this.#tokenFns.push(this.mm.bind(this)); + break; + case "mmm": + this.#tokenFns.push(this.mmm.bind(this)); + break; + case "mmmm": + this.#tokenFns.push(this.mmmm.bind(this)); + break; + case "M": + this.#tokenFns.push(this.M.bind(this)); + break; + case "MM": + this.#tokenFns.push(this.MM.bind(this)); + break; + case "N": + this.#tokenFns.push(this.N.bind(this)); + break; + case "o": + this.#tokenFns.push(this.o.bind(this)); + break; + case "p": + this.#tokenFns.push(this.p.bind(this)); + break; + case "s": + this.#tokenFns.push(this.s.bind(this)); + break; + case "ss": + this.#tokenFns.push(this.ss.bind(this)); + break; + case "S": + this.#tokenFns.push(this.S.bind(this)); + break; + case "t": + this.#tokenFns.push(this.t.bind(this)); + break; + case "tt": + this.#tokenFns.push(this.tt.bind(this)); + break; + case "T": + this.#tokenFns.push(this.T.bind(this)); + break; + case "TT": + this.#tokenFns.push(this.TT.bind(this)); + break; + case "W": + this.#tokenFns.push(this.W.bind(this)); + break; + case "WW": + this.#tokenFns.push(this.WW.bind(this)); + break; + case "yy": + this.#tokenFns.push(this.yy.bind(this)); + break; + case "yyyy": + this.#tokenFns.push(this.yyyy.bind(this)); + break; + default: + if (match[0][0] === '\'' && match[0][match[0].length - 1] === '\'') { + const token = match[0].slice(1, -1); + this.#tokenFns.push(() => token); + break; + } + console.log("Unknown token:", match[0]); + } + pos = this.#tokenRE.lastIndex; + } + + if (pos !== this.#mask.length) { + const token = this.#mask.slice(pos); + this.#tokenFns.push(() => token); + } + } + + #validateDate(date) { + if (date instanceof Date) { + if (Number.isNaN(date.getTime())) { + throw TypeError("Invalid date"); + } + } else if (date || date === 0) { + date = new Date(date); + + if (Number.isNaN(date.getTime())) { + throw TypeError("Invalid date"); + } + } else { + date = new Date(); + } + + return date; + } + + /** + * @param {Date} date + * @returns {string} + */ + format(date) { + date = this.#validateDate(date); + + let result = ''; + + for (let i = 0; i < this.#tokenFns.length; ++i) { + result += this.#tokenFns[i](date); + } + + return result; + } + + /** + * Day of the month as digits; no leading zero for single-digit + * + * @param {Date} date + * @returns {'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'|'28'| + * '29'|'30'|'31'} + */ + d(date) { + return NO_PAD[this.#d(date)]; + } + + /** + * Day of the month as digits; leading zero for single-digit days. + * + * @param {Date} date + * @returns {'01'|'02'|'03'|'04'|'05'|'06'|'07'|'08'|'09'|'10'|'11'|'12'| + * '13'|'14'|'15'|'16'|'17'|'18'|'19'|'20'|'21'|'22'|'23'|'24'|'25'|'26'| + * '27'|'28'|'29'|'30'|'31'} + */ + dd(date) { + return PAD_2[this.#d(date)]; + } + + /** + * Day of the week as a three-letter abbreviation. + * + * @param {Date} date + * @returns {'Sun'|'Mon'|'Tue'|'Wed'|'Thu'|'Fri'|'Sat'} + */ + ddd(date) { + return this.i18n.dayNamesShort[this.#D(date)]; + } + + /** + * Day of the week as its full name. + * + * @param {Date} date + * @returns {'Sunday'|'Monday'|'Tuesday'|'Wednesday'|'Thursday'|'Friday'|'Saturday'} + */ + dddd(date) { + return this.i18n.dayNamesLong[this.#D(date)]; + } + + /** + * "Ysd", "Tdy" or "Tmw" if date lies within these three days. Else fall back + * to ddd. + * + * @param {Date} date + * @returns {ReturnType|'Tdy'|'Ysd'|'Tmw'} + */ + DDD(date) { + return getDayName({ + date, + D: this.#D.bind(this), + short: true, + i18n: this.i18n + }); + } + + /** + * "Yesterday", "Today" or "Tomorrow" if date lies within these three days. + * Else fall back to dddd. + * + * @param {Date} date + * @returns {ReturnType|'Today'|'Yesterday'|'Tomorrow'} + */ + DDDD(date) { + return getDayName({ + date, + D: this.#D.bind(this), + short: false, + i18n: this.i18n + }); + } + + /** + * Hours; no leading zero for single-digit hours (12-hour clock). + * + * @param {Date} date + * @returns {'1'|'2'|'3'|'4'|'5'|'6'|'7'|'8'|'9'|'10'|'11'|'12'} + */ + h(date) { + return HOURS_H[this.#H(date)]; + } + + /** + * Hours; leading zero for single-digit hours (12-hour clock). + */ + hh(date) { + return HOURS_H_PAD[this.#H(date)]; + } + + /** + * Hours; no leading zero for single-digit hours (24-hour clock). + * + * @param {Date} date + * @returns {'0'|'1'|'2'|'3'|'4'|'5'|'6'|'7'|'8'|'9'|'10'|'11'|'12'|'13'| + * '14'|'15'|'16'|'17'|'18'|'19'|'20'|'21'|'22'|'23'} + */ + H(date) { + return NO_PAD[this.#H(date)]; + } + + /** + * Hours; leading zero for single-digit hours (24-hour clock). + * + * @param {Date} date + * @returns {'00'|'01'|'02'|'03'|'04'|'05'|'06'|'07'|'08'|'09'|'10'|'11'| + * '12'|'13'|'14'|'15'|'16'|'17'|'18'|'19'|'20'|'21'|'22'|'23'} + */ + HH(date) { + return PAD_2[this.#H(date)]; + } + + /** + * Milliseconds; gives 3 digits. + * + * @param {Date} date + * @returns {string} + */ + l(date) { + return PAD_3[this.#L(date)]; + } + + /** + * Milliseconds; gives 2 digits. + * + * @param {Date} date + * @returns {string} + */ + L(date) { + return MILLISECONDS_L[this.#L(date)] + } + + /** + * Month as digits; no leading zero for single-digit + * + * @param {Date} date + * @returns {'1'|'2'|'3'|'4'|'5'|'6'|'7'|'8'|'9'|'10'|'11'|'12'} + */ + m(date) { + return NO_PAD[this.#m(date) + 1]; + } + + /** + * Day of the month as digits; leading zero for single-digit + * + * @param {Date} date + * @returns {'01'|'02'|'03'|'04'|'05'|'06'|'07'|'08'|'09'|'10'|'11'|'12'} + */ + mm(date) { + return PAD_2[this.#m(date) + 1]; + } + + /** + * month as three-letter + * + * @param {Date} date + * @returns {string} + */ + mmm(date) { + return this.i18n.monthNamesShort[this.#m(date)]; + } + + /** + * Month as its full name. + * + * @param {Date} date + * @returns {string} + */ + mmmm(date) { + return this.i18n.monthNamesLong[this.#m(date)]; + } + + /** + * Minutes; no leading zero for single-digit + * + * @param {Date} date + * @returns {'0'|'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'|'22'|'23'| + * '26'|'27'|'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'| + * '54'|'55'|'56'|'57'|'58'|'59'} + */ + M(date) { + return NO_PAD[this.#M(date)]; + } + + /** + * Minutes; leading zero for single-digit minutes. + * + * @param {Date} date + * @returns {'00'|'01'|'02'|'03'|'04'|'05'|'06'|'07'|'08'|'09'|'10'|'11'| + * '12'|'13'|'14'|'15'|'16'|'17'|'18'|'19'|'20'|'21'|'22'|'23'|'24'|'25'| + * '26'|'27'|'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'| + * '54'|'55'|'56'|'57'|'58'|'59'} + */ + MM(date) { + return PAD_2[this.#M(date)]; + } + + /** + * ISO 8601 numeric representation of the day of the week. + * + * @param {Date} date + * @returns {'1'|'2'|'3'|'4'|'5'|'6'|'7'} + */ + N(date) { + return dayOfWeekLookup[this.#D(date)]; + } + + /** + * GMT/UTC timezone offset, e.g. -0500 or +0230. + * + * @param {Date} date + * @returns {string} + */ + o(date) { + return TIMEZONE_OFFSET_O.get(this.#o(date)) + } + + /** + * GMT/UTC timezone offset, e.g. -05:00 or +02:30. + * + * @param {Date} date + * @returns {string} + */ + p(date) { + return TIMEZONE_OFFSET_P.get(this.#o(date)) + } + + /** + * Seconds; no leading zero for single-digit + * + * @param {Date} date + * @returns {'0'|'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'| + * '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'|'54'|'55'| + * '56'|'57'|'58'|'59'} + */ + s(date) { + return NO_PAD[this.#s(date)]; + } + + /** + * Seconds; leading zero for single-digit seconds. + * + * @param {Date} date + * @returns {'00'|'01'|'02'|'03'|'04'|'05'|'06'|'07'|'08'|'09'|'10'|'11'| + * '12'|'13'|'14'|'15'|'16'|'17'|'18'|'19'|'20'|'21'|'22'|'23'|'24'|'25'| + * '26'|'27'|'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'| + * '54'|'55'|'56'|'57'|'58'|'59 + */ + ss(date) { + return PAD_2[this.#s(date)]; + } + + /** + * The date's ordinal suffix (st, nd, rd, or th). Works well with `d`. + * + * @param {Date} date + * @return {'st'|'nd'|'rd'|'th'} + */ + S(date) { + return daySuffix[this.#d(date)]; + } + + /** + * Lowercase, single-character time marker string: a or p. + * + * @param {Date} date + * @returns {'A'|'P'} + */ + t(date) { + return this.#H(date) < 12 + ? this.i18n.timeNames[0] + : this.i18n.timeNames[1] + } + + /** + * Lowercase, two-character time marker string: am or pm. + * + * @param {Date} date + * @returns {'AM'|'PM'} + */ + tt(date) { + return this.#H(date) < 12 + ? this.i18n.timeNames[2] + : this.i18n.timeNames[3] + } + + /** + * Uppercase, single-character time marker string: A or P. + * + * @param {Date} date + * @returns {'A'|'P'} + */ + T(date) { + return this.#H(date) < 12 + ? this.i18n.timeNames[4] + : this.i18n.timeNames[5] + } + + /** + * Uppercase, two-character time marker string: AM or PM. + * + * @param {Date} date + * @returns {'AM'|'PM'} + */ + TT(date) { + return this.#H(date) < 12 + ? this.i18n.timeNames[6] + : this.i18n.timeNames[7] + } + + /** + * ISO 8601 week number of the year. + * + * @param {Date} date + * @returns {'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'|'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} + */ + get W() { + return getWeek + } + + /** + * ISO 8601 week number of the year, leading zero for single-digit. + * + * @param {Date} date + * @returns {'01'|'02'|'03'|'04'|'05'|'06'|'07'|'08'|'09'|'10'|'11'|'12'| + * '13'|'14'|'15'|'16'|'17'|'18'|'19'|'20'|'21'|'22'|'23'|'24'|'25'|'26'| + * '27'|'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'} + */ + get WW() { + return (date) => PAD_2[getWeek(date)]; + } + + /** + * Year as last two digits; leading zero for years less than 10. + * + * @param {Date} date + * @returns {'00'|'01'|'02'|'03'|'04'|'05'|'06'|'07'|'08'|'09'|'10'|'11'| + * '12'|'13'|'14'|'15'|'16'|'17'|'18'|'19'|'20'|'21'|'22'|'23'|'24'|'25'| + * '26'|'27'|'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'| + * '54'|'55'|'56'|'57'|'58'|'59'|'60'|'61'|'62'|'63'|'64'|'65'|'66'|'67'| + * '68'|'69'|'70'|'71'|'72'|'73'|'74'|'75'|'76'|'77'|'78'|'79'|'80'|'81'| + * '82'|'83'|'84'|'85'|'86'|'87'|'88'|'89'|'90'|'91'|'92'|'93'|'94'|'95'| + * '96'|'97'|'98'|'99'} + */ + yy(date) { + return PAD_2[this.#yyyy(date) % 100] + } + + /** + * Year represented by four digits. + * + * @param {Date} date + * @returns {string} + */ + yyyy(date) { + return PAD_4[this.#yyyy(date)]; + } + + get tokens() { + return this.#tokenFns; + } +} + +const date = new Date(2025, 7, 2, 12, 34, 56, 789); + +console.assert(new DateFormatter(mask).d(date) === '2', 'd') +console.assert(new DateFormatter(mask).dd(date) === '02', 'dd') +console.assert(new DateFormatter(mask).ddd(date) === 'Sat', 'ddd') +console.assert(new DateFormatter(mask).dddd(date) === 'Saturday', 'dddd') +console.assert(new DateFormatter(mask).DDD(date) === 'Tdy', 'DDD') +console.assert(new DateFormatter(mask).DDDD(date) === 'Today', 'DDDD') +console.assert(new DateFormatter(mask).h(date) === '12'), 'h'; +console.assert(new DateFormatter(mask).H(date) === '12'), 'H'; +console.assert(new DateFormatter(mask).hh(date) === '12'), 'hh'; +console.assert(new DateFormatter(mask).HH(date) === '12'), 'HH'; +console.assert(new DateFormatter(mask).L(date) === '78'), 'L'; +console.assert(new DateFormatter(mask).l(date) === '789'), 'l'; +console.assert(new DateFormatter(mask).M(date) === '34'), 'M'; +console.assert(new DateFormatter(mask).m(date) === '8', 'm') +console.assert(new DateFormatter(mask).mm(date) === '08', 'mm') +console.assert(new DateFormatter(mask).MM(date) === '34'), 'MM'; +console.assert(new DateFormatter(mask).mmm(date) === 'Aug', 'mmm') +console.assert(new DateFormatter(mask).mmmm(date) === 'August', 'mmmm') +console.assert(new DateFormatter(mask).N(date) === '6', 'N') +console.assert(new DateFormatter(mask).o(date) === '+0200', 'o') +console.assert(new DateFormatter(mask).o(date) === '+0200'), 'o'; +console.assert(new DateFormatter(mask).p(date) === '+02:00', 'p') +console.assert(new DateFormatter(mask).s(date) === '56'), 's'; +console.assert(new DateFormatter(mask).S(date) === 'nd'), 'S'; +console.assert(new DateFormatter(mask).ss(date) === '56'), 'ss'; +console.assert(new DateFormatter(mask).t(date) === 'p'), 't'; +console.assert(new DateFormatter(mask).tt(date) === 'pm'), 'tt'; +console.assert(new DateFormatter(mask).T(date) === 'P'), 'T'; +console.assert(new DateFormatter(mask).TT(date) === 'PM'), 'TT'; +console.assert(new DateFormatter(mask).W(date) === '31', 'W') +console.assert(new DateFormatter(mask).WW(date) === '31', 'WW') +console.assert(new DateFormatter(mask).yy(date) === '25', 'yy') +console.assert(new DateFormatter(mask).yyyy(date) === '2025', 'yyyy') + +console.log(new DateFormatter(mask).DDDD(date)); \ No newline at end of file diff --git a/lib/dateformat.js b/lib/dateformat.js index 1a2b207..604df3d 100644 --- a/lib/dateformat.js +++ b/lib/dateformat.js @@ -151,19 +151,13 @@ export default function dateFormat(date, mask, utc, gmt) { dd: () => PAD_2[d()], ddd: () => i18n.dayNamesShort[D()], DDD: () => getDayName({ - y: y(), - m: m(), - d: d(), - _: _, + date, D: D, short: true }), dddd: () => i18n.dayNamesLong[D()], DDDD: () => getDayName({ - y: y(), - m: m(), - d: d(), - _: _, + date, D: D, short: false }), @@ -348,43 +342,37 @@ const MILLISECONDS_L = new Array(1e3).fill(0).map((_, i) => String(i).padStart(3 * Get day name * Yesterday, Today, Tomorrow if the date lies within, else fallback to Monday - Sunday * @param {Object} options - * @param {number} options.y - Year - * @param {number} options.m - Month (0-11) - * @param {number} options.d - Day of the month (1-31) - * @param {Object} options._ - Date functions (getDate, getMonth, getFullYear) + * @param {Date} options.date - The date * @param {function} options.D - Function to get the day of the week (0-6) * @param {boolean} options.short - Whether to return short names (Tdy, Ysd, Tmw) * @return {String} */ -const getDayName = ({ y, m, d, _, D, short }) => { - - const referenceDate = new Date(); - if ( - _.getDate(referenceDate) === d && - _.getMonth(referenceDate) === m && - _.getFullYear(referenceDate) === y - ) { - return short ? 'Tdy' : 'Today'; - } - - referenceDate.setDate(referenceDate.getDate() - 1); - if ( - _.getDate(referenceDate) === d && - _.getMonth(referenceDate) === m && - _.getFullYear(referenceDate) === y - ) { +const getDayName = ({ date, D, short }) => { + // Get the timestamp of the date in milliseconds, since epoch in UTC + const dateTimestamp = date.getTime(); + + // Get the timestamp of the beginning of today in UTC by using Date.UTC, + // We use the provided date's year, month, and date, and set hours, minutes, + // seconds and milliseconds to 0. + // We correct the timestamp by using the timezone offset of the provided date, to + // ensure we are comparing the timestamps with the same timezone-offset. + const localNow = new Date(); + const todayBeginTimestamp = Date.UTC( + localNow.getFullYear(), + localNow.getMonth(), + localNow.getDate() + ) - (localNow.getTimezoneOffset() * 60000); + + if (dateTimestamp >= todayBeginTimestamp) { + if (dateTimestamp < (todayBeginTimestamp + 86400000)) { // within 24 hours + return short ? 'Tdy' : 'Today'; + } else if (dateTimestamp < (todayBeginTimestamp + 172800000)) { // within 48 hours + return short ? 'Tmw' : 'Tomorrow'; + } + } else if (dateTimestamp > (todayBeginTimestamp - 86400000)) { // within the last 24 hours return short ? 'Ysd' : 'Yesterday'; } - referenceDate.setDate(referenceDate.getDate() + 2); - if ( - _.getDate(referenceDate) === d && - _.getMonth(referenceDate) === m && - _.getFullYear(referenceDate) === y - ) { - return short ? 'Tmw' : 'Tomorrow'; - } - return short ? i18n.dayNamesShort[D()] : i18n.dayNamesLong[D()]; }; From cbef7fc999eb7976467b8cb2205aec6380c23c43 Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Sun, 3 Aug 2025 14:58:52 +0200 Subject: [PATCH 20/29] add standard masks --- date-formatter.js | 88 ++++++++++++++++++++++++++++++++++++++--------- 1 file changed, 72 insertions(+), 16 deletions(-) diff --git a/date-formatter.js b/date-formatter.js index 16abc9c..cbc7dd5 100644 --- a/date-formatter.js +++ b/date-formatter.js @@ -145,6 +145,26 @@ const getDayName = ({ date, D, short }) => { return short ? i18n.dayNamesShort[D()] : i18n.dayNamesLong[D()]; }; + +const maskNames = /** @type {const} */(['default', 'shortDate', 'paddedShortDate', 'mediumDate', 'longDate', 'fullDate', 'shortTime', 'mediumTime', 'longTime', 'isoDate', 'isoTime', 'isoDateTime', 'isoUtcDateTime', 'expiresHeaderFormat']); + +export const masks = /** @type {Record} */ ({ + default: "ddd mmm dd yyyy HH:MM:ss", + shortDate: "m/d/yy", + paddedShortDate: "mm/dd/yyyy", + mediumDate: "mmm d, yyyy", + longDate: "mmmm d, yyyy", + fullDate: "dddd, mmmm d, yyyy", + shortTime: "h:MM TT", + mediumTime: "h:MM:ss TT", + longTime: "h:MM:ss TT Z", + isoDate: "yyyy-mm-dd", + isoTime: "HH:MM:ss", + isoDateTime: "yyyy-mm-dd'T'HH:MM:sso", + isoUtcDateTime: "yyyy-mm-dd'T'HH:MM:ss'Z'", + expiresHeaderFormat: "ddd, dd mmm yyyy HH:MM:ss Z", +}); + const UTC_FNS = { getDate: Date.prototype.getUTCDate.call.bind(Date.prototype.getUTCDate), getDay: Date.prototype.getUTCDay.call.bind(Date.prototype.getUTCDay), @@ -172,11 +192,13 @@ const GMT_FNS = { export class DateFormatter { #tokenRE = /d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g; + /** + * @type {'GMT'|'UTC'} + */ #mode = 'GMT'; #mask = ''; - #fns = GMT_FNS; #d = GMT_FNS.getDate; #D = GMT_FNS.getDay; #H = GMT_FNS.getHours; @@ -239,10 +261,53 @@ export class DateFormatter { timeNames: ["a", "p", "am", "pm", "A", "P", "AM", "PM"], }) + #format = (date) => { + date = this.#validateDate(date); + + let result = ''; + + for (let i = 0; i < this.#tokenFns.length; ++i) { + result += this.#tokenFns[i](date); + } + + return result; + } + constructor(mask, mode = 'GMT') { - this.#mask = mask + if (typeof mode === 'string') { + mode = mode.toUpperCase(); + } else if (typeof mask === 'string') { + if (mask === 'isoUtcDateTime') { + this.#mode = 'UTC'; + // Allow setting the utc/gmt argument via the mask + } else if (mask[3] === ":") { + if ( + mask[0] === "U" && + mask[1] === "T" && + mask[2] === "C" + ) { + this.#mode = 'UTC'; + mask = mask.slice(4); + } else if ( + mask[0] === "G" && + mask[1] === "M" && + mask[2] === "T" + ) { + this.#mode = 'GMT'; + mask = mask.slice(4); + } + } + } - this.#mode = mode; + if (typeof mask === 'string') { + if (maskNames.includes(mask)) { + this.#mask = masks[mask]; + } else { + this.#mask = mask + } + } else if (typeof mask === "function") { + this.#format = mask; + } if (this.#mode === 'UTC') { this.#d = UTC_FNS.getDate; @@ -254,7 +319,6 @@ export class DateFormatter { this.#o = UTC_FNS.getTimezoneOffset; this.#s = UTC_FNS.getSeconds; this.#yyyy = UTC_FNS.getFullYear; - this.#fns = UTC_FNS; } this.#tokenize() @@ -403,16 +467,8 @@ export class DateFormatter { * @param {Date} date * @returns {string} */ - format(date) { - date = this.#validateDate(date); - - let result = ''; - - for (let i = 0; i < this.#tokenFns.length; ++i) { - result += this.#tokenFns[i](date); - } - - return result; + get format() { + return this.#format; } /** @@ -827,5 +883,5 @@ console.assert(new DateFormatter(mask).W(date) === '31', 'W') console.assert(new DateFormatter(mask).WW(date) === '31', 'WW') console.assert(new DateFormatter(mask).yy(date) === '25', 'yy') console.assert(new DateFormatter(mask).yyyy(date) === '2025', 'yyyy') - -console.log(new DateFormatter(mask).DDDD(date)); \ No newline at end of file +console.assert(new DateFormatter('default').format(date) === 'Sat Aug 02 2025 12:34:56', 'format: default'); +console.assert(new DateFormatter('longDate').format(date) === 'August 2, 2025', 'format: longDate'); From 7e9153bcd2baffd5571033e68755503ce74cb2f0 Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Sun, 3 Aug 2025 15:16:10 +0200 Subject: [PATCH 21/29] convert default masks to functions, --- date-formatter.js | 43 ++++++++++++++++++++++--------------------- 1 file changed, 22 insertions(+), 21 deletions(-) diff --git a/date-formatter.js b/date-formatter.js index cbc7dd5..61ab5cd 100644 --- a/date-formatter.js +++ b/date-formatter.js @@ -146,23 +146,23 @@ const getDayName = ({ date, D, short }) => { }; -const maskNames = /** @type {const} */(['default', 'shortDate', 'paddedShortDate', 'mediumDate', 'longDate', 'fullDate', 'shortTime', 'mediumTime', 'longTime', 'isoDate', 'isoTime', 'isoDateTime', 'isoUtcDateTime', 'expiresHeaderFormat']); - -export const masks = /** @type {Record} */ ({ - default: "ddd mmm dd yyyy HH:MM:ss", - shortDate: "m/d/yy", - paddedShortDate: "mm/dd/yyyy", - mediumDate: "mmm d, yyyy", - longDate: "mmmm d, yyyy", - fullDate: "dddd, mmmm d, yyyy", - shortTime: "h:MM TT", - mediumTime: "h:MM:ss TT", - longTime: "h:MM:ss TT Z", - isoDate: "yyyy-mm-dd", - isoTime: "HH:MM:ss", - isoDateTime: "yyyy-mm-dd'T'HH:MM:sso", - isoUtcDateTime: "yyyy-mm-dd'T'HH:MM:ss'Z'", - expiresHeaderFormat: "ddd, dd mmm yyyy HH:MM:ss Z", +const standardMaskNames = /** @type {const} */(['default', 'shortDate', 'paddedShortDate', 'mediumDate', 'longDate', 'fullDate', 'shortTime', 'mediumTime', 'longTime', 'isoDate', 'isoTime', 'isoDateTime', 'isoUtcDateTime', 'expiresHeaderFormat']); + +export const standardMasks = /** @type {Record} */ ({ + default: function (date) { return `${this.ddd(date)} ${this.mmm(date)} ${this.dd(date)} ${this.yyyy(date)} ${this.HH(date)}:${this.MM(date)}:${this.ss(date)}` }, + shortDate: function (date) { return `${this.m(date)}/${this.d(date)}/${this.yy(date)}` }, + paddedShortDate: function (date) { return `${this.mm(date)}/${this.dd(date)}/${this.yyyy(date)}` }, + mediumDate: function (date) { return `${this.mmm(date)} ${this.d(date)}, ${this.yyyy(date)}` }, + longDate: function (date) { return `${this.mmmm(date)} ${this.d(date)}, ${this.yyyy(date)}` }, + fullDate: function (date) { return `${this.dddd(date)}, ${this.mmmm(date)} ${this.d(date)}, ${this.yyyy(date)}` }, + shortTime: function (date) { return `${this.h(date)}:${this.MM(date)} ${this.TT(date)}` }, + mediumTime: function (date) { return `${this.h(date)}:${this.MM(date)}:${this.ss(date)} ${this.TT(date)}` }, + longTime: function (date) { return `${this.h(date)}:${this.MM(date)}:${this.ss(date)} ${this.TT(date)} ${this.o(date)}` }, + isoDate: function (date) { return `${this.yyyy(date)}-${this.mm(date)}-${this.dd(date)}` }, + isoTime: function (date) { return `${this.HH(date)}:${this.MM(date)}:${this.ss(date)}` }, + isoDateTime: function (date) { return `${this.yyyy(date)}-${this.mm(date)}-${this.dd(date)}T${this.HH(date)}:${this.MM(date)}:${this.ss(date)}${this.o(date)}` }, + isoUtcDateTime: function (date) { return `${this.yyyy(date)}-${this.mm(date)}-${this.dd(date)}T${this.HH(date)}:${this.MM(date)}:${this.ss(date)}Z` }, + expiresHeaderFormat: function (date) { return `${this.ddd(date)}, ${this.dd(date)} ${this.mmm(date)} ${this.yyyy(date)} ${this.HH(date)}:${this.MM(date)}:${this.ss(date)} ${this.o(date)}` }, }); const UTC_FNS = { @@ -300,13 +300,16 @@ export class DateFormatter { } if (typeof mask === 'string') { - if (maskNames.includes(mask)) { - this.#mask = masks[mask]; + if (standardMaskNames.includes(mask)) { + this.#format = standardMasks[mask]; } else { this.#mask = mask + this.#tokenize() } } else if (typeof mask === "function") { this.#format = mask; + } else { + throw TypeError("Mask must be a string or a function"); } if (this.#mode === 'UTC') { @@ -320,8 +323,6 @@ export class DateFormatter { this.#s = UTC_FNS.getSeconds; this.#yyyy = UTC_FNS.getFullYear; } - - this.#tokenize() } #tokenize() { From 6f3f7359d3e965c70d12da762214800dd35d882d Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Sun, 3 Aug 2025 15:32:57 +0200 Subject: [PATCH 22/29] add generic Z flag --- date-formatter.js | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/date-formatter.js b/date-formatter.js index 61ab5cd..2c48168 100644 --- a/date-formatter.js +++ b/date-formatter.js @@ -148,7 +148,7 @@ const getDayName = ({ date, D, short }) => { const standardMaskNames = /** @type {const} */(['default', 'shortDate', 'paddedShortDate', 'mediumDate', 'longDate', 'fullDate', 'shortTime', 'mediumTime', 'longTime', 'isoDate', 'isoTime', 'isoDateTime', 'isoUtcDateTime', 'expiresHeaderFormat']); -export const standardMasks = /** @type {Record} */ ({ +export const standardMasks = /** @type {Record string>} */ ({ default: function (date) { return `${this.ddd(date)} ${this.mmm(date)} ${this.dd(date)} ${this.yyyy(date)} ${this.HH(date)}:${this.MM(date)}:${this.ss(date)}` }, shortDate: function (date) { return `${this.m(date)}/${this.d(date)}/${this.yy(date)}` }, paddedShortDate: function (date) { return `${this.mm(date)}/${this.dd(date)}/${this.yyyy(date)}` }, @@ -157,10 +157,10 @@ export const standardMasks = /** @type {Record} */ ({ fullDate: function (date) { return `${this.dddd(date)}, ${this.mmmm(date)} ${this.d(date)}, ${this.yyyy(date)}` }, shortTime: function (date) { return `${this.h(date)}:${this.MM(date)} ${this.TT(date)}` }, mediumTime: function (date) { return `${this.h(date)}:${this.MM(date)}:${this.ss(date)} ${this.TT(date)}` }, - longTime: function (date) { return `${this.h(date)}:${this.MM(date)}:${this.ss(date)} ${this.TT(date)} ${this.o(date)}` }, + longTime: function (date) { return `${this.h(date)}:${this.MM(date)}:${this.ss(date)} ${this.TT(date)} ${this.Z(date)}` }, isoDate: function (date) { return `${this.yyyy(date)}-${this.mm(date)}-${this.dd(date)}` }, isoTime: function (date) { return `${this.HH(date)}:${this.MM(date)}:${this.ss(date)}` }, - isoDateTime: function (date) { return `${this.yyyy(date)}-${this.mm(date)}-${this.dd(date)}T${this.HH(date)}:${this.MM(date)}:${this.ss(date)}${this.o(date)}` }, + isoDateTime: function (date) { return `${this.yyyy(date)}-${this.mm(date)}-${this.dd(date)}T${this.HH(date)}:${this.MM(date)}:${this.ss(date)}${this.Z(date)}` }, isoUtcDateTime: function (date) { return `${this.yyyy(date)}-${this.mm(date)}-${this.dd(date)}T${this.HH(date)}:${this.MM(date)}:${this.ss(date)}Z` }, expiresHeaderFormat: function (date) { return `${this.ddd(date)}, ${this.dd(date)} ${this.mmm(date)} ${this.yyyy(date)} ${this.HH(date)}:${this.MM(date)}:${this.ss(date)} ${this.o(date)}` }, }); @@ -429,6 +429,9 @@ export class DateFormatter { case "yyyy": this.#tokenFns.push(this.yyyy.bind(this)); break; + case "Z": + this.#tokenFns.push(this.Z.bind(this)); + break; default: if (match[0][0] === '\'' && match[0][match[0].length - 1] === '\'') { const token = match[0].slice(1, -1); @@ -844,8 +847,15 @@ export class DateFormatter { return PAD_4[this.#yyyy(date)]; } - get tokens() { - return this.#tokenFns; + Z(date) { + if (this.#mode === 'UTC') { + return 'Z'; + } + const offset = this.#o(date); + if (offset === 0) { + return 'UTC'; + } + return `GMT${this.o(date)}`; } } @@ -870,7 +880,6 @@ console.assert(new DateFormatter(mask).MM(date) === '34'), 'MM'; console.assert(new DateFormatter(mask).mmm(date) === 'Aug', 'mmm') console.assert(new DateFormatter(mask).mmmm(date) === 'August', 'mmmm') console.assert(new DateFormatter(mask).N(date) === '6', 'N') -console.assert(new DateFormatter(mask).o(date) === '+0200', 'o') console.assert(new DateFormatter(mask).o(date) === '+0200'), 'o'; console.assert(new DateFormatter(mask).p(date) === '+02:00', 'p') console.assert(new DateFormatter(mask).s(date) === '56'), 's'; @@ -886,3 +895,4 @@ console.assert(new DateFormatter(mask).yy(date) === '25', 'yy') console.assert(new DateFormatter(mask).yyyy(date) === '2025', 'yyyy') console.assert(new DateFormatter('default').format(date) === 'Sat Aug 02 2025 12:34:56', 'format: default'); console.assert(new DateFormatter('longDate').format(date) === 'August 2, 2025', 'format: longDate'); +console.assert(new DateFormatter('longTime').format(date) === '12:34:56 PM GMT+0200', 'format: longDate'); From 4f1249b40d92033f23a5c0c4bf05a88eaec31ae6 Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Sun, 3 Aug 2025 15:34:15 +0200 Subject: [PATCH 23/29] more generic --- date-formatter.js | 3 --- 1 file changed, 3 deletions(-) diff --git a/date-formatter.js b/date-formatter.js index 2c48168..33b6f75 100644 --- a/date-formatter.js +++ b/date-formatter.js @@ -848,9 +848,6 @@ export class DateFormatter { } Z(date) { - if (this.#mode === 'UTC') { - return 'Z'; - } const offset = this.#o(date); if (offset === 0) { return 'UTC'; From df4eace5e80318e21fa78845c14281a2ea6a6331 Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Sun, 3 Aug 2025 23:37:06 +0200 Subject: [PATCH 24/29] improve codebase --- date-formatter.js | 167 ++++++++++++++++++-------------------------- test/test_quotes.js | 4 +- 2 files changed, 69 insertions(+), 102 deletions(-) diff --git a/date-formatter.js b/date-formatter.js index 33b6f75..afdd488 100644 --- a/date-formatter.js +++ b/date-formatter.js @@ -1,35 +1,18 @@ -'use strict' - -const mask = "o" - -const microsecondsPerWeek = /** @type {const} */ (604800000); // 7 days * 24 hours * 60 minutes * 60 seconds * 1000 milliseconds - -/** - * @param {number} value - * @returns {number} - */ -const abs = (value) => (value ^ (value >> 31)) - (value >> 31) - - -const daySuffix = new Array(32).fill(0).map((_, i) => { - if (i === 1 || i === 21 || i === 31) { - return "st"; - } else if (i === 2 || i === 22) { - return "nd"; - } else if (i === 3 || i === 23) { - return "rd"; - } else { - return "th"; - } -}); - -const NO_PAD = new Array(1e3).fill(0).map((_, i) => String(i)); +const DATE_SUFFIX = [ + 'th', + 'st', 'nd', 'rd', 'th', 'th', 'th', 'th', 'th', 'th', 'th', + 'th', 'th', 'th', 'th', 'th', 'th', 'th', 'th', 'th', 'th', + 'st', 'nd', 'rd', 'th', 'th', 'th', 'th', 'th', 'th', 'th', + 'st' +] + +const PAD_0 = new Array(1e3).fill(0).map((_, i) => String(i)); const PAD_2 = new Array(1e2).fill(0).map((_, i) => String(i).padStart(2, '0')); const PAD_3 = new Array(1e3).fill(0).map((_, i) => String(i).padStart(3, '0')); const PAD_4 = new Array(1e4).fill(0).map((_, i) => String(i).padStart(4, '0')); const HOURS_H = new Array(24).fill(0).map((_, i) => String(i % 12 || 12)); -const HOURS_H_PAD = new Array(24).fill(0).map((_, i) => String(i % 12 || 12).padStart(2, '0')); +const HOURS_H_PAD_2 = HOURS_H.map(v => v.padStart(2, '0')); const MILLISECONDS_L = new Array(1e3).fill(0).map((_, i) => String(i).padStart(3, '0').slice(0, 2)); const TIMEZONE_OFFSET_O = new Map(); @@ -37,29 +20,23 @@ const TIMEZONE_OFFSET_P = new Map(); for (let tzOffset = -720; tzOffset <= 840; tzOffset += 15) { TIMEZONE_OFFSET_O.set(tzOffset, (tzOffset > 0 ? "-" : "+") + - PAD_2[abs((tzOffset) / 60)] + - PAD_2[abs((tzOffset) % 60)] + PAD_2[Math.abs((tzOffset) / 60)] + + PAD_2[Math.abs((tzOffset) % 60)] ) TIMEZONE_OFFSET_P.set(tzOffset, (tzOffset > 0 ? "-" : "+") + - PAD_2[abs((tzOffset) / 60)] + ":" + PAD_2[abs((tzOffset) % 60)]) + PAD_2[Math.abs((tzOffset) / 60)] + ":" + PAD_2[Math.abs((tzOffset) % 60)]) } const dayOfWeekLookup = /**@type {const} */(["7", "1", "2", "3", "4", "5", "6"]); -/** - * @type {Map} - */ +/** @type {Map} */ const firstThursdays = new Map(); -/** - * @type {(1|2|3|4|5|6|7)[]} - */ +/** @type {(1|2|3|4|5|6|7)[]} */ const firstDaysOfWeekLookup = [1, 7, 6, 5, 4, 3, 2]; -/** - * @type {(0|1|2|3|4|5|6)[]} - */ +/** @type {(0|1|2|3|4|5|6)[]} */ const thursdaySameWeekLookup = [6, 0, 1, 2, 3, 4, 5]; /** @@ -103,8 +80,8 @@ const getWeek = (date) => { targetThursday.setHours(targetThursday.getHours() - ds); // Number of weeks between target Thursday and first Thursday - const weekDiff = (targetThursday.getTime() - firstThursday.getTime()) / microsecondsPerWeek; - return "" + (1 + ~~(weekDiff)); + const weekDiff = (targetThursday.getTime() - firstThursday.getTime()) / 604800000; + return (1 + ~~(weekDiff)); }; /** @@ -114,9 +91,10 @@ const getWeek = (date) => { * @param {Date} options.date - The date * @param {function} options.D - Function to get the day of the week (0-6) * @param {boolean} options.short - Whether to return short names (Tdy, Ysd, Tmw) + * @param {Object} options.i18n - Object containing i18n day names * @return {String} */ -const getDayName = ({ date, D, short }) => { +const getDayName = ({ date, D, short, i18n }) => { // Get the timestamp of the date in milliseconds, since epoch in UTC const dateTimestamp = date.getTime(); @@ -142,11 +120,17 @@ const getDayName = ({ date, D, short }) => { return short ? 'Ysd' : 'Yesterday'; } - return short ? i18n.dayNamesShort[D()] : i18n.dayNamesLong[D()]; + return short ? i18n.dayNamesShort[D(date)] : i18n.dayNamesLong[D(date)]; }; -const standardMaskNames = /** @type {const} */(['default', 'shortDate', 'paddedShortDate', 'mediumDate', 'longDate', 'fullDate', 'shortTime', 'mediumTime', 'longTime', 'isoDate', 'isoTime', 'isoDateTime', 'isoUtcDateTime', 'expiresHeaderFormat']); +const standardMaskNames = /** @type {const} */([ + 'default', + 'shortDate', 'paddedShortDate', 'mediumDate', 'longDate', 'fullDate', 'isoDate', + 'shortTime', 'mediumTime', 'longTime', 'isoTime', + 'isoDateTime', 'isoUtcDateTime', + 'expiresHeaderFormat' +]); export const standardMasks = /** @type {Record string>} */ ({ default: function (date) { return `${this.ddd(date)} ${this.mmm(date)} ${this.dd(date)} ${this.yyyy(date)} ${this.HH(date)}:${this.MM(date)}:${this.ss(date)}` }, @@ -160,11 +144,18 @@ export const standardMasks = /** @type {Record number>} */ const UTC_FNS = { getDate: Date.prototype.getUTCDate.call.bind(Date.prototype.getUTCDate), getDay: Date.prototype.getUTCDay.call.bind(Date.prototype.getUTCDay), @@ -177,6 +168,7 @@ const UTC_FNS = { getTimezoneOffset: () => 0, // UTC does not have a timezone offset } +/** @type {Record number>} */ const GMT_FNS = { getDate: Date.prototype.getDate.call.bind(Date.prototype.getDate), getDay: Date.prototype.getDay.call.bind(Date.prototype.getDay), @@ -190,8 +182,6 @@ const GMT_FNS = { } export class DateFormatter { - #tokenRE = /d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g; - /** * @type {'GMT'|'UTC'} */ @@ -276,6 +266,10 @@ export class DateFormatter { constructor(mask, mode = 'GMT') { if (typeof mode === 'string') { mode = mode.toUpperCase(); + if (mode !== 'GMT' && mode !== 'UTC') { + throw TypeError("Mode must be 'GMT' or 'UTC'"); + } + this.#mode = mode; } else if (typeof mask === 'string') { if (mask === 'isoUtcDateTime') { this.#mode = 'UTC'; @@ -326,9 +320,10 @@ export class DateFormatter { } #tokenize() { + const tokenRE = /d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g let match let pos = 0 - while ((match = this.#tokenRE.exec(this.#mask)) != null) { + while ((match = tokenRE.exec(this.#mask)) != null) { if (pos !== match.index) { const token = this.#mask.slice(pos, match.index); this.#tokenFns.push(() => token); @@ -357,6 +352,7 @@ export class DateFormatter { break; case "hh": this.#tokenFns.push(this.hh.bind(this)); + break; case "H": this.#tokenFns.push(this.H.bind(this)); break; @@ -433,14 +429,17 @@ export class DateFormatter { this.#tokenFns.push(this.Z.bind(this)); break; default: - if (match[0][0] === '\'' && match[0][match[0].length - 1] === '\'') { + if ( + (match[0][0] === '\'' && match[0][match[0].length - 1] === '\'') || + (match[0][0] === '\"' && match[0][match[0].length - 1] === '\"') + ) { const token = match[0].slice(1, -1); this.#tokenFns.push(() => token); break; } console.log("Unknown token:", match[0]); } - pos = this.#tokenRE.lastIndex; + pos = tokenRE.lastIndex; } if (pos !== this.#mask.length) { @@ -484,7 +483,7 @@ export class DateFormatter { * '29'|'30'|'31'} */ d(date) { - return NO_PAD[this.#d(date)]; + return PAD_0[this.#d(date)]; } /** @@ -563,9 +562,11 @@ export class DateFormatter { /** * Hours; leading zero for single-digit hours (12-hour clock). + * @param {Date} date + * @returns {'01'|'02'|'03'|'04'|'05'|'06'|'07'|'08'|'09'|'10'|'11'|'12'} */ hh(date) { - return HOURS_H_PAD[this.#H(date)]; + return HOURS_H_PAD_2[this.#H(date)]; } /** @@ -576,7 +577,7 @@ export class DateFormatter { * '14'|'15'|'16'|'17'|'18'|'19'|'20'|'21'|'22'|'23'} */ H(date) { - return NO_PAD[this.#H(date)]; + return PAD_0[this.#H(date)]; } /** @@ -617,7 +618,7 @@ export class DateFormatter { * @returns {'1'|'2'|'3'|'4'|'5'|'6'|'7'|'8'|'9'|'10'|'11'|'12'} */ m(date) { - return NO_PAD[this.#m(date) + 1]; + return PAD_0[this.#m(date) + 1]; } /** @@ -661,7 +662,7 @@ export class DateFormatter { * '54'|'55'|'56'|'57'|'58'|'59'} */ M(date) { - return NO_PAD[this.#M(date)]; + return PAD_0[this.#M(date)]; } /** @@ -719,7 +720,7 @@ export class DateFormatter { * '56'|'57'|'58'|'59'} */ s(date) { - return NO_PAD[this.#s(date)]; + return PAD_0[this.#s(date)]; } /** @@ -743,7 +744,7 @@ export class DateFormatter { * @return {'st'|'nd'|'rd'|'th'} */ S(date) { - return daySuffix[this.#d(date)]; + return DATE_SUFFIX[this.#d(date)]; } /** @@ -803,8 +804,8 @@ export class DateFormatter { * '30'|'31'|'32'|'33'|'34'|'35'|'36'|'37'|'38'|'39'|'40'|'41'|'42'|'43'| * '44'|'45'|'46'|'47'|'48'|'49'|'50'|'51'|'52'|'53} */ - get W() { - return getWeek + W(date) { + return PAD_0[getWeek(date)]; } /** @@ -816,8 +817,8 @@ export class DateFormatter { * '27'|'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'} */ - get WW() { - return (date) => PAD_2[getWeek(date)]; + WW(date) { + return PAD_2[getWeek(date)]; } /** @@ -847,6 +848,10 @@ export class DateFormatter { return PAD_4[this.#yyyy(date)]; } + /** + * @param {Date} date + * @returns {'UTC'|`GMT{string}`} + */ Z(date) { const offset = this.#o(date); if (offset === 0) { @@ -855,41 +860,3 @@ export class DateFormatter { return `GMT${this.o(date)}`; } } - -const date = new Date(2025, 7, 2, 12, 34, 56, 789); - -console.assert(new DateFormatter(mask).d(date) === '2', 'd') -console.assert(new DateFormatter(mask).dd(date) === '02', 'dd') -console.assert(new DateFormatter(mask).ddd(date) === 'Sat', 'ddd') -console.assert(new DateFormatter(mask).dddd(date) === 'Saturday', 'dddd') -console.assert(new DateFormatter(mask).DDD(date) === 'Tdy', 'DDD') -console.assert(new DateFormatter(mask).DDDD(date) === 'Today', 'DDDD') -console.assert(new DateFormatter(mask).h(date) === '12'), 'h'; -console.assert(new DateFormatter(mask).H(date) === '12'), 'H'; -console.assert(new DateFormatter(mask).hh(date) === '12'), 'hh'; -console.assert(new DateFormatter(mask).HH(date) === '12'), 'HH'; -console.assert(new DateFormatter(mask).L(date) === '78'), 'L'; -console.assert(new DateFormatter(mask).l(date) === '789'), 'l'; -console.assert(new DateFormatter(mask).M(date) === '34'), 'M'; -console.assert(new DateFormatter(mask).m(date) === '8', 'm') -console.assert(new DateFormatter(mask).mm(date) === '08', 'mm') -console.assert(new DateFormatter(mask).MM(date) === '34'), 'MM'; -console.assert(new DateFormatter(mask).mmm(date) === 'Aug', 'mmm') -console.assert(new DateFormatter(mask).mmmm(date) === 'August', 'mmmm') -console.assert(new DateFormatter(mask).N(date) === '6', 'N') -console.assert(new DateFormatter(mask).o(date) === '+0200'), 'o'; -console.assert(new DateFormatter(mask).p(date) === '+02:00', 'p') -console.assert(new DateFormatter(mask).s(date) === '56'), 's'; -console.assert(new DateFormatter(mask).S(date) === 'nd'), 'S'; -console.assert(new DateFormatter(mask).ss(date) === '56'), 'ss'; -console.assert(new DateFormatter(mask).t(date) === 'p'), 't'; -console.assert(new DateFormatter(mask).tt(date) === 'pm'), 'tt'; -console.assert(new DateFormatter(mask).T(date) === 'P'), 'T'; -console.assert(new DateFormatter(mask).TT(date) === 'PM'), 'TT'; -console.assert(new DateFormatter(mask).W(date) === '31', 'W') -console.assert(new DateFormatter(mask).WW(date) === '31', 'WW') -console.assert(new DateFormatter(mask).yy(date) === '25', 'yy') -console.assert(new DateFormatter(mask).yyyy(date) === '2025', 'yyyy') -console.assert(new DateFormatter('default').format(date) === 'Sat Aug 02 2025 12:34:56', 'format: default'); -console.assert(new DateFormatter('longDate').format(date) === 'August 2, 2025', 'format: longDate'); -console.assert(new DateFormatter('longTime').format(date) === '12:34:56 PM GMT+0200', 'format: longDate'); diff --git a/test/test_quotes.js b/test/test_quotes.js index 54bc3f8..0b1bb03 100644 --- a/test/test_quotes.js +++ b/test/test_quotes.js @@ -6,12 +6,12 @@ import dateFormat from './../lib/dateformat.js'; describe('quoted substrings', function() { var az = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ'; it('should not format single quoted substrings removing quotes', function() { - var result = dateFormat("'" + az + "'"); + var result = dateFormat(new Date(), "'" + az + "'"); strictEqual(result, az); }); it('should not format double quoted substrings removing quotes', function() { - var result = dateFormat('"' + az + '"'); + var result = dateFormat(new Date(), '"' + az + '"'); strictEqual(result, az); }); }); From eb2a410b25771f3cabb364e1da4c9c87975062ae Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Sun, 3 Aug 2025 23:52:08 +0200 Subject: [PATCH 25/29] improve benchmarks --- benchmark/benchmark-dateformatter.js | 24 +++++------------------- benchmark/benchmark.js | 8 ++++---- 2 files changed, 9 insertions(+), 23 deletions(-) diff --git a/benchmark/benchmark-dateformatter.js b/benchmark/benchmark-dateformatter.js index 4f8621a..422d7f3 100644 --- a/benchmark/benchmark-dateformatter.js +++ b/benchmark/benchmark-dateformatter.js @@ -1,5 +1,4 @@ import { Bench } from "tinybench" -import dateFormat from "../lib/dateformat.js"; import { DateFormatter } from "../date-formatter.js" const masks = [ @@ -12,21 +11,17 @@ const masks = [ "L", "yy", "yyyy", - "isoUtcDateTime", - "shortDate", - "fullDate", - "longTime", "default", + "shortDate", "paddedShortDate", "mediumDate", "longDate", "fullDate", "isoDate", + "shortTime", "mediumTime", "longTime", "isoTime", + "isoDateTime", "isoUtcDateTime", + "expiresHeaderFormat" ]; const bench = new Bench({ name: 'simple benchmark', time: 100 }) masks.forEach((mask) => { const date = new Date(); - bench.add(`dateformat ${mask}`, () => { - dateFormat(date, mask); - }); - const dateFormatter = new DateFormatter(mask); bench.add(`DateFormatter ${mask}`, () => { dateFormatter.format(date); @@ -35,11 +30,8 @@ masks.forEach((mask) => { { const date = new Date(); - bench.add(`dateformat DDDD - today`, () => { - dateFormat(date, "DDDD"); - }); - const dateFormatter = new DateFormatter("DDDD"); + bench.add(`DateFormatter DDDD - today`, () => { dateFormatter.format(date); }); @@ -48,9 +40,6 @@ masks.forEach((mask) => { { const date = new Date() date.setDate(new Date().getDate() + 1); - bench.add(`dateformat DDDD - tomorrow`, () => { - dateFormat(date, "DDDD"); - }); const dateFormatter = new DateFormatter("DDDD"); bench.add(`DateFormatter DDDD - tomorrow`, () => { @@ -61,9 +50,6 @@ masks.forEach((mask) => { { const date = new Date() date.setDate(new Date().getDate() - 1); - bench.add(`dateformat DDDD - yesterday`, () => { - dateFormat(date, "DDDD"); - }); const dateFormatter = new DateFormatter("DDDD"); bench.add(`DateFormatter DDDD - yesterday`, () => { diff --git a/benchmark/benchmark.js b/benchmark/benchmark.js index 222b69c..8697f6d 100644 --- a/benchmark/benchmark.js +++ b/benchmark/benchmark.js @@ -11,11 +11,11 @@ const masks = [ "L", "yy", "yyyy", - "isoUtcDateTime", - "shortDate", - "fullDate", - "longTime", "default", + "shortDate", "paddedShortDate", "mediumDate", "longDate", "fullDate", "isoDate", + "shortTime", "mediumTime", "longTime", "isoTime", + "isoDateTime", "isoUtcDateTime", + "expiresHeaderFormat" ]; const bench = new Bench({ name: 'simple benchmark', time: 100 }) From 06294737e7186a2004b32ca85f9c27542a243a0c Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Mon, 4 Aug 2025 00:26:25 +0200 Subject: [PATCH 26/29] fix --- date-formatter.js | 2 +- lib/dateformat.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/date-formatter.js b/date-formatter.js index afdd488..c74dbbb 100644 --- a/date-formatter.js +++ b/date-formatter.js @@ -67,7 +67,7 @@ const getWeek = (date) => { let firstThursday = firstThursdays.get(Y); if (!firstThursday) { // Take January 4th as it is always in week 1 (see ISO 8601) - firstThursday = new Date(Y, 0, 4); + firstThursday = new Date(targetThursday.getFullYear(), 0, 4); // Change date to Thursday same week firstThursday.setDate(firstDaysOfWeekLookup[firstThursday.getDay()]); diff --git a/lib/dateformat.js b/lib/dateformat.js index 604df3d..d2b99b7 100644 --- a/lib/dateformat.js +++ b/lib/dateformat.js @@ -419,7 +419,7 @@ const getWeek = (date) => { let firstThursday = firstThursdays.get(Y); if (!firstThursday) { // Take January 4th as it is always in week 1 (see ISO 8601) - firstThursday = new Date(Y, 0, 4); + firstThursday = new Date(targetThursday.getFullYear(), 0, 4); // Change date to Thursday same week firstThursday.setDate(firstDaysOfWeekLookup[firstThursday.getDay()]); From 047529121d90b0b52014dd3a3589b94f7502f29b Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Mon, 4 Aug 2025 23:41:10 +0200 Subject: [PATCH 27/29] fix --- date-formatter.js | 5 +---- lib/dateformat.js | 6 ++---- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/date-formatter.js b/date-formatter.js index c74dbbb..e25c625 100644 --- a/date-formatter.js +++ b/date-formatter.js @@ -101,14 +101,11 @@ const getDayName = ({ date, D, short, i18n }) => { // Get the timestamp of the beginning of today in UTC by using Date.UTC, // We use the provided date's year, month, and date, and set hours, minutes, // seconds and milliseconds to 0. - // We correct the timestamp by using the timezone offset of the provided date, to - // ensure we are comparing the timestamps with the same timezone-offset. const localNow = new Date(); - const todayBeginTimestamp = Date.UTC( + const todayBeginTimestamp = new Date( localNow.getFullYear(), localNow.getMonth(), localNow.getDate() - ) - (localNow.getTimezoneOffset() * 60000); if (dateTimestamp >= todayBeginTimestamp) { if (dateTimestamp < (todayBeginTimestamp + 86400000)) { // within 24 hours diff --git a/lib/dateformat.js b/lib/dateformat.js index d2b99b7..d4aeebe 100644 --- a/lib/dateformat.js +++ b/lib/dateformat.js @@ -354,14 +354,12 @@ const getDayName = ({ date, D, short }) => { // Get the timestamp of the beginning of today in UTC by using Date.UTC, // We use the provided date's year, month, and date, and set hours, minutes, // seconds and milliseconds to 0. - // We correct the timestamp by using the timezone offset of the provided date, to - // ensure we are comparing the timestamps with the same timezone-offset. const localNow = new Date(); - const todayBeginTimestamp = Date.UTC( + const todayBeginTimestamp = new Date( localNow.getFullYear(), localNow.getMonth(), localNow.getDate() - ) - (localNow.getTimezoneOffset() * 60000); + ).getTime(); if (dateTimestamp >= todayBeginTimestamp) { if (dateTimestamp < (todayBeginTimestamp + 86400000)) { // within 24 hours From d41ec9784dd5464337dc30dcc7bdaf49055485da Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Mon, 4 Aug 2025 11:59:55 +0200 Subject: [PATCH 28/29] fix --- date-formatter.js | 9 +++++---- lib/dateformat.js | 10 ++++++---- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/date-formatter.js b/date-formatter.js index e25c625..8066136 100644 --- a/date-formatter.js +++ b/date-formatter.js @@ -64,14 +64,15 @@ const getWeek = (date) => { d - thursdaySameWeekLookup[targetThursday.getDay()] + 3 ); - let firstThursday = firstThursdays.get(Y); + const targetThursdayYear = targetThursday.getFullYear(); + let firstThursday = firstThursdays.get(targetThursdayYear); if (!firstThursday) { // Take January 4th as it is always in week 1 (see ISO 8601) - firstThursday = new Date(targetThursday.getFullYear(), 0, 4); + firstThursday = new Date(targetThursdayYear, 0, 4); // Change date to Thursday same week firstThursday.setDate(firstDaysOfWeekLookup[firstThursday.getDay()]); - firstThursdays.set(Y, firstThursday); + firstThursdays.set(targetThursdayYear, firstThursday); } // Check if daylight-saving-time-switch occurred and correct for it @@ -82,7 +83,7 @@ const getWeek = (date) => { // Number of weeks between target Thursday and first Thursday const weekDiff = (targetThursday.getTime() - firstThursday.getTime()) / 604800000; return (1 + ~~(weekDiff)); -}; +} /** * Get day name diff --git a/lib/dateformat.js b/lib/dateformat.js index d4aeebe..d2b0b6f 100644 --- a/lib/dateformat.js +++ b/lib/dateformat.js @@ -414,14 +414,16 @@ const getWeek = (date) => { d - thursdaySameWeekLookup[targetThursday.getDay()] + 3 ); - let firstThursday = firstThursdays.get(Y); + const targetThursdayYear = targetThursday.getFullYear(); + + let firstThursday = firstThursdays.get(targetThursdayYear); if (!firstThursday) { // Take January 4th as it is always in week 1 (see ISO 8601) - firstThursday = new Date(targetThursday.getFullYear(), 0, 4); + firstThursday = new Date(targetThursdayYear, 0, 4); // Change date to Thursday same week firstThursday.setDate(firstDaysOfWeekLookup[firstThursday.getDay()]); - firstThursdays.set(Y, firstThursday); + firstThursdays.set(targetThursdayYear, firstThursday); } // Check if daylight-saving-time-switch occurred and correct for it @@ -430,7 +432,7 @@ const getWeek = (date) => { targetThursday.setHours(targetThursday.getHours() - ds); // Number of weeks between target Thursday and first Thursday - const weekDiff = (targetThursday.getTime() - firstThursday.getTime()) / microsecondsPerWeek; + const weekDiff = (targetThursday.getTime() - firstThursday.getTime()) / 604800000; return 1 + ~~(weekDiff); }; From 53c8966de51f4f5f20f1eebc183456e01dd04416 Mon Sep 17 00:00:00 2001 From: Aras Abbasi Date: Mon, 4 Aug 2025 12:13:43 +0200 Subject: [PATCH 29/29] fix --- date-formatter.js | 1 + dateformat | 1 + 2 files changed, 2 insertions(+) create mode 160000 dateformat diff --git a/date-formatter.js b/date-formatter.js index 8066136..e60ab57 100644 --- a/date-formatter.js +++ b/date-formatter.js @@ -107,6 +107,7 @@ const getDayName = ({ date, D, short, i18n }) => { localNow.getFullYear(), localNow.getMonth(), localNow.getDate() + ).getTime(); if (dateTimestamp >= todayBeginTimestamp) { if (dateTimestamp < (todayBeginTimestamp + 86400000)) { // within 24 hours diff --git a/dateformat b/dateformat new file mode 160000 index 0000000..1d50534 --- /dev/null +++ b/dateformat @@ -0,0 +1 @@ +Subproject commit 1d50534f755b8090d80c0abf6d0b6642826bf2ae