diff --git a/.babelrc b/.babelrc
index 332bba6f9..e240ad7aa 100644
--- a/.babelrc
+++ b/.babelrc
@@ -1,24 +1,25 @@
{
- "env": {
- "es": {
- "presets": [
- ["@babel/preset-env", {
- "modules": false
- }]
- ]
- },
- "development": {
- "presets": [
- ["@babel/preset-env", { "targets": { "node": "0.10" } }]
- ],
- "plugins": [
- [
- "add-module-exports",
- {
- "addDefaultProperty": true
- }
- ]
- ]
- }
+ "env": {
+ "es": {
+ "presets": [
+ [
+ "@babel/preset-env",
+ {
+ "modules": false
+ }
+ ]
+ ]
+ },
+ "development": {
+ "presets": [["@babel/preset-env", { "targets": { "node": "0.10" } }]],
+ "plugins": [
+ [
+ "add-module-exports",
+ {
+ "addDefaultProperty": true
+ }
+ ]
+ ]
}
-}
\ No newline at end of file
+ }
+}
diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 000000000..e69df2d3b
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,13 @@
+root = true
+
+[*]
+indent_style = space
+indent_size = 2
+end_of_line = lf
+charset = utf-8
+trim_trailing_whitespace = true
+insert_final_newline = true
+
+[*.md]
+max_line_length = 0
+trim_trailing_whitespace = false
diff --git a/.eslintrc.json b/.eslintrc.json
index 285c41e15..7282863a1 100644
--- a/.eslintrc.json
+++ b/.eslintrc.json
@@ -1,6 +1,7 @@
{
- "extends": "airbnb-base",
- "parser": "babel-eslint",
+ "extends": ["airbnb-base", "prettier"],
+ "parser": "@babel/eslint-parser",
+ "plugins": ["node"],
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
@@ -21,20 +22,40 @@
"newline-per-chained-call": 0,
"prefer-const": 0,
"linebreak-style": 0,
- "no-restricted-syntax": [2, "DebuggerStatement", "LabeledStatement", "WithStatement"],
+ "no-restricted-syntax": [
+ 2,
+ "DebuggerStatement",
+ "LabeledStatement",
+ "WithStatement"
+ ],
"no-restricted-globals": 0,
"prefer-destructuring": 0,
- "comma-dangle": [2, {
- "arrays": "always-multiline",
- "objects": "always-multiline",
- "imports": "always-multiline",
- "exports": "always-multiline",
- "functions": "never"
- }],
- "no-plusplus": [2, {
- "allowForLoopAfterthoughts": true
- }],
+ "comma-dangle": [
+ 2,
+ {
+ "arrays": "always-multiline",
+ "objects": "always-multiline",
+ "imports": "always-multiline",
+ "exports": "always-multiline",
+ "functions": "never"
+ }
+ ],
+ "no-plusplus": [
+ 2,
+ {
+ "allowForLoopAfterthoughts": true
+ }
+ ],
"no-prototype-builtins": 0,
- "no-useless-escape": 0
- }
+ "no-useless-escape": 0,
+ "node/file-extension-in-import": ["error", "always"]
+ },
+ "overrides": [
+ {
+ "files": ["*.js"],
+ "rules": {
+ "import/extensions": "off"
+ }
+ }
+ ]
}
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 000000000..4cab1f4d2
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,2 @@
+# Set the default behavior, in case people don't have core.autocrlf set.
+* text=auto
diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md
index feab2fa77..ccd456973 100644
--- a/.github/ISSUE_TEMPLATE/bug_report.md
+++ b/.github/ISSUE_TEMPLATE/bug_report.md
@@ -4,13 +4,11 @@ about: Create a report to help us improve
title: ''
labels: "\U0001F41B bug"
assignees: ''
-
---
**Describe the bug**
A clear and concise description of what the bug is.
-
**Examples**
If applicable, add screenshots to help explain your problem.
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 21686d855..6bfc2f819 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -9,22 +9,22 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
- node-version: [14, 12, 10, 8, 6]
+ node-version: [18, 16, 14]
name: Run tests on Node.js ${{ matrix.node-version }}
steps:
- - name: Setup Node.js ${{ matrix.node-version }}
- uses: actions/setup-node@v2-beta
- with:
- node-version: ${{ matrix.node-version }}
- check-latest: true
- - name: Checkout repository
- uses: actions/checkout@v2
- - name: Install dependencies
- run: npm install
- - name: Run tests
- run: npm test
- - if: matrix.node-version == 14
- name: Send coverage info to Codecov
- uses: codecov/codecov-action@v1
- with:
- file: ./coverage/cobertura-coverage.xml
+ - name: Setup Node.js ${{ matrix.node-version }}
+ uses: actions/setup-node@v2-beta
+ with:
+ node-version: ${{ matrix.node-version }}
+ check-latest: true
+ - name: Checkout repository
+ uses: actions/checkout@v2
+ - name: Install dependencies
+ run: npm install
+ - name: Run tests
+ run: npm test
+ - if: matrix.node-version == 18
+ name: Send coverage info to Codecov
+ uses: codecov/codecov-action@v1
+ with:
+ file: ./coverage/cobertura-coverage.xml
diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
index 2c6af7763..7a99da6df 100644
--- a/.github/workflows/codeql-analysis.yml
+++ b/.github/workflows/codeql-analysis.yml
@@ -9,14 +9,14 @@
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
-name: "CodeQL"
+name: 'CodeQL'
on:
push:
- branches: [ master ]
+ branches: [master]
pull_request:
# The branches below must be a subset of the branches above
- branches: [ master ]
+ branches: [master]
schedule:
- cron: '38 10 * * 4'
@@ -32,39 +32,39 @@ jobs:
strategy:
fail-fast: false
matrix:
- language: [ 'javascript' ]
+ language: ['javascript']
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
# Learn more about CodeQL language support at https://git.io/codeql-language-support
steps:
- - name: Checkout repository
- uses: actions/checkout@v2
+ - name: Checkout repository
+ uses: actions/checkout@v2
- # Initializes the CodeQL tools for scanning.
- - name: Initialize CodeQL
- uses: github/codeql-action/init@v2
- with:
- languages: ${{ matrix.language }}
- # If you wish to specify custom queries, you can do so here or in a config file.
- # By default, queries listed here will override any specified in a config file.
- # Prefix the list here with "+" to use these queries and those in the config file.
- # queries: ./path/to/local/query, your-org/your-repo/queries@main
+ # Initializes the CodeQL tools for scanning.
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@v2
+ with:
+ languages: ${{ matrix.language }}
+ # If you wish to specify custom queries, you can do so here or in a config file.
+ # By default, queries listed here will override any specified in a config file.
+ # Prefix the list here with "+" to use these queries and those in the config file.
+ # queries: ./path/to/local/query, your-org/your-repo/queries@main
- # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
- # If this step fails, then you should remove it and run the build manually (see below)
- - name: Autobuild
- uses: github/codeql-action/autobuild@v2
+ # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
+ # If this step fails, then you should remove it and run the build manually (see below)
+ - name: Autobuild
+ uses: github/codeql-action/autobuild@v2
- # ℹ️ Command-line programs to run using the OS shell.
- # 📚 https://git.io/JvXDl
+ # ℹ️ Command-line programs to run using the OS shell.
+ # 📚 https://git.io/JvXDl
- # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
- # and modify them (or add more) to build your code if your project
- # uses a compiled language
+ # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines
+ # and modify them (or add more) to build your code if your project
+ # uses a compiled language
- #- run: |
- # make bootstrap
- # make release
+ #- run: |
+ # make bootstrap
+ # make release
- - name: Perform CodeQL Analysis
- uses: github/codeql-action/analyze@v2
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v2
diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml
index b4b62f1b9..d0c630592 100644
--- a/.github/workflows/npm-publish.yml
+++ b/.github/workflows/npm-publish.yml
@@ -6,19 +6,19 @@ jobs:
publish:
runs-on: ubuntu-20.04
steps:
- - name: Setup Node.js 14
- uses: actions/setup-node@v2-beta
- with:
- node-version: 14
- check-latest: true
- registry-url: https://registry.npmjs.org/
- - name: Checkout Repository
- uses: actions/checkout@v2
- - name: Install Dependencies
- run: npm install
- - name: Run Tests
- run: npm test
- - name: Publish Package to NPM Registry
- run: npm publish
- env:
- NODE_AUTH_TOKEN: ${{secrets.NPM_SECRET}}
+ - name: Setup Node.js 18
+ uses: actions/setup-node@v2-beta
+ with:
+ node-version: 18
+ check-latest: true
+ registry-url: https://registry.npmjs.org/
+ - name: Checkout Repository
+ uses: actions/checkout@v2
+ - name: Install Dependencies
+ run: npm install
+ - name: Run Tests
+ run: npm test
+ - name: Publish Package to NPM Registry
+ run: npm publish
+ env:
+ NODE_AUTH_TOKEN: ${{secrets.NPM_SECRET}}
diff --git a/.gitignore b/.gitignore
index 86aaedee1..764919a9f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,11 +3,9 @@ node_modules
coverage
coverage.lcov
.nyc_output
-package-lock.json
yarn.lock
/es
/lib
/index.js
validator.js
validator.min.js
-
diff --git a/.nycrc b/.nycrc
index 6b79f893c..ac704fdda 100644
--- a/.nycrc
+++ b/.nycrc
@@ -1,9 +1,4 @@
{
- "reporter": [
- "html",
- "text-summary"
- ],
- "include": [
- "src/**/*.js"
- ]
+ "reporter": ["html", "text-summary"],
+ "include": ["src/**/*.js"]
}
diff --git a/.prettierignore b/.prettierignore
new file mode 100644
index 000000000..1b8ac8894
--- /dev/null
+++ b/.prettierignore
@@ -0,0 +1,3 @@
+# Ignore artifacts:
+build
+coverage
diff --git a/.prettierrc b/.prettierrc
new file mode 100644
index 000000000..c1a6f6671
--- /dev/null
+++ b/.prettierrc
@@ -0,0 +1,4 @@
+{
+ "singleQuote": true,
+ "trailingComma": "es5"
+}
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 8d27cf979..67cfa36cb 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -3,30 +3,28 @@
### New Features / Validators
- [#2144](https://github.com/validatorjs/validator.js/pull/2144) `isFreightContainerID`: for shipping containers IDs @songyuew
-- [#2188](https://github.com/validatorjs/validator.js/pull/2188) `isMailtoURI` @uksarkar
+- [#2188](https://github.com/validatorjs/validator.js/pull/2188) `isMailtoURI` @uksarkar
### Fixes, New Locales and Enhancements
- [#2025](https://github.com/validatorjs/validator.js/pull/2025) `isIBAN` add `MA` locale @lroudge
-- [#2117](https://github.com/validatorjs/validator.js/pull/2117) `isCreditCard` refactor @pano9000
+- [#2117](https://github.com/validatorjs/validator.js/pull/2117) `isCreditCard` refactor @pano9000
- [#2189](https://github.com/validatorjs/validator.js/pull/2189) `isLocale` add support for more language tags @kwahome
-- [#2203](https://github.com/validatorjs/validator.js/pull/2203) `isVAT` for `CU` @jimmyorpheus
-- [#2217](https://github.com/validatorjs/validator.js/pull/2217) `isJWT` @Prathamesh061
-- [#2222](https://github.com/validatorjs/validator.js/pull/2222) `IsFQDN` test enhancements @aalekhpatel07
-- [#2226](https://github.com/validatorjs/validator.js/pull/2226) `isAlpha`, `isAlphanumeric` for `kk-KZ` @BekStar7
-- [#2229](https://github.com/validatorjs/validator.js/pull/2229) `isEmail` support `allow_underscores` @guspower
-- [#2231](https://github.com/validatorjs/validator.js/pull/2231) `isDate` enhance Date declaration compatibility across multiple environments @CiprianS
-- [#2235](https://github.com/validatorjs/validator.js/pull/2235) `isIBAN` add white and blacklist options to the isIBAN validator @edilson
-- [#2237](https://github.com/validatorjs/validator.js/pull/2237) `isEmail` do not allow non-breaking space in user part @jeremy21212121
+- [#2203](https://github.com/validatorjs/validator.js/pull/2203) `isVAT` for `CU` @jimmyorpheus
+- [#2217](https://github.com/validatorjs/validator.js/pull/2217) `isJWT` @Prathamesh061
+- [#2222](https://github.com/validatorjs/validator.js/pull/2222) `IsFQDN` test enhancements @aalekhpatel07
+- [#2226](https://github.com/validatorjs/validator.js/pull/2226) `isAlpha`, `isAlphanumeric` for `kk-KZ` @BekStar7
+- [#2229](https://github.com/validatorjs/validator.js/pull/2229) `isEmail` support `allow_underscores` @guspower
+- [#2231](https://github.com/validatorjs/validator.js/pull/2231) `isDate` enhance Date declaration compatibility across multiple environments @CiprianS
+- [#2235](https://github.com/validatorjs/validator.js/pull/2235) `isIBAN` add white and blacklist options to the isIBAN validator @edilson
+- [#2237](https://github.com/validatorjs/validator.js/pull/2237) `isEmail` do not allow non-breaking space in user part @jeremy21212121
- `isMobilePhone`:
- [#2175](https://github.com/validatorjs/validator.js/pull/2175) `so-SO` @ohersi
- [#2176](https://github.com/validatorjs/validator.js/pull/2176) `fr-CF` @cheboi
- - [#2197](https://github.com/validatorjs/validator.js/pull/2197) `es-CU` @klaframboise
- - [#2202](https://github.com/validatorjs/validator.js/pull/2202) `pl-PL` @czerwony03
- - [#2209](https://github.com/validatorjs/validator.js/pull/2209) `fr-WF` @aidos42
- - [#2246](https://github.com/validatorjs/validator.js/pull/2246) `ar-SD` @Hussienma
-
-
+ - [#2197](https://github.com/validatorjs/validator.js/pull/2197) `es-CU` @klaframboise
+ - [#2202](https://github.com/validatorjs/validator.js/pull/2202) `pl-PL` @czerwony03
+ - [#2209](https://github.com/validatorjs/validator.js/pull/2209) `fr-WF` @aidos42
+ - [#2246](https://github.com/validatorjs/validator.js/pull/2246) `ar-SD` @Hussienma
# 13.9.0
@@ -56,6 +54,7 @@
- [#2020](https://github.com/validatorjs/validator.js/pull/2170) `isFloat`: fix comma(,) passing as float @frederike-ramin
- Documentation fixes:
+
- [#1860](https://github.com/validatorjs/validator.js/pull/1860) @leonardovillela
- [#1861](https://github.com/validatorjs/validator.js/pull/1860) @tux-tn
- [#1957](https://github.com/validatorjs/validator.js/pull/1957) @tfilo
@@ -71,18 +70,22 @@
### New and Improved Locales
- `isAlpha`, `isAlphanumeric`:
+
- [#1678](https://github.com/validatorjs/validator.js/pull/1678) `bn-BD` @rak810
- [#1996](https://github.com/validatorjs/validator.js/pull/1996) `si-LK` @melkorCBA
- [#2014](https://github.com/validatorjs/validator.js/pull/2014) `ja-JP` @starcharles
- [#1995](https://github.com/validatorjs/validator.js/pull/1995) `ko-KR` @Dongkyuuuu
- `isBIC`:
+
- [#2046](https://github.com/validatorjs/validator.js/pull/2046) `XK` @import-brain
- `isIdentityCard`:
+
- [#2142](https://github.com/validatorjs/validator.js/pull/2142) `hk-HK` @Dongkyuuuu
- `isMobilePhone`:
+
- [#1813](https://github.com/validatorjs/validator.js/pull/1813) `my-MM`, @ferdousulhaque
- [#1868](https://github.com/validatorjs/validator.js/pull/1868) `de-DE`, @thomaschaaf
- [#1896](https://github.com/validatorjs/validator.js/pull/1896) `en-LS`, @DevilsAutumn
@@ -117,6 +120,7 @@
- [#2156](https://github.com/validatorjs/validator.js/pull/2156) `ro-RO`, @pano9000
- `isLicensePlate`:
+
- [#1665](https://github.com/validatorjs/validator.js/pull/1665) `sv-SE`, @elmaxe
- [#1895](https://github.com/validatorjs/validator.js/pull/1895) `hu-HU`, @szabolcstarnai
- [#1944](https://github.com/validatorjs/validator.js/pull/1944) `en-NI`, @NishantJS
@@ -125,16 +129,17 @@
- [#2103](https://github.com/validatorjs/validator.js/pull/2103) `es-AR`, @alvarocastro
- `isPassportNumber`:
+
- [#1515](https://github.com/validatorjs/validator.js/pull/1515) `JM`,`KZ`,`LI`,`NZ` @JuanFML
- [#1814](https://github.com/validatorjs/validator.js/pull/1814) `TH` @TonPC64 @braaar
- [#2061](https://github.com/validatorjs/validator.js/pull/2061) `AZ` @djeks922
- [#2073](https://github.com/validatorjs/validator.js/pull/2073) `PH`,`PK` @digambar-t7
- `isPostalCode`:
+
- [#1951](https://github.com/validatorjs/validator.js/pull/1951) `BA`, @matheusnascgomes
- [#2134](https://github.com/validatorjs/validator.js/pull/2134) `BY`, @pano9000
- [#2136](https://github.com/validatorjs/validator.js/pull/2136) `IR`, @pano9000
-
- `isTaxID`:
- [#1867](https://github.com/validatorjs/validator.js/pull/1867) `en-CA`, @boonya
@@ -177,26 +182,31 @@
### New and Improved Locales
- `isAlpha`, `isAlphanumeric`:
+
- [#1716](https://github.com/validatorjs/validator.js/pull/1716) `hi-IN` @MiKr13
- [#1837](https://github.com/validatorjs/validator.js/pull/1837) `fi-FI` @Marcholio
- `isPassportNumber`:
+
- [#1656](https://github.com/validatorjs/validator.js/pull/1656) `ID` @rubiin
- [#1714](https://github.com/validatorjs/validator.js/pull/1714) `CN` @anirudhgiri
- [#1809](https://github.com/validatorjs/validator.js/pull/1809) `PL` @Ronqn
- [#1810](https://github.com/validatorjs/validator.js/pull/1810) `RU` @Theta-Dev
- `isPostalCode`:
+
- [#1788](https://github.com/validatorjs/validator.js/pull/1788) `LK` @nimanthadilz
- `isIdentityCard`:
+
- [#1657](https://github.com/validatorjs/validator.js/pull/1657) `TH` @tithanayut
- [#1745](https://github.com/validatorjs/validator.js/pull/1745) `PL` @wiktorwojcik112 @fedeci @tux-tn
- [#1786](https://github.com/validatorjs/validator.js/pull/1786) `LK` @nimanthadilz @tux-tn
- [#1838](https://github.com/validatorjs/validator.js/pull/1838) `FI` @Marcholio
- `isMobilePhone`:
- - [#1679](https://github.com/validatorjs/validator.js/pull/1679) `de-DE` @AnnaMariaJansen
+
+ - [#1679](https://github.com/validatorjs/validator.js/pull/1679) `de-DE` @AnnaMariaJansen
- [#1689](https://github.com/validatorjs/validator.js/pull/1689) `vi-VN` @luisrivas
- [#1695](https://github.com/validatorjs/validator.js/pull/1695) [#1682](https://github.com/validatorjs/validator.js/pull/1682) `zh-CN` @laulujan @yisibl
- [#1734](https://github.com/validatorjs/validator.js/pull/1734) `es-VE` @islasjuanp
@@ -219,6 +229,7 @@
- [#1846](https://github.com/validatorjs/validator.js/pull/1846) `tg-TJ` @mgnss
- `isLicensePlate`:
+
- [#1565](https://github.com/validatorjs/validator.js/pull/1565) `cs-CZ` @filiptronicek
- [#1790](https://github.com/validatorjs/validator.js/pull/1790) `fi-FI` @Marcholio
@@ -228,9 +239,11 @@
#### 13.6.1
- **New features**:
+
- [#1495](https://github.com/validatorjs/validator.js/pull/1495) `isLicensePlate` @firlus
- **Fixes and Enhancements**:
+
- [#1651](https://github.com/validatorjs/validator.js/pull/1651) fix ReDOS vulnerabilities in `isHSL` and `isEmail` @tux-tn
- [#1644](https://github.com/validatorjs/validator.js/pull/1644) `isURL`: Allow URLs to have only a username in the userinfo subcomponent @jbuchmann-coosto
- [#1633](https://github.com/validatorjs/validator.js/pull/1633) `isISIN`: optimization @bmacnaughton
@@ -272,12 +285,14 @@
#### ~~13.5.0~~ 13.5.1
- **New features**:
+
- `isVAT` [#1463](https://github.com/validatorjs/validator.js/pull/1463) @ CodingNagger
- `isTaxID` [#1446](https://github.com/validatorjs/validator.js/pull/1446) @tplessas
- `isBase58` [#1445](https://github.com/validatorjs/validator.js/pull/1445) @ezkemboi
- `isStrongPassword` [#1348](https://github.com/validatorjs/validator.js/pull/1348) @door-bell
- **Fixes and Enhancements**:
+
- [#1486](https://github.com/validatorjs/validator.js/pull/1486) `isISO8601`: add `strictSeparator` @brostone51
- [#1474](https://github.com/validatorjs/validator.js/pull/1474) `isFQDN`: make more strict @CristhianMotoche
- [#1469](https://github.com/validatorjs/validator.js/pull/1469) `isFQDN`: `allow_underscore` option @gibson042
@@ -321,10 +336,11 @@
- **New features**:
- None
- **Fixes and chores**:
+
- [#1425](https://github.com/validatorjs/validator.js/pull/1425) fix validation for _userinfo_ part for `isURL` @heanzyzabala
- - [#1419](https://github.com/validatorjs/validator.js/pull/1419) fix `isBase32` and `isBase64` to validate empty strings properly @AberDerBart
- - [#1408](https://github.com/validatorjs/validator.js/pull/1408) tests for `isTaxId` @dspinellis
- - [#1397](https://github.com/validatorjs/validator.js/pull/1397) added `validate_length` option for `isURL` @tomgrossman
+ - [#1419](https://github.com/validatorjs/validator.js/pull/1419) fix `isBase32` and `isBase64` to validate empty strings properly @AberDerBart
+ - [#1408](https://github.com/validatorjs/validator.js/pull/1408) tests for `isTaxId` @dspinellis
+ - [#1397](https://github.com/validatorjs/validator.js/pull/1397) added `validate_length` option for `isURL` @tomgrossman
- [#1383](https://github.com/validatorjs/validator.js/pull/1383) [#1428](https://github.com/validatorjs/validator.js/pull/1428) doc typos @0xflotus @timgates42
- [#1376](https://github.com/validatorjs/validator.js/pull/1376) add missing tests and switch to Coverall @tux-tn
- [#1373](https://github.com/validatorjs/validator.js/pull/1373) improve code coverage @ezkemboi
@@ -351,7 +367,6 @@
- `isIdentityCard`:
- [#1384](https://github.com/validatorjs/validator.js/pull/1384) `IT` @lorenzodb1
-
#### 13.1.1
- Hotfix for a regex incompatibility in some browsers
@@ -383,24 +398,24 @@
([#1338](https://github.com/validatorjs/validator.js/pull/1338))
- New and improved locales
([#1112](https://github.com/validatorjs/validator.js/pull/1112),
- [#1167](https://github.com/validatorjs/validator.js/pull/1167),
- [#1198](https://github.com/validatorjs/validator.js/pull/1198),
- [#1199](https://github.com/validatorjs/validator.js/pull/1199),
- [#1273](https://github.com/validatorjs/validator.js/pull/1273),
- [#1279](https://github.com/validatorjs/validator.js/pull/1279),
- [#1281](https://github.com/validatorjs/validator.js/pull/1281),
- [#1293](https://github.com/validatorjs/validator.js/pull/1293),
- [#1294](https://github.com/validatorjs/validator.js/pull/1294),
- [#1311](https://github.com/validatorjs/validator.js/pull/1311),
- [#1312](https://github.com/validatorjs/validator.js/pull/1312),
- [#1313](https://github.com/validatorjs/validator.js/pull/1313),
- [#1314](https://github.com/validatorjs/validator.js/pull/1314),
- [#1315](https://github.com/validatorjs/validator.js/pull/1315),
- [#1317](https://github.com/validatorjs/validator.js/pull/1317),
- [#1322](https://github.com/validatorjs/validator.js/pull/1322),
- [#1324](https://github.com/validatorjs/validator.js/pull/1324),
- [#1330](https://github.com/validatorjs/validator.js/pull/1330),
- [#1337](https://github.com/validatorjs/validator.js/pull/1337))
+ [#1167](https://github.com/validatorjs/validator.js/pull/1167),
+ [#1198](https://github.com/validatorjs/validator.js/pull/1198),
+ [#1199](https://github.com/validatorjs/validator.js/pull/1199),
+ [#1273](https://github.com/validatorjs/validator.js/pull/1273),
+ [#1279](https://github.com/validatorjs/validator.js/pull/1279),
+ [#1281](https://github.com/validatorjs/validator.js/pull/1281),
+ [#1293](https://github.com/validatorjs/validator.js/pull/1293),
+ [#1294](https://github.com/validatorjs/validator.js/pull/1294),
+ [#1311](https://github.com/validatorjs/validator.js/pull/1311),
+ [#1312](https://github.com/validatorjs/validator.js/pull/1312),
+ [#1313](https://github.com/validatorjs/validator.js/pull/1313),
+ [#1314](https://github.com/validatorjs/validator.js/pull/1314),
+ [#1315](https://github.com/validatorjs/validator.js/pull/1315),
+ [#1317](https://github.com/validatorjs/validator.js/pull/1317),
+ [#1322](https://github.com/validatorjs/validator.js/pull/1322),
+ [#1324](https://github.com/validatorjs/validator.js/pull/1324),
+ [#1330](https://github.com/validatorjs/validator.js/pull/1330),
+ [#1337](https://github.com/validatorjs/validator.js/pull/1337))
#### 13.0.0
@@ -433,7 +448,7 @@
([#1267](https://github.com/validatorjs/validator.js/pull/1267))
- New and improved locales
([#1238](https://github.com/validatorjs/validator.js/pull/1238),
- [#1265](https://github.com/validatorjs/validator.js/pull/1265))
+ [#1265](https://github.com/validatorjs/validator.js/pull/1265))
#### 12.2.0
@@ -443,10 +458,10 @@
([#1227](https://github.com/validatorjs/validator.js/pull/1227))
- New and improved locales
([#1200](https://github.com/validatorjs/validator.js/pull/1200),
- [#1207](https://github.com/validatorjs/validator.js/pull/1207),
- [#1213](https://github.com/validatorjs/validator.js/pull/1213),
- [#1217](https://github.com/validatorjs/validator.js/pull/1217),
- [#1234](https://github.com/validatorjs/validator.js/pull/1234))
+ [#1207](https://github.com/validatorjs/validator.js/pull/1207),
+ [#1213](https://github.com/validatorjs/validator.js/pull/1213),
+ [#1217](https://github.com/validatorjs/validator.js/pull/1217),
+ [#1234](https://github.com/validatorjs/validator.js/pull/1234))
#### 12.1.0
@@ -456,9 +471,9 @@
([#1160](https://github.com/validatorjs/validator.js/pull/1160))
- New and improved locales
([#1162](https://github.com/validatorjs/validator.js/pull/1162),
- [#1183](https://github.com/validatorjs/validator.js/pull/1183),
- [#1187](https://github.com/validatorjs/validator.js/pull/1187),
- [#1191](https://github.com/validatorjs/validator.js/pull/1191))
+ [#1183](https://github.com/validatorjs/validator.js/pull/1183),
+ [#1187](https://github.com/validatorjs/validator.js/pull/1187),
+ [#1191](https://github.com/validatorjs/validator.js/pull/1191))
#### 12.0.0
@@ -480,18 +495,18 @@
([#1074](https://github.com/validatorjs/validator.js/pull/1074))
- New and improved locales
([#1059](https://github.com/validatorjs/validator.js/pull/1059),
- [#1060](https://github.com/validatorjs/validator.js/pull/1060),
- [#1069](https://github.com/validatorjs/validator.js/pull/1069),
- [#1073](https://github.com/validatorjs/validator.js/pull/1073),
- [#1082](https://github.com/validatorjs/validator.js/pull/1082),
- [#1092](https://github.com/validatorjs/validator.js/pull/1092),
- [#1121](https://github.com/validatorjs/validator.js/pull/1121),
- [#1125](https://github.com/validatorjs/validator.js/pull/1125),
- [#1132](https://github.com/validatorjs/validator.js/pull/1132),
- [#1152](https://github.com/validatorjs/validator.js/pull/1152),
- [#1165](https://github.com/validatorjs/validator.js/pull/1165),
- [#1166](https://github.com/validatorjs/validator.js/pull/1166),
- [#1174](https://github.com/validatorjs/validator.js/pull/1174))
+ [#1060](https://github.com/validatorjs/validator.js/pull/1060),
+ [#1069](https://github.com/validatorjs/validator.js/pull/1069),
+ [#1073](https://github.com/validatorjs/validator.js/pull/1073),
+ [#1082](https://github.com/validatorjs/validator.js/pull/1082),
+ [#1092](https://github.com/validatorjs/validator.js/pull/1092),
+ [#1121](https://github.com/validatorjs/validator.js/pull/1121),
+ [#1125](https://github.com/validatorjs/validator.js/pull/1125),
+ [#1132](https://github.com/validatorjs/validator.js/pull/1132),
+ [#1152](https://github.com/validatorjs/validator.js/pull/1152),
+ [#1165](https://github.com/validatorjs/validator.js/pull/1165),
+ [#1166](https://github.com/validatorjs/validator.js/pull/1166),
+ [#1174](https://github.com/validatorjs/validator.js/pull/1174))
#### 11.1.0
@@ -499,15 +514,15 @@
([#1024](https://github.com/validatorjs/validator.js/pull/1024))
- New and improved locales
([#1035](https://github.com/validatorjs/validator.js/pull/1035),
- [#1040](https://github.com/validatorjs/validator.js/pull/1040),
- [#1041](https://github.com/validatorjs/validator.js/pull/1041),
- [#1048](https://github.com/validatorjs/validator.js/pull/1048),
- [#1049](https://github.com/validatorjs/validator.js/pull/1049),
- [#1052](https://github.com/validatorjs/validator.js/pull/1052),
- [#1054](https://github.com/validatorjs/validator.js/pull/1054),
- [#1055](https://github.com/validatorjs/validator.js/pull/1055),
- [#1056](https://github.com/validatorjs/validator.js/pull/1056),
- [#1057](https://github.com/validatorjs/validator.js/pull/1057))
+ [#1040](https://github.com/validatorjs/validator.js/pull/1040),
+ [#1041](https://github.com/validatorjs/validator.js/pull/1041),
+ [#1048](https://github.com/validatorjs/validator.js/pull/1048),
+ [#1049](https://github.com/validatorjs/validator.js/pull/1049),
+ [#1052](https://github.com/validatorjs/validator.js/pull/1052),
+ [#1054](https://github.com/validatorjs/validator.js/pull/1054),
+ [#1055](https://github.com/validatorjs/validator.js/pull/1055),
+ [#1056](https://github.com/validatorjs/validator.js/pull/1056),
+ [#1057](https://github.com/validatorjs/validator.js/pull/1057))
#### 11.0.0
@@ -521,11 +536,11 @@
([0277eb](https://github.com/validatorjs/validator.js/commit/0277eb00d245a3479af52adf7d927d4036895650))
- New and improved locales
([#999](https://github.com/validatorjs/validator.js/pull/999),
- [#1010](https://github.com/validatorjs/validator.js/pull/1010),
- [#1017](https://github.com/validatorjs/validator.js/pull/1017),
- [#1022](https://github.com/validatorjs/validator.js/pull/1022),
- [#1031](https://github.com/validatorjs/validator.js/pull/1031),
- [#1032](https://github.com/validatorjs/validator.js/pull/1032))
+ [#1010](https://github.com/validatorjs/validator.js/pull/1010),
+ [#1017](https://github.com/validatorjs/validator.js/pull/1017),
+ [#1022](https://github.com/validatorjs/validator.js/pull/1022),
+ [#1031](https://github.com/validatorjs/validator.js/pull/1031),
+ [#1032](https://github.com/validatorjs/validator.js/pull/1032))
#### 10.11.0
@@ -540,9 +555,9 @@
([#932](https://github.com/validatorjs/validator.js/pull/932))
- New and improved locales
([#931](https://github.com/validatorjs/validator.js/pull/931),
- [#933](https://github.com/validatorjs/validator.js/pull/933),
- [#947](https://github.com/validatorjs/validator.js/pull/947),
- [#950](https://github.com/validatorjs/validator.js/pull/950))
+ [#933](https://github.com/validatorjs/validator.js/pull/933),
+ [#947](https://github.com/validatorjs/validator.js/pull/947),
+ [#950](https://github.com/validatorjs/validator.js/pull/950))
#### 10.9.0
@@ -554,11 +569,11 @@
([#906](https://github.com/validatorjs/validator.js/pull/906))
- New and improved locales
([#899](https://github.com/validatorjs/validator.js/pull/899),
- [#904](https://github.com/validatorjs/validator.js/pull/904),
- [#913](https://github.com/validatorjs/validator.js/pull/913),
- [#916](https://github.com/validatorjs/validator.js/pull/916),
- [#925](https://github.com/validatorjs/validator.js/pull/925),
- [#928](https://github.com/validatorjs/validator.js/pull/928))
+ [#904](https://github.com/validatorjs/validator.js/pull/904),
+ [#913](https://github.com/validatorjs/validator.js/pull/913),
+ [#916](https://github.com/validatorjs/validator.js/pull/916),
+ [#925](https://github.com/validatorjs/validator.js/pull/925),
+ [#928](https://github.com/validatorjs/validator.js/pull/928))
#### 10.8.0
@@ -568,7 +583,7 @@
([#895](https://github.com/validatorjs/validator.js/pull/895))
- Locales are now exported
([#890](https://github.com/validatorjs/validator.js/pull/890),
- [#892](https://github.com/validatorjs/validator.js/pull/892))
+ [#892](https://github.com/validatorjs/validator.js/pull/892))
- New locale
([#896](https://github.com/validatorjs/validator.js/pull/896))
@@ -594,7 +609,7 @@
([#880](https://github.com/validatorjs/validator.js/pull/880))
- New and improved locales
([#878](https://github.com/validatorjs/validator.js/pull/878),
- [#879](https://github.com/validatorjs/validator.js/pull/879))
+ [#879](https://github.com/validatorjs/validator.js/pull/879))
#### 10.5.0
@@ -610,14 +625,14 @@
([#860](https://github.com/validatorjs/validator.js/issues/860))
- New and improved locales
([#801](https://github.com/validatorjs/validator.js/pull/801),
- [#856](https://github.com/validatorjs/validator.js/pull/856),
- [#859](https://github.com/validatorjs/validator.js/issues/859),
- [#861](https://github.com/validatorjs/validator.js/pull/861),
- [#862](https://github.com/validatorjs/validator.js/pull/862),
- [#863](https://github.com/validatorjs/validator.js/pull/863),
- [#864](https://github.com/validatorjs/validator.js/pull/864),
- [#870](https://github.com/validatorjs/validator.js/pull/870),
- [#872](https://github.com/validatorjs/validator.js/pull/872))
+ [#856](https://github.com/validatorjs/validator.js/pull/856),
+ [#859](https://github.com/validatorjs/validator.js/issues/859),
+ [#861](https://github.com/validatorjs/validator.js/pull/861),
+ [#862](https://github.com/validatorjs/validator.js/pull/862),
+ [#863](https://github.com/validatorjs/validator.js/pull/863),
+ [#864](https://github.com/validatorjs/validator.js/pull/864),
+ [#870](https://github.com/validatorjs/validator.js/pull/870),
+ [#872](https://github.com/validatorjs/validator.js/pull/872))
#### 10.4.0
@@ -634,8 +649,8 @@
([#832](https://github.com/validatorjs/validator.js/pull/832))
- New locales
([#831](https://github.com/validatorjs/validator.js/pull/831),
- [#835](https://github.com/validatorjs/validator.js/pull/835),
- [#836](https://github.com/validatorjs/validator.js/pull/836))
+ [#835](https://github.com/validatorjs/validator.js/pull/835),
+ [#836](https://github.com/validatorjs/validator.js/pull/836))
#### 10.2.0
@@ -683,10 +698,10 @@
- New and improved locales
([#763](https://github.com/validatorjs/validator.js/pull/763),
- [#768](https://github.com/validatorjs/validator.js/pull/768),
- [#774](https://github.com/validatorjs/validator.js/pull/774),
- [#777](https://github.com/validatorjs/validator.js/pull/777),
- [#779](https://github.com/validatorjs/validator.js/pull/779))
+ [#768](https://github.com/validatorjs/validator.js/pull/768),
+ [#774](https://github.com/validatorjs/validator.js/pull/774),
+ [#777](https://github.com/validatorjs/validator.js/pull/777),
+ [#779](https://github.com/validatorjs/validator.js/pull/779))
#### 9.2.0
@@ -694,8 +709,8 @@
([#760](https://github.com/validatorjs/validator.js/pull/760))
- New and improved locales
([#753](https://github.com/validatorjs/validator.js/pull/753),
- [#755](https://github.com/validatorjs/validator.js/pull/755),
- [#764](https://github.com/validatorjs/validator.js/pull/764))
+ [#755](https://github.com/validatorjs/validator.js/pull/755),
+ [#764](https://github.com/validatorjs/validator.js/pull/764))
#### 9.1.2
@@ -706,7 +721,7 @@
- Locale fixes
([#738](https://github.com/validatorjs/validator.js/pull/738),
- [#739](https://github.com/validatorjs/validator.js/pull/739))
+ [#739](https://github.com/validatorjs/validator.js/pull/739))
#### 9.1.0
@@ -714,7 +729,7 @@
([#734](https://github.com/validatorjs/validator.js/pull/734))
- New locales
([#735](https://github.com/validatorjs/validator.js/pull/735),
- [#737](https://github.com/validatorjs/validator.js/pull/737))
+ [#737](https://github.com/validatorjs/validator.js/pull/737))
#### 9.0.0
@@ -735,10 +750,10 @@
([#713](https://github.com/validatorjs/validator.js/pull/713))
- New and improved locales
([#700](https://github.com/validatorjs/validator.js/pull/700),
- [#701](https://github.com/validatorjs/validator.js/pull/701),
- [#714](https://github.com/validatorjs/validator.js/pull/714),
- [#715](https://github.com/validatorjs/validator.js/pull/715),
- [#718](https://github.com/validatorjs/validator.js/pull/718))
+ [#701](https://github.com/validatorjs/validator.js/pull/701),
+ [#714](https://github.com/validatorjs/validator.js/pull/714),
+ [#715](https://github.com/validatorjs/validator.js/pull/715),
+ [#718](https://github.com/validatorjs/validator.js/pull/718))
#### 8.1.0
@@ -774,7 +789,7 @@
([#677](https://github.com/validatorjs/validator.js/pull/677))
- New locales
([#673](https://github.com/validatorjs/validator.js/pull/673),
- [#676](https://github.com/validatorjs/validator.js/pull/676))
+ [#676](https://github.com/validatorjs/validator.js/pull/676))
#### 7.1.0
@@ -787,9 +802,9 @@
([#655](https://github.com/validatorjs/validator.js/issues/655))
- New locales
([#647](https://github.com/validatorjs/validator.js/pull/647),
- [#667](https://github.com/validatorjs/validator.js/pull/667),
- [#667](https://github.com/validatorjs/validator.js/pull/667),
- [#671](https://github.com/validatorjs/validator.js/pull/671))
+ [#667](https://github.com/validatorjs/validator.js/pull/667),
+ [#667](https://github.com/validatorjs/validator.js/pull/667),
+ [#671](https://github.com/validatorjs/validator.js/pull/671))
#### 7.0.0
@@ -801,9 +816,9 @@
([#618](https://github.com/validatorjs/validator.js/issues/618))
- New locales
([#616](https://github.com/validatorjs/validator.js/pull/616),
- [#622](https://github.com/validatorjs/validator.js/pull/622),
- [#627](https://github.com/validatorjs/validator.js/pull/627),
- [#630](https://github.com/validatorjs/validator.js/pull/630))
+ [#622](https://github.com/validatorjs/validator.js/pull/622),
+ [#627](https://github.com/validatorjs/validator.js/pull/627),
+ [#630](https://github.com/validatorjs/validator.js/pull/630))
#### 6.2.1
@@ -855,7 +870,7 @@
([#576](https://github.com/validatorjs/validator.js/pull/576))
- New locales
([#575](https://github.com/validatorjs/validator.js/pull/575),
- [#552](https://github.com/validatorjs/validator.js/issues/552))
+ [#552](https://github.com/validatorjs/validator.js/issues/552))
#### 5.6.0
@@ -997,7 +1012,7 @@
([#471](https://github.com/validatorjs/validator.js/pull/471))
- Tweak Greek and Chinese mobile phone validation
([#467](https://github.com/validatorjs/validator.js/pull/467),
- [#468](https://github.com/validatorjs/validator.js/pull/468))
+ [#468](https://github.com/validatorjs/validator.js/pull/468))
- Fixed a bug in `isDate()` when validating ISO 8601 dates without a timezone
([#472](https://github.com/validatorjs/validator.js/issues/472))
diff --git a/README.md b/README.md
index e00b7cfac..418c93530 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,5 @@
# validator.js
+
[![NPM version][npm-image]][npm-url]
[![CI][ci-image]][ci-url]
[![Coverage][codecov-image]][codecov-url]
@@ -60,12 +61,6 @@ The library can be loaded either as a standalone script, or through an [AMD][amd
```
-The library can also be installed through [bower][bower]
-
-```bash
-$ bower install validator-js
-```
-
CDN
```html
@@ -86,114 +81,114 @@ Thank you to the people who have already contributed:
Here is a list of the validators currently available.
-Validator | Description
---------------------------------------- | --------------------------------------
-**contains(str, seed [, options])** | check if the string contains the seed.
`options` is an object that defaults to `{ ignoreCase: false, minOccurrences: 1 }`.
Options:
`ignoreCase`: Ignore case when doing comparison, default false.
`minOccurences`: Minimum number of occurrences for the seed in the string. Defaults to 1.
-**equals(str, comparison)** | check if the string matches the comparison.
-**isAfter(str [, options])** | check if the string is a date that is after the specified date.
`options` is an object that defaults to `{ comparisonDate: Date().toString() }`.
**Options:**
`comparisonDate`: Date to compare to. Defaults to `Date().toString()` (now).
-**isAlpha(str [, locale, options])** | check if the string contains only letters (a-zA-Z).
`locale` is one of `['ar', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-LB', 'ar-LY', 'ar-MA', 'ar-QA', 'ar-QM', 'ar-SA', 'ar-SD', 'ar-SY', 'ar-TN', 'ar-YE', 'bg-BG', 'bn', 'cs-CZ', 'da-DK', 'de-DE', 'el-GR', 'en-AU', 'en-GB', 'en-HK', 'en-IN', 'en-NZ', 'en-US', 'en-ZA', 'en-ZM', 'es-ES', 'fa-IR', 'fi-FI', 'fr-CA', 'fr-FR', 'he', 'hi-IN', 'hu-HU', 'it-IT', 'kk-KZ', 'ko-KR', 'ja-JP', 'ku-IQ', 'nb-NO', 'nl-NL', 'nn-NO', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'si-LK', 'sl-SI', 'sk-SK', 'sr-RS', 'sr-RS@latin', 'sv-SE', 'th-TH', 'tr-TR', 'uk-UA']` and defaults to `en-US`. Locale list is `validator.isAlphaLocales`. `options` is an optional object that can be supplied with the following key(s): `ignore` which can either be a String or RegExp of characters to be ignored e.g. " -" will ignore spaces and -'s.
-**isAlphanumeric(str [, locale, options])** | check if the string contains only letters and numbers (a-zA-Z0-9).
`locale` is one of `['ar', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-LB', 'ar-LY', 'ar-MA', 'ar-QA', 'ar-QM', 'ar-SA', 'ar-SD', 'ar-SY', 'ar-TN', 'ar-YE', 'bn', 'bg-BG', 'cs-CZ', 'da-DK', 'de-DE', 'el-GR', 'en-AU', 'en-GB', 'en-HK', 'en-IN', 'en-NZ', 'en-US', 'en-ZA', 'en-ZM', 'es-ES', 'fa-IR', 'fi-FI', 'fr-CA', 'fr-FR', 'he', 'hi-IN', 'hu-HU', 'it-IT', 'kk-KZ', 'ko-KR', 'ja-JP','ku-IQ', 'nb-NO', 'nl-NL', 'nn-NO', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'si-LK', 'sl-SI', 'sk-SK', 'sr-RS', 'sr-RS@latin', 'sv-SE', 'th-TH', 'tr-TR', 'uk-UA']`) and defaults to `en-US`. Locale list is `validator.isAlphanumericLocales`. `options` is an optional object that can be supplied with the following key(s): `ignore` which can either be a String or RegExp of characters to be ignored e.g. " -" will ignore spaces and -'s.
-**isAscii(str)** | check if the string contains ASCII chars only.
-**isBase32(str [, options])** | check if the string is base32 encoded. `options` is optional and defaults to `{ crockford: false }`.
When `crockford` is true it tests the given base32 encoded string using [Crockford's base32 alternative][Crockford Base32].
-**isBase58(str)** | check if the string is base58 encoded.
-**isBase64(str [, options])** | check if the string is base64 encoded. `options` is optional and defaults to `{ urlSafe: false }`
when `urlSafe` is true it tests the given base64 encoded string is [url safe][Base64 URL Safe].
-**isBefore(str [, date])** | check if the string is a date that is before the specified date.
-**isBIC(str)** | check if the string is a BIC (Bank Identification Code) or SWIFT code.
-**isBoolean(str [, options])** | check if the string is a boolean.
`options` is an object which defaults to `{ loose: false }`. If `loose` is is set to false, the validator will strictly match ['true', 'false', '0', '1']. If `loose` is set to true, the validator will also match 'yes', 'no', and will match a valid boolean string of any case. (e.g.: ['true', 'True', 'TRUE']).
-**isBtcAddress(str)** | check if the string is a valid BTC address.
-**isByteLength(str [, options])** | check if the string's length (in UTF-8 bytes) falls in a range.
`options` is an object which defaults to `{ min: 0, max: undefined }`.
-**isCreditCard(str [, options])** | check if the string is a credit card number.
`options` is an optional object that can be supplied with the following key(s): `provider` is an optional key whose value should be a string, and defines the company issuing the credit card. Valid values include `['amex', 'dinersclub', 'discover', 'jcb', 'mastercard', 'unionpay', 'visa']` or blank will check for any provider.
-**isCurrency(str [, options])** | check if the string is a valid currency amount.
`options` is an object which defaults to `{ symbol: '$', require_symbol: false, allow_space_after_symbol: false, symbol_after_digits: false, allow_negatives: true, parens_for_negatives: false, negative_sign_before_digits: false, negative_sign_after_digits: false, allow_negative_sign_placeholder: false, thousands_separator: ',', decimal_separator: '.', allow_decimal: true, require_decimal: false, digits_after_decimal: [2], allow_space_after_digits: false }`.
**Note:** The array `digits_after_decimal` is filled with the exact number of digits allowed not a range, for example a range 1 to 3 will be given as [1, 2, 3].
-**isDataURI(str)** | check if the string is a [data uri format][Data URI Format].
-**isDate(str [, options])** | check if the string is a valid date. e.g. [`2002-07-15`, new Date()].
`options` is an object which can contain the keys `format`, `strictMode` and/or `delimiters`.
`format` is a string and defaults to `YYYY/MM/DD`.
`strictMode` is a boolean and defaults to `false`. If `strictMode` is set to true, the validator will reject strings different from `format`.
`delimiters` is an array of allowed date delimiters and defaults to `['/', '-']`.
-**isDecimal(str [, options])** | check if the string represents a decimal number, such as 0.1, .3, 1.1, 1.00003, 4.0, etc.
`options` is an object which defaults to `{force_decimal: false, decimal_digits: '1,', locale: 'en-US'}`.
`locale` determines the decimal separator and is one of `['ar', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-LB', 'ar-LY', 'ar-MA', 'ar-QA', 'ar-QM', 'ar-SA', 'ar-SD', 'ar-SY', 'ar-TN', 'ar-YE', 'bg-BG', 'cs-CZ', 'da-DK', 'de-DE', 'el-GR', 'en-AU', 'en-GB', 'en-HK', 'en-IN', 'en-NZ', 'en-US', 'en-ZA', 'en-ZM', 'es-ES', 'fa', 'fa-AF', 'fa-IR', 'fr-FR', 'fr-CA', 'hu-HU', 'id-ID', 'it-IT', 'ku-IQ', 'nb-NO', 'nl-NL', 'nn-NO', 'pl-PL', 'pl-Pl', 'pt-BR', 'pt-PT', 'ru-RU', 'sl-SI', 'sr-RS', 'sr-RS@latin', 'sv-SE', 'tr-TR', 'uk-UA', 'vi-VN']`.
**Note:** `decimal_digits` is given as a range like '1,3', a specific value like '3' or min like '1,'.
-**isDivisibleBy(str, number)** | check if the string is a number that is divisible by another.
-**isEAN(str)** | check if the string is an [EAN (European Article Number)][European Article Number].
-**isEmail(str [, options])** | check if the string is an email.
`options` is an object which defaults to `{ allow_display_name: false, require_display_name: false, allow_utf8_local_part: true, require_tld: true, allow_ip_domain: false, allow_underscores: false, domain_specific_validation: false, blacklisted_chars: '', host_blacklist: [] }`. If `allow_display_name` is set to true, the validator will also match `Display Name `. If `require_display_name` is set to true, the validator will reject strings without the format `Display Name `. If `allow_utf8_local_part` is set to false, the validator will not allow any non-English UTF8 character in email address' local part. If `require_tld` is set to false, email addresses without a TLD in their domain will also be matched. If `ignore_max_length` is set to true, the validator will not check for the standard max length of an email. If `allow_ip_domain` is set to true, the validator will allow IP addresses in the host part. If `domain_specific_validation` is true, some additional validation will be enabled, e.g. disallowing certain syntactically valid email addresses that are rejected by Gmail. If `blacklisted_chars` receives a string, then the validator will reject emails that include any of the characters in the string, in the name part. If `host_blacklist` is set to an array of strings and the part of the email after the `@` symbol matches one of the strings defined in it, the validation fails. If `host_whitelist` is set to an array of strings and the part of the email after the `@` symbol matches none of the strings defined in it, the validation fails.
-**isEmpty(str [, options])** | check if the string has a length of zero.
`options` is an object which defaults to `{ ignore_whitespace: false }`.
-**isEthereumAddress(str)** | check if the string is an [Ethereum][Ethereum] address. Does not validate address checksums.
-**isFloat(str [, options])** | check if the string is a float.
`options` is an object which can contain the keys `min`, `max`, `gt`, and/or `lt` to validate the float is within boundaries (e.g. `{ min: 7.22, max: 9.55 }`) it also has `locale` as an option.
`min` and `max` are equivalent to 'greater or equal' and 'less or equal', respectively while `gt` and `lt` are their strict counterparts.
`locale` determines the decimal separator and is one of `['ar', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-LB', 'ar-LY', 'ar-MA', 'ar-QA', 'ar-QM', 'ar-SA', 'ar-SD', 'ar-SY', 'ar-TN', 'ar-YE', 'bg-BG', 'cs-CZ', 'da-DK', 'de-DE', 'en-AU', 'en-GB', 'en-HK', 'en-IN', 'en-NZ', 'en-US', 'en-ZA', 'en-ZM', 'es-ES', 'fr-CA', 'fr-FR', 'hu-HU', 'it-IT', 'nb-NO', 'nl-NL', 'nn-NO', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'sl-SI', 'sr-RS', 'sr-RS@latin', 'sv-SE', 'tr-TR', 'uk-UA']`. Locale list is `validator.isFloatLocales`.
-**isFQDN(str [, options])** | check if the string is a fully qualified domain name (e.g. domain.com).
`options` is an object which defaults to `{ require_tld: true, allow_underscores: false, allow_trailing_dot: false, allow_numeric_tld: false, allow_wildcard: false, ignore_max_length: false }`. If `allow_wildcard` is set to true, the validator will allow domain starting with `*.` (e.g. `*.example.com` or `*.shop.example.com`).
-**isFreightContainerID(str)** | alias for `isISO6346`, check if the string is a valid [ISO 6346](https://en.wikipedia.org/wiki/ISO_6346) shipping container identification.
-**isFullWidth(str)** | check if the string contains any full-width chars.
-**isHalfWidth(str)** | check if the string contains any half-width chars.
-**isHash(str, algorithm)** | check if the string is a hash of type algorithm.
Algorithm is one of `['crc32', 'crc32b', 'md4', 'md5', 'ripemd128', 'ripemd160', 'sha1', 'sha256', 'sha384', 'sha512', 'tiger128', 'tiger160', 'tiger192']`.
-**isHexadecimal(str)** | check if the string is a hexadecimal number.
-**isHexColor(str)** | check if the string is a hexadecimal color.
-**isHSL(str)** | check if the string is an HSL (hue, saturation, lightness, optional alpha) color based on [CSS Colors Level 4 specification][CSS Colors Level 4 Specification].
Comma-separated format supported. Space-separated format supported with the exception of a few edge cases (ex: `hsl(200grad+.1%62%/1)`).
-**isIBAN(str, [, options])** | check if the string is an IBAN (International Bank Account Number).
`options` is an object which accepts two attributes: `whitelist`: where you can restrict IBAN codes you want to receive data from and `blacklist`: where you can remove some of the countries from the current list. For both you can use an array with the following values `['AD','AE','AL','AT','AZ','BA','BE','BG','BH','BR','BY','CH','CR','CY','CZ','DE','DK','DO','EE','EG','ES','FI','FO','FR','GB','GE','GI','GL','GR','GT','HR','HU','IE','IL','IQ','IR','IS','IT','JO','KW','KZ','LB','LC','LI','LT','LU','LV','MC','MD','ME','MK','MR','MT','MU','MZ','NL','NO','PK','PL','PS','PT','QA','RO','RS','SA','SC','SE','SI','SK','SM','SV','TL','TN','TR','UA','VA','VG','XK']`.
-**isIdentityCard(str [, locale])** | check if the string is a valid identity card code.
`locale` is one of `['LK', 'PL', 'ES', 'FI', 'IN', 'IT', 'IR', 'MZ', 'NO', 'TH', 'zh-TW', 'he-IL', 'ar-LY', 'ar-TN', 'zh-CN', 'zh-HK']` OR `'any'`. If 'any' is used, function will check if any of the locales match.
Defaults to 'any'.
-**isIMEI(str [, options]))** | check if the string is a valid [IMEI number][IMEI]. IMEI should be of format `###############` or `##-######-######-#`.
`options` is an object which can contain the keys `allow_hyphens`. Defaults to first format. If `allow_hyphens` is set to true, the validator will validate the second format.
-**isIn(str, values)** | check if the string is in an array of allowed values.
-**isInt(str [, options])** | check if the string is an integer.
`options` is an object which can contain the keys `min` and/or `max` to check the integer is within boundaries (e.g. `{ min: 10, max: 99 }`). `options` can also contain the key `allow_leading_zeroes`, which when set to false will disallow integer values with leading zeroes (e.g. `{ allow_leading_zeroes: false }`). Finally, `options` can contain the keys `gt` and/or `lt` which will enforce integers being greater than or less than, respectively, the value provided (e.g. `{gt: 1, lt: 4}` for a number between 1 and 4).
-**isIP(str [, version])** | check if the string is an IP (version 4 or 6).
-**isIPRange(str [, version])** | check if the string is an IP Range (version 4 or 6).
-**isISBN(str [, options])** | check if the string is an [ISBN][ISBN].
`options` is an object that has no default.
**Options:**
`version`: ISBN version to compare to. Accepted values are '10' and '13'. If none provided, both will be tested.
-**isISIN(str)** | check if the string is an [ISIN][ISIN] (stock/security identifier).
-**isISO6346(str)** | check if the string is a valid [ISO 6346](https://en.wikipedia.org/wiki/ISO_6346) shipping container identification.
-**isISO6391(str)** | check if the string is a valid [ISO 639-1][ISO 639-1] language code.
-**isISO8601(str [, options])** | check if the string is a valid [ISO 8601][ISO 8601] date.
`options` is an object which defaults to `{ strict: false, strictSeparator: false }`. If `strict` is true, date strings with invalid dates like `2009-02-29` will be invalid. If `strictSeparator` is true, date strings with date and time separated by anything other than a T will be invalid.
-**isISO31661Alpha2(str)** | check if the string is a valid [ISO 3166-1 alpha-2][ISO 3166-1 alpha-2] officially assigned country code.
-**isISO31661Alpha3(str)** | check if the string is a valid [ISO 3166-1 alpha-3][ISO 3166-1 alpha-3] officially assigned country code.
-**isISO4217(str)** | check if the string is a valid [ISO 4217][ISO 4217] officially assigned currency code.
-**isISRC(str)** | check if the string is an [ISRC][ISRC].
-**isISSN(str [, options])** | check if the string is an [ISSN][ISSN].
`options` is an object which defaults to `{ case_sensitive: false, require_hyphen: false }`. If `case_sensitive` is true, ISSNs with a lowercase `'x'` as the check digit are rejected.
-**isJSON(str [, options])** | check if the string is valid JSON (note: uses JSON.parse).
`options` is an object which defaults to `{ allow_primitives: false }`. If `allow_primitives` is true, the primitives 'true', 'false' and 'null' are accepted as valid JSON values.
-**isJWT(str)** | check if the string is valid JWT token.
-**isLatLong(str [, options])** | check if the string is a valid latitude-longitude coordinate in the format `lat,long` or `lat, long`.
`options` is an object that defaults to `{ checkDMS: false }`. Pass `checkDMS` as `true` to validate DMS(degrees, minutes, and seconds) latitude-longitude format.
-**isLength(str [, options])** | check if the string's length falls in a range.
`options` is an object which defaults to `{ min: 0, max: undefined }`. Note: this function takes into account surrogate pairs.
-**isLicensePlate(str, locale)** | check if the string matches the format of a country's license plate.
`locale` is one of `['cs-CZ', 'de-DE', 'de-LI', 'en-IN', 'es-AR', 'hu-HU', 'pt-BR', 'pt-PT', 'sq-AL', 'sv-SE']` or `'any'`.
-**isLocale(str)** | check if the string is a locale.
-**isLowercase(str)** | check if the string is lowercase.
-**isLuhnNumber(str)** | check if the string passes the [Luhn algorithm check](https://en.wikipedia.org/wiki/Luhn_algorithm).
-**isMACAddress(str [, options])** | check if the string is a MAC address.
`options` is an object which defaults to `{ no_separators: false }`. If `no_separators` is true, the validator will allow MAC addresses without separators. Also, it allows the use of hyphens, spaces or dots e.g. '01 02 03 04 05 ab', '01-02-03-04-05-ab' or '0102.0304.05ab'. The options also allow a `eui` property to specify if it needs to be validated against EUI-48 or EUI-64. The accepted values of `eui` are: 48, 64.
-**isMagnetURI(str)** | check if the string is a [Magnet URI format][Magnet URI Format].
-**isMailtoURI(str, [, options])** | check if the string is a [Magnet URI format][Mailto URI Format].
`options` is an object of validating emails inside the URI (check `isEmail`s options for details).
-**isMD5(str)** | check if the string is a MD5 hash.
Please note that you can also use the `isHash(str, 'md5')` function. Keep in mind that MD5 has some collision weaknesses compared to other algorithms (e.g., SHA).
-**isMimeType(str)** | check if the string matches to a valid [MIME type][MIME Type] format.
-**isMobilePhone(str [, locale [, options]])** | check if the string is a mobile phone number,
`locale` is either an array of locales (e.g. `['sk-SK', 'sr-RS']`) OR one of `['am-Am', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', 'ar-EH', 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-PS', 'ar-SA', 'ar-SD', 'ar-SY', 'ar-TN', 'ar-YE', 'az-AZ', 'az-LB', 'az-LY', 'be-BY', 'bg-BG', 'bn-BD', 'bs-BA', 'ca-AD', 'cs-CZ', 'da-DK', 'de-AT', 'de-CH', 'de-DE', 'de-LU', 'dv-MV', 'dz-BT', 'el-CY', 'el-GR', 'en-AG', 'en-AI', 'en-AU', 'en-BM', 'en-BS', 'en-BW', 'en-CA', 'en-GB', 'en-GG', 'en-GH', 'en-GY', 'en-HK', 'en-IE', 'en-IN', 'en-JM', 'en-KE', 'en-KI', 'en-KN', 'en-LS', 'en-MO', 'en-MT', 'en-MU', 'en-MW', 'en-NG', 'en-NZ', 'en-PG', 'en-PH', 'en-PK', 'en-RW', 'en-SG', 'en-SL', 'en-SS', 'en-TZ', 'en-UG', 'en-US', 'en-ZA', 'en-ZM', 'en-ZW', 'es-AR', 'es-BO', 'es-CL', 'es-CO', 'es-CR', 'es-CU', 'es-DO', 'es-EC', 'es-ES', 'es-HN', 'es-MX', 'es-NI', 'es-PA', 'es-PE', 'es-PY', 'es-SV', 'es-UY', 'es-VE', 'et-EE', 'fa-AF', 'fa-IR', 'fi-FI', 'fj-FJ', 'fo-FO', 'fr-BE', 'fr-BF', 'fr-BJ', 'fr-CD', 'fr-CF', 'fr-FR', 'fr-GF', 'fr-GP', 'fr-MQ', 'fr-PF', 'fr-RE', 'fr-WF', 'ga-IE', 'he-IL', 'hu-HU', 'id-ID', 'ir-IR', 'it-IT', 'it-SM', 'ja-JP', 'ka-GE', 'kk-KZ', 'kl-GL', 'ko-KR', 'ky-KG', 'lt-LT', 'mg-MG', 'mn-MN', 'ms-MY', 'my-MM', 'mz-MZ', 'nb-NO', 'ne-NP', 'nl-AW', 'nl-BE', 'nl-NL', 'nn-NO', 'pl-PL', 'pt-AO', 'pt-BR', 'pt-PT', 'ro-Md', 'ro-RO', 'ru-RU', 'si-LK', 'sk-SK', 'sl-SI', 'so-SO', 'sq-AL', 'sr-RS', 'sv-SE', 'tg-TJ', 'th-TH', 'tk-TM', 'tr-TR', 'uk-UA', 'uz-UZ', 'vi-VN', 'zh-CN', 'zh-HK', 'zh-MO', 'zh-TW']` OR defaults to `'any'`. If 'any' or a falsey value is used, function will check if any of the locales match).
`options` is an optional object that can be supplied with the following keys: `strictMode`, if this is set to `true`, the mobile phone number must be supplied with the country code and therefore must start with `+`. Locale list is `validator.isMobilePhoneLocales`.
-**isMongoId(str)** | check if the string is a valid hex-encoded representation of a [MongoDB ObjectId][mongoid].
-**isMultibyte(str)** | check if the string contains one or more multibyte chars.
-**isNumeric(str [, options])** | check if the string contains only numbers.
`options` is an object which defaults to `{ no_symbols: false }` it also has `locale` as an option. If `no_symbols` is true, the validator will reject numeric strings that feature a symbol (e.g. `+`, `-`, or `.`).
`locale` determines the decimal separator and is one of `['ar', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-LB', 'ar-LY', 'ar-MA', 'ar-QA', 'ar-QM', 'ar-SA', 'ar-SD', 'ar-SY', 'ar-TN', 'ar-YE', 'bg-BG', 'cs-CZ', 'da-DK', 'de-DE', 'en-AU', 'en-GB', 'en-HK', 'en-IN', 'en-NZ', 'en-US', 'en-ZA', 'en-ZM', 'es-ES', 'fr-FR', 'fr-CA', 'hu-HU', 'it-IT', 'nb-NO', 'nl-NL', 'nn-NO', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'sl-SI', 'sr-RS', 'sr-RS@latin', 'sv-SE', 'tr-TR', 'uk-UA']`.
-**isOctal(str)** | check if the string is a valid octal number.
-**isPassportNumber(str, countryCode)** | check if the string is a valid passport number.
`countryCode` is one of `['AM', 'AR', 'AT', 'AU', 'AZ', 'BE', 'BG', 'BY', 'BR', 'CA', 'CH', 'CN', 'CY', 'CZ', 'DE', 'DK', 'DZ', 'EE', 'ES', 'FI', 'FR', 'GB', 'GR', 'HR', 'HU', 'IE', 'IN', 'IR', 'ID', 'IS', 'IT', 'JM', 'JP', 'KR', 'KZ', 'LI', 'LT', 'LU', 'LV', 'LY', 'MT', 'MX', 'MY', 'MZ', 'NL', 'NZ', 'PH', 'PK', 'PL', 'PT', 'RO', 'RU', 'SE', 'SL', 'SK', 'TH', 'TR', 'UA', 'US', 'ZA']`.
-**isPort(str)** | check if the string is a valid port number.
-**isPostalCode(str, locale)** | check if the string is a postal code.
`locale` is one of `['AD', 'AT', 'AU', 'AZ', 'BA', 'BE', 'BG', 'BR', 'BY', 'CA', 'CH', 'CN', 'CZ', 'DE', 'DK', 'DO', 'DZ', 'EE', 'ES', 'FI', 'FR', 'GB', 'GR', 'HR', 'HT', 'HU', 'ID', 'IE', 'IL', 'IN', 'IR', 'IS', 'IT', 'JP', 'KE', 'KR', 'LI', 'LK', 'LT', 'LU', 'LV', 'MG', 'MT', 'MX', 'MY', 'NL', 'NO', 'NP', 'NZ', 'PL', 'PR', 'PT', 'RO', 'RU', 'SA', 'SE', 'SG', 'SI', 'SK', 'TH', 'TN', 'TW', 'UA', 'US', 'ZA', 'ZM']` OR `'any'`. If 'any' is used, function will check if any of the locales match. Locale list is `validator.isPostalCodeLocales`.
-**isRFC3339(str)** | check if the string is a valid [RFC 3339][RFC 3339] date.
-**isRgbColor(str [, includePercentValues])** | check if the string is a rgb or rgba color.
`includePercentValues` defaults to `true`. If you don't want to allow to set `rgb` or `rgba` values with percents, like `rgb(5%,5%,5%)`, or `rgba(90%,90%,90%,.3)`, then set it to false.
-**isSemVer(str)** | check if the string is a Semantic Versioning Specification (SemVer).
-**isSurrogatePair(str)** | check if the string contains any surrogate pairs chars.
-**isUppercase(str)** | check if the string is uppercase.
-**isSlug(str)** | check if the string is of type slug.
-**isStrongPassword(str [, options])** | check if the string can be considered a strong password or not. Allows for custom requirements or scoring rules. If `returnScore` is true, then the function returns an integer score for the password rather than a boolean.
Default options:
`{ minLength: 8, minLowercase: 1, minUppercase: 1, minNumbers: 1, minSymbols: 1, returnScore: false, pointsPerUnique: 1, pointsPerRepeat: 0.5, pointsForContainingLower: 10, pointsForContainingUpper: 10, pointsForContainingNumber: 10, pointsForContainingSymbol: 10 }`
-**isTime(str [, options])** | check if the string is a valid time e.g. [`23:01:59`, new Date().toLocaleTimeString()].
`options` is an object which can contain the keys `hourFormat` or `mode`.
`hourFormat` is a key and defaults to `'hour24'`.
`mode` is a key and defaults to `'default'`.
`hourFomat` can contain the values `'hour12'` or `'hour24'`, `'hour24'` will validate hours in 24 format and `'hour12'` will validate hours in 12 format.
`mode` can contain the values `'default'` or `'withSeconds'`, `'default'` will validate `HH:MM` format, `'withSeconds'` will validate the `HH:MM:SS` format.
-**isTaxID(str, locale)** | check if the string is a valid Tax Identification Number. Default locale is `en-US`.
More info about exact TIN support can be found in `src/lib/isTaxID.js`.
Supported locales: `[ 'bg-BG', 'cs-CZ', 'de-AT', 'de-DE', 'dk-DK', 'el-CY', 'el-GR', 'en-CA', 'en-GB', 'en-IE', 'en-US', 'es-AR', 'es-ES', 'et-EE', 'fi-FI', 'fr-BE', 'fr-CA', 'fr-FR', 'fr-LU', 'hr-HR', 'hu-HU', 'it-IT', 'lb-LU', 'lt-LT', 'lv-LV', 'mt-MT', 'nl-BE', 'nl-NL', 'pl-PL', 'pt-BR', 'pt-PT', 'ro-RO', 'sk-SK', 'sl-SI', 'sv-SE' ]`.
-**isURL(str [, options])** | check if the string is a URL.
`options` is an object which defaults to `{ protocols: ['http','https','ftp'], require_tld: true, require_protocol: false, require_host: true, require_port: false, require_valid_protocol: true, allow_underscores: false, host_whitelist: false, host_blacklist: false, allow_trailing_dot: false, allow_protocol_relative_urls: false, allow_fragments: true, allow_query_components: true, disallow_auth: false, validate_length: true }`.
`require_protocol` - if set to true isURL will return false if protocol is not present in the URL.
`require_valid_protocol` - isURL will check if the URL's protocol is present in the protocols option.
`protocols` - valid protocols can be modified with this option.
`require_host` - if set to false isURL will not check if host is present in the URL.
`require_port` - if set to true isURL will check if port is present in the URL.
`allow_protocol_relative_urls` - if set to true protocol relative URLs will be allowed.
`allow_fragments` - if set to false isURL will return false if fragments are present.
`allow_query_components` - if set to false isURL will return false if query components are present.
`validate_length` - if set to false isURL will skip string length validation (2083 characters is IE max URL length).
-**isUUID(str [, version])** | check if the string is a UUID (version 1, 2, 3, 4 or 5).
-**isVariableWidth(str)** | check if the string contains a mixture of full and half-width chars.
-**isVAT(str, countryCode)** | check if the string is a [valid VAT number][VAT Number] if validation is available for the given country code matching [ISO 3166-1 alpha-2][ISO 3166-1 alpha-2].
`countryCode` is one of `['AL', 'AR', 'AT', 'AU', 'BE', 'BG', 'BO', 'BR', 'BY', 'CA', 'CH', 'CL', 'CO', 'CR', 'CY', 'CZ', 'DE', 'DK', 'DO', 'EC', 'EE', 'EL', 'ES', 'FI', 'FR', 'GB', 'GT', 'HN', 'HR', 'HU', 'ID', 'IE', 'IL', 'IN', 'IS', 'IT', 'KZ', 'LT', 'LU', 'LV', 'MK', 'MT', 'MX', 'NG', 'NI', 'NL', 'NO', 'NZ', 'PA', 'PE', 'PH', 'PL', 'PT', 'PY', 'RO', 'RS', 'RU', 'SA', 'SE', 'SI', 'SK', 'SM', 'SV', 'TR', 'UA', 'UY', 'UZ', 'VE']`.
-**isWhitelisted(str, chars)** | check if the string consists only of characters that appear in the whitelist `chars`.
-**matches(str, pattern [, modifiers])** | check if the string matches the pattern.
Either `matches('foo', /foo/i)` or `matches('foo', 'foo', 'i')`.
+| Validator | Description |
+| --------------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| **contains(str, seed [, options])** | check if the string contains the seed.
`options` is an object that defaults to `{ ignoreCase: false, minOccurrences: 1 }`.
Options:
`ignoreCase`: Ignore case when doing comparison, default false.
`minOccurences`: Minimum number of occurrences for the seed in the string. Defaults to 1. |
+| **equals(str, comparison)** | check if the string matches the comparison. |
+| **isAfter(str [, options])** | check if the string is a date that is after the specified date.
`options` is an object that defaults to `{ comparisonDate: Date().toString() }`.
**Options:**
`comparisonDate`: Date to compare to. Defaults to `Date().toString()` (now). |
+| **isAlpha(str [, locale, options])** | check if the string contains only letters (a-zA-Z).
`locale` is one of `['ar', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-LB', 'ar-LY', 'ar-MA', 'ar-QA', 'ar-QM', 'ar-SA', 'ar-SD', 'ar-SY', 'ar-TN', 'ar-YE', 'bg-BG', 'bn', 'cs-CZ', 'da-DK', 'de-DE', 'el-GR', 'en-AU', 'en-GB', 'en-HK', 'en-IN', 'en-NZ', 'en-US', 'en-ZA', 'en-ZM', 'es-ES', 'fa-IR', 'fi-FI', 'fr-CA', 'fr-FR', 'he', 'hi-IN', 'hu-HU', 'it-IT', 'kk-KZ', 'ko-KR', 'ja-JP', 'ku-IQ', 'nb-NO', 'nl-NL', 'nn-NO', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'si-LK', 'sl-SI', 'sk-SK', 'sr-RS', 'sr-RS@latin', 'sv-SE', 'th-TH', 'tr-TR', 'uk-UA']` and defaults to `en-US`. Locale list is `validator.isAlphaLocales`. `options` is an optional object that can be supplied with the following key(s): `ignore` which can either be a String or RegExp of characters to be ignored e.g. " -" will ignore spaces and -'s. |
+| **isAlphanumeric(str [, locale, options])** | check if the string contains only letters and numbers (a-zA-Z0-9).
`locale` is one of `['ar', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-LB', 'ar-LY', 'ar-MA', 'ar-QA', 'ar-QM', 'ar-SA', 'ar-SD', 'ar-SY', 'ar-TN', 'ar-YE', 'bn', 'bg-BG', 'cs-CZ', 'da-DK', 'de-DE', 'el-GR', 'en-AU', 'en-GB', 'en-HK', 'en-IN', 'en-NZ', 'en-US', 'en-ZA', 'en-ZM', 'es-ES', 'fa-IR', 'fi-FI', 'fr-CA', 'fr-FR', 'he', 'hi-IN', 'hu-HU', 'it-IT', 'kk-KZ', 'ko-KR', 'ja-JP','ku-IQ', 'nb-NO', 'nl-NL', 'nn-NO', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'si-LK', 'sl-SI', 'sk-SK', 'sr-RS', 'sr-RS@latin', 'sv-SE', 'th-TH', 'tr-TR', 'uk-UA']`) and defaults to `en-US`. Locale list is `validator.isAlphanumericLocales`. `options` is an optional object that can be supplied with the following key(s): `ignore` which can either be a String or RegExp of characters to be ignored e.g. " -" will ignore spaces and -'s. |
+| **isAscii(str)** | check if the string contains ASCII chars only. |
+| **isBase32(str [, options])** | check if the string is base32 encoded. `options` is optional and defaults to `{ crockford: false }`.
When `crockford` is true it tests the given base32 encoded string using [Crockford's base32 alternative][Crockford Base32]. |
+| **isBase58(str)** | check if the string is base58 encoded. |
+| **isBase64(str [, options])** | check if the string is base64 encoded. `options` is optional and defaults to `{ urlSafe: false }`
when `urlSafe` is true it tests the given base64 encoded string is [url safe][Base64 URL Safe]. |
+| **isBefore(str [, date])** | check if the string is a date that is before the specified date. |
+| **isBIC(str)** | check if the string is a BIC (Bank Identification Code) or SWIFT code. |
+| **isBoolean(str [, options])** | check if the string is a boolean.
`options` is an object which defaults to `{ loose: false }`. If `loose` is is set to false, the validator will strictly match ['true', 'false', '0', '1']. If `loose` is set to true, the validator will also match 'yes', 'no', and will match a valid boolean string of any case. (e.g.: ['true', 'True', 'TRUE']). |
+| **isBtcAddress(str)** | check if the string is a valid BTC address. |
+| **isByteLength(str [, options])** | check if the string's length (in UTF-8 bytes) falls in a range.
`options` is an object which defaults to `{ min: 0, max: undefined }`. |
+| **isCreditCard(str [, options])** | check if the string is a credit card number.
`options` is an optional object that can be supplied with the following key(s): `provider` is an optional key whose value should be a string, and defines the company issuing the credit card. Valid values include `['amex', 'dinersclub', 'discover', 'jcb', 'mastercard', 'unionpay', 'visa']` or blank will check for any provider. |
+| **isCurrency(str [, options])** | check if the string is a valid currency amount.
`options` is an object which defaults to `{ symbol: '$', require_symbol: false, allow_space_after_symbol: false, symbol_after_digits: false, allow_negatives: true, parens_for_negatives: false, negative_sign_before_digits: false, negative_sign_after_digits: false, allow_negative_sign_placeholder: false, thousands_separator: ',', decimal_separator: '.', allow_decimal: true, require_decimal: false, digits_after_decimal: [2], allow_space_after_digits: false }`.
**Note:** The array `digits_after_decimal` is filled with the exact number of digits allowed not a range, for example a range 1 to 3 will be given as [1, 2, 3]. |
+| **isDataURI(str)** | check if the string is a [data uri format][Data URI Format]. |
+| **isDate(str [, options])** | check if the string is a valid date. e.g. [`2002-07-15`, new Date()].
`options` is an object which can contain the keys `format`, `strictMode` and/or `delimiters`.
`format` is a string and defaults to `YYYY/MM/DD`.
`strictMode` is a boolean and defaults to `false`. If `strictMode` is set to true, the validator will reject strings different from `format`.
`delimiters` is an array of allowed date delimiters and defaults to `['/', '-']`. |
+| **isDecimal(str [, options])** | check if the string represents a decimal number, such as 0.1, .3, 1.1, 1.00003, 4.0, etc.
`options` is an object which defaults to `{force_decimal: false, decimal_digits: '1,', locale: 'en-US'}`.
`locale` determines the decimal separator and is one of `['ar', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-LB', 'ar-LY', 'ar-MA', 'ar-QA', 'ar-QM', 'ar-SA', 'ar-SD', 'ar-SY', 'ar-TN', 'ar-YE', 'bg-BG', 'cs-CZ', 'da-DK', 'de-DE', 'el-GR', 'en-AU', 'en-GB', 'en-HK', 'en-IN', 'en-NZ', 'en-US', 'en-ZA', 'en-ZM', 'es-ES', 'fa', 'fa-AF', 'fa-IR', 'fr-FR', 'fr-CA', 'hu-HU', 'id-ID', 'it-IT', 'ku-IQ', 'nb-NO', 'nl-NL', 'nn-NO', 'pl-PL', 'pl-Pl', 'pt-BR', 'pt-PT', 'ru-RU', 'sl-SI', 'sr-RS', 'sr-RS@latin', 'sv-SE', 'tr-TR', 'uk-UA', 'vi-VN']`.
**Note:** `decimal_digits` is given as a range like '1,3', a specific value like '3' or min like '1,'. |
+| **isDivisibleBy(str, number)** | check if the string is a number that is divisible by another. |
+| **isEAN(str)** | check if the string is an [EAN (European Article Number)][European Article Number]. |
+| **isEmail(str [, options])** | check if the string is an email.
`options` is an object which defaults to `{ allow_display_name: false, require_display_name: false, allow_utf8_local_part: true, require_tld: true, allow_ip_domain: false, allow_underscores: false, domain_specific_validation: false, blacklisted_chars: '', host_blacklist: [] }`. If `allow_display_name` is set to true, the validator will also match `Display Name `. If `require_display_name` is set to true, the validator will reject strings without the format `Display Name `. If `allow_utf8_local_part` is set to false, the validator will not allow any non-English UTF8 character in email address' local part. If `require_tld` is set to false, email addresses without a TLD in their domain will also be matched. If `ignore_max_length` is set to true, the validator will not check for the standard max length of an email. If `allow_ip_domain` is set to true, the validator will allow IP addresses in the host part. If `domain_specific_validation` is true, some additional validation will be enabled, e.g. disallowing certain syntactically valid email addresses that are rejected by Gmail. If `blacklisted_chars` receives a string, then the validator will reject emails that include any of the characters in the string, in the name part. If `host_blacklist` is set to an array of strings and the part of the email after the `@` symbol matches one of the strings defined in it, the validation fails. If `host_whitelist` is set to an array of strings and the part of the email after the `@` symbol matches none of the strings defined in it, the validation fails. |
+| **isEmpty(str [, options])** | check if the string has a length of zero.
`options` is an object which defaults to `{ ignore_whitespace: false }`. |
+| **isEthereumAddress(str)** | check if the string is an [Ethereum][Ethereum] address. Does not validate address checksums. |
+| **isFloat(str [, options])** | check if the string is a float.
`options` is an object which can contain the keys `min`, `max`, `gt`, and/or `lt` to validate the float is within boundaries (e.g. `{ min: 7.22, max: 9.55 }`) it also has `locale` as an option.
`min` and `max` are equivalent to 'greater or equal' and 'less or equal', respectively while `gt` and `lt` are their strict counterparts.
`locale` determines the decimal separator and is one of `['ar', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-LB', 'ar-LY', 'ar-MA', 'ar-QA', 'ar-QM', 'ar-SA', 'ar-SD', 'ar-SY', 'ar-TN', 'ar-YE', 'bg-BG', 'cs-CZ', 'da-DK', 'de-DE', 'en-AU', 'en-GB', 'en-HK', 'en-IN', 'en-NZ', 'en-US', 'en-ZA', 'en-ZM', 'es-ES', 'fr-CA', 'fr-FR', 'hu-HU', 'it-IT', 'nb-NO', 'nl-NL', 'nn-NO', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'sl-SI', 'sr-RS', 'sr-RS@latin', 'sv-SE', 'tr-TR', 'uk-UA']`. Locale list is `validator.isFloatLocales`. |
+| **isFQDN(str [, options])** | check if the string is a fully qualified domain name (e.g. domain.com).
`options` is an object which defaults to `{ require_tld: true, allow_underscores: false, allow_trailing_dot: false, allow_numeric_tld: false, allow_wildcard: false, ignore_max_length: false }`. If `allow_wildcard` is set to true, the validator will allow domain starting with `*.` (e.g. `*.example.com` or `*.shop.example.com`). |
+| **isFreightContainerID(str)** | alias for `isISO6346`, check if the string is a valid [ISO 6346](https://en.wikipedia.org/wiki/ISO_6346) shipping container identification. |
+| **isFullWidth(str)** | check if the string contains any full-width chars. |
+| **isHalfWidth(str)** | check if the string contains any half-width chars. |
+| **isHash(str, algorithm)** | check if the string is a hash of type algorithm.
Algorithm is one of `['crc32', 'crc32b', 'md4', 'md5', 'ripemd128', 'ripemd160', 'sha1', 'sha256', 'sha384', 'sha512', 'tiger128', 'tiger160', 'tiger192']`. |
+| **isHexadecimal(str)** | check if the string is a hexadecimal number. |
+| **isHexColor(str)** | check if the string is a hexadecimal color. |
+| **isHSL(str)** | check if the string is an HSL (hue, saturation, lightness, optional alpha) color based on [CSS Colors Level 4 specification][CSS Colors Level 4 Specification].
Comma-separated format supported. Space-separated format supported with the exception of a few edge cases (ex: `hsl(200grad+.1%62%/1)`). |
+| **isIBAN(str, [, options])** | check if the string is an IBAN (International Bank Account Number).
`options` is an object which accepts two attributes: `whitelist`: where you can restrict IBAN codes you want to receive data from and `blacklist`: where you can remove some of the countries from the current list. For both you can use an array with the following values `['AD','AE','AL','AT','AZ','BA','BE','BG','BH','BR','BY','CH','CR','CY','CZ','DE','DK','DO','EE','EG','ES','FI','FO','FR','GB','GE','GI','GL','GR','GT','HR','HU','IE','IL','IQ','IR','IS','IT','JO','KW','KZ','LB','LC','LI','LT','LU','LV','MC','MD','ME','MK','MR','MT','MU','MZ','NL','NO','PK','PL','PS','PT','QA','RO','RS','SA','SC','SE','SI','SK','SM','SV','TL','TN','TR','UA','VA','VG','XK']`. |
+| **isIdentityCard(str [, locale])** | check if the string is a valid identity card code.
`locale` is one of `['LK', 'PL', 'ES', 'FI', 'IN', 'IT', 'IR', 'MZ', 'NO', 'TH', 'zh-TW', 'he-IL', 'ar-LY', 'ar-TN', 'zh-CN', 'zh-HK']` OR `'any'`. If 'any' is used, function will check if any of the locales match.
Defaults to 'any'. |
+| **isIMEI(str [, options]))** | check if the string is a valid [IMEI number][IMEI]. IMEI should be of format `###############` or `##-######-######-#`.
`options` is an object which can contain the keys `allow_hyphens`. Defaults to first format. If `allow_hyphens` is set to true, the validator will validate the second format. |
+| **isIn(str, values)** | check if the string is in an array of allowed values. |
+| **isInt(str [, options])** | check if the string is an integer.
`options` is an object which can contain the keys `min` and/or `max` to check the integer is within boundaries (e.g. `{ min: 10, max: 99 }`). `options` can also contain the key `allow_leading_zeroes`, which when set to false will disallow integer values with leading zeroes (e.g. `{ allow_leading_zeroes: false }`). Finally, `options` can contain the keys `gt` and/or `lt` which will enforce integers being greater than or less than, respectively, the value provided (e.g. `{gt: 1, lt: 4}` for a number between 1 and 4). |
+| **isIP(str [, version])** | check if the string is an IP (version 4 or 6). |
+| **isIPRange(str [, version])** | check if the string is an IP Range (version 4 or 6). |
+| **isISBN(str [, options])** | check if the string is an [ISBN][ISBN].
`options` is an object that has no default.
**Options:**
`version`: ISBN version to compare to. Accepted values are '10' and '13'. If none provided, both will be tested. |
+| **isISIN(str)** | check if the string is an [ISIN][ISIN] (stock/security identifier). |
+| **isISO6346(str)** | check if the string is a valid [ISO 6346](https://en.wikipedia.org/wiki/ISO_6346) shipping container identification. |
+| **isISO6391(str)** | check if the string is a valid [ISO 639-1][ISO 639-1] language code. |
+| **isISO8601(str [, options])** | check if the string is a valid [ISO 8601][ISO 8601] date.
`options` is an object which defaults to `{ strict: false, strictSeparator: false }`. If `strict` is true, date strings with invalid dates like `2009-02-29` will be invalid. If `strictSeparator` is true, date strings with date and time separated by anything other than a T will be invalid. |
+| **isISO31661Alpha2(str)** | check if the string is a valid [ISO 3166-1 alpha-2][ISO 3166-1 alpha-2] officially assigned country code. |
+| **isISO31661Alpha3(str)** | check if the string is a valid [ISO 3166-1 alpha-3][ISO 3166-1 alpha-3] officially assigned country code. |
+| **isISO4217(str)** | check if the string is a valid [ISO 4217][ISO 4217] officially assigned currency code. |
+| **isISRC(str)** | check if the string is an [ISRC][ISRC]. |
+| **isISSN(str [, options])** | check if the string is an [ISSN][ISSN].
`options` is an object which defaults to `{ case_sensitive: false, require_hyphen: false }`. If `case_sensitive` is true, ISSNs with a lowercase `'x'` as the check digit are rejected. |
+| **isJSON(str [, options])** | check if the string is valid JSON (note: uses JSON.parse).
`options` is an object which defaults to `{ allow_primitives: false }`. If `allow_primitives` is true, the primitives 'true', 'false' and 'null' are accepted as valid JSON values. |
+| **isJWT(str)** | check if the string is valid JWT token. |
+| **isLatLong(str [, options])** | check if the string is a valid latitude-longitude coordinate in the format `lat,long` or `lat, long`.
`options` is an object that defaults to `{ checkDMS: false }`. Pass `checkDMS` as `true` to validate DMS(degrees, minutes, and seconds) latitude-longitude format. |
+| **isLength(str [, options])** | check if the string's length falls in a range.
`options` is an object which defaults to `{ min: 0, max: undefined }`. Note: this function takes into account surrogate pairs. |
+| **isLicensePlate(str, locale)** | check if the string matches the format of a country's license plate.
`locale` is one of `['cs-CZ', 'de-DE', 'de-LI', 'en-IN', 'es-AR', 'hu-HU', 'pt-BR', 'pt-PT', 'sq-AL', 'sv-SE']` or `'any'`. |
+| **isLocale(str)** | check if the string is a locale. |
+| **isLowercase(str)** | check if the string is lowercase. |
+| **isLuhnNumber(str)** | check if the string passes the [Luhn algorithm check](https://en.wikipedia.org/wiki/Luhn_algorithm). |
+| **isMACAddress(str [, options])** | check if the string is a MAC address.
`options` is an object which defaults to `{ no_separators: false }`. If `no_separators` is true, the validator will allow MAC addresses without separators. Also, it allows the use of hyphens, spaces or dots e.g. '01 02 03 04 05 ab', '01-02-03-04-05-ab' or '0102.0304.05ab'. The options also allow a `eui` property to specify if it needs to be validated against EUI-48 or EUI-64. The accepted values of `eui` are: 48, 64. |
+| **isMagnetURI(str)** | check if the string is a [Magnet URI format][Magnet URI Format]. |
+| **isMailtoURI(str, [, options])** | check if the string is a [Magnet URI format][Mailto URI Format].
`options` is an object of validating emails inside the URI (check `isEmail`s options for details). |
+| **isMD5(str)** | check if the string is a MD5 hash.
Please note that you can also use the `isHash(str, 'md5')` function. Keep in mind that MD5 has some collision weaknesses compared to other algorithms (e.g., SHA). |
+| **isMimeType(str)** | check if the string matches to a valid [MIME type][MIME Type] format. |
+| **isMobilePhone(str [, locale [, options]])** | check if the string is a mobile phone number,
`locale` is either an array of locales (e.g. `['sk-SK', 'sr-RS']`) OR one of `['am-Am', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', 'ar-EH', 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-PS', 'ar-SA', 'ar-SD', 'ar-SY', 'ar-TN', 'ar-YE', 'az-AZ', 'az-LB', 'az-LY', 'be-BY', 'bg-BG', 'bn-BD', 'bs-BA', 'ca-AD', 'cs-CZ', 'da-DK', 'de-AT', 'de-CH', 'de-DE', 'de-LU', 'dv-MV', 'dz-BT', 'el-CY', 'el-GR', 'en-AG', 'en-AI', 'en-AU', 'en-BM', 'en-BS', 'en-BW', 'en-CA', 'en-GB', 'en-GG', 'en-GH', 'en-GY', 'en-HK', 'en-IE', 'en-IN', 'en-JM', 'en-KE', 'en-KI', 'en-KN', 'en-LS', 'en-MO', 'en-MT', 'en-MU', 'en-MW', 'en-NG', 'en-NZ', 'en-PG', 'en-PH', 'en-PK', 'en-RW', 'en-SG', 'en-SL', 'en-SS', 'en-TZ', 'en-UG', 'en-US', 'en-ZA', 'en-ZM', 'en-ZW', 'es-AR', 'es-BO', 'es-CL', 'es-CO', 'es-CR', 'es-CU', 'es-DO', 'es-EC', 'es-ES', 'es-HN', 'es-MX', 'es-NI', 'es-PA', 'es-PE', 'es-PY', 'es-SV', 'es-UY', 'es-VE', 'et-EE', 'fa-AF', 'fa-IR', 'fi-FI', 'fj-FJ', 'fo-FO', 'fr-BE', 'fr-BF', 'fr-BJ', 'fr-CD', 'fr-CF', 'fr-FR', 'fr-GF', 'fr-GP', 'fr-MQ', 'fr-PF', 'fr-RE', 'fr-WF', 'ga-IE', 'he-IL', 'hu-HU', 'id-ID', 'ir-IR', 'it-IT', 'it-SM', 'ja-JP', 'ka-GE', 'kk-KZ', 'kl-GL', 'ko-KR', 'ky-KG', 'lt-LT', 'mg-MG', 'mn-MN', 'ms-MY', 'my-MM', 'mz-MZ', 'nb-NO', 'ne-NP', 'nl-AW', 'nl-BE', 'nl-NL', 'nn-NO', 'pl-PL', 'pt-AO', 'pt-BR', 'pt-PT', 'ro-Md', 'ro-RO', 'ru-RU', 'si-LK', 'sk-SK', 'sl-SI', 'so-SO', 'sq-AL', 'sr-RS', 'sv-SE', 'tg-TJ', 'th-TH', 'tk-TM', 'tr-TR', 'uk-UA', 'uz-UZ', 'vi-VN', 'zh-CN', 'zh-HK', 'zh-MO', 'zh-TW']` OR defaults to `'any'`. If 'any' or a falsey value is used, function will check if any of the locales match).
`options` is an optional object that can be supplied with the following keys: `strictMode`, if this is set to `true`, the mobile phone number must be supplied with the country code and therefore must start with `+`. Locale list is `validator.isMobilePhoneLocales`. |
+| **isMongoId(str)** | check if the string is a valid hex-encoded representation of a [MongoDB ObjectId][mongoid]. |
+| **isMultibyte(str)** | check if the string contains one or more multibyte chars. |
+| **isNumeric(str [, options])** | check if the string contains only numbers.
`options` is an object which defaults to `{ no_symbols: false }` it also has `locale` as an option. If `no_symbols` is true, the validator will reject numeric strings that feature a symbol (e.g. `+`, `-`, or `.`).
`locale` determines the decimal separator and is one of `['ar', 'ar-AE', 'ar-BH', 'ar-DZ', 'ar-EG', 'ar-IQ', 'ar-JO', 'ar-KW', 'ar-LB', 'ar-LY', 'ar-MA', 'ar-QA', 'ar-QM', 'ar-SA', 'ar-SD', 'ar-SY', 'ar-TN', 'ar-YE', 'bg-BG', 'cs-CZ', 'da-DK', 'de-DE', 'en-AU', 'en-GB', 'en-HK', 'en-IN', 'en-NZ', 'en-US', 'en-ZA', 'en-ZM', 'es-ES', 'fr-FR', 'fr-CA', 'hu-HU', 'it-IT', 'nb-NO', 'nl-NL', 'nn-NO', 'pl-PL', 'pt-BR', 'pt-PT', 'ru-RU', 'sl-SI', 'sr-RS', 'sr-RS@latin', 'sv-SE', 'tr-TR', 'uk-UA']`. |
+| **isOctal(str)** | check if the string is a valid octal number. |
+| **isPassportNumber(str, countryCode)** | check if the string is a valid passport number.
`countryCode` is one of `['AM', 'AR', 'AT', 'AU', 'AZ', 'BE', 'BG', 'BY', 'BR', 'CA', 'CH', 'CN', 'CY', 'CZ', 'DE', 'DK', 'DZ', 'EE', 'ES', 'FI', 'FR', 'GB', 'GR', 'HR', 'HU', 'IE', 'IN', 'IR', 'ID', 'IS', 'IT', 'JM', 'JP', 'KR', 'KZ', 'LI', 'LT', 'LU', 'LV', 'LY', 'MT', 'MX', 'MY', 'MZ', 'NL', 'NZ', 'PH', 'PK', 'PL', 'PT', 'RO', 'RU', 'SE', 'SL', 'SK', 'TH', 'TR', 'UA', 'US', 'ZA']`. |
+| **isPort(str)** | check if the string is a valid port number. |
+| **isPostalCode(str, locale)** | check if the string is a postal code.
`locale` is one of `['AD', 'AT', 'AU', 'AZ', 'BA', 'BE', 'BG', 'BR', 'BY', 'CA', 'CH', 'CN', 'CZ', 'DE', 'DK', 'DO', 'DZ', 'EE', 'ES', 'FI', 'FR', 'GB', 'GR', 'HR', 'HT', 'HU', 'ID', 'IE', 'IL', 'IN', 'IR', 'IS', 'IT', 'JP', 'KE', 'KR', 'LI', 'LK', 'LT', 'LU', 'LV', 'MG', 'MT', 'MX', 'MY', 'NL', 'NO', 'NP', 'NZ', 'PL', 'PR', 'PT', 'RO', 'RU', 'SA', 'SE', 'SG', 'SI', 'SK', 'TH', 'TN', 'TW', 'UA', 'US', 'ZA', 'ZM']` OR `'any'`. If 'any' is used, function will check if any of the locales match. Locale list is `validator.isPostalCodeLocales`. |
+| **isRFC3339(str)** | check if the string is a valid [RFC 3339][RFC 3339] date. |
+| **isRgbColor(str [, includePercentValues])** | check if the string is a rgb or rgba color.
`includePercentValues` defaults to `true`. If you don't want to allow to set `rgb` or `rgba` values with percents, like `rgb(5%,5%,5%)`, or `rgba(90%,90%,90%,.3)`, then set it to false. |
+| **isSemVer(str)** | check if the string is a Semantic Versioning Specification (SemVer). |
+| **isSurrogatePair(str)** | check if the string contains any surrogate pairs chars. |
+| **isUppercase(str)** | check if the string is uppercase. |
+| **isSlug(str)** | check if the string is of type slug. |
+| **isStrongPassword(str [, options])** | check if the string can be considered a strong password or not. Allows for custom requirements or scoring rules. If `returnScore` is true, then the function returns an integer score for the password rather than a boolean.
Default options:
`{ minLength: 8, minLowercase: 1, minUppercase: 1, minNumbers: 1, minSymbols: 1, returnScore: false, pointsPerUnique: 1, pointsPerRepeat: 0.5, pointsForContainingLower: 10, pointsForContainingUpper: 10, pointsForContainingNumber: 10, pointsForContainingSymbol: 10 }` |
+| **isTime(str [, options])** | check if the string is a valid time e.g. [`23:01:59`, new Date().toLocaleTimeString()].
`options` is an object which can contain the keys `hourFormat` or `mode`.
`hourFormat` is a key and defaults to `'hour24'`.
`mode` is a key and defaults to `'default'`.
`hourFomat` can contain the values `'hour12'` or `'hour24'`, `'hour24'` will validate hours in 24 format and `'hour12'` will validate hours in 12 format.
`mode` can contain the values `'default'` or `'withSeconds'`, `'default'` will validate `HH:MM` format, `'withSeconds'` will validate the `HH:MM:SS` format. |
+| **isTaxID(str, locale)** | check if the string is a valid Tax Identification Number. Default locale is `en-US`.
More info about exact TIN support can be found in `src/lib/isTaxID.js`.
Supported locales: `[ 'bg-BG', 'cs-CZ', 'de-AT', 'de-DE', 'dk-DK', 'el-CY', 'el-GR', 'en-CA', 'en-GB', 'en-IE', 'en-US', 'es-AR', 'es-ES', 'et-EE', 'fi-FI', 'fr-BE', 'fr-CA', 'fr-FR', 'fr-LU', 'hr-HR', 'hu-HU', 'it-IT', 'lb-LU', 'lt-LT', 'lv-LV', 'mt-MT', 'nl-BE', 'nl-NL', 'pl-PL', 'pt-BR', 'pt-PT', 'ro-RO', 'sk-SK', 'sl-SI', 'sv-SE' ]`. |
+| **isURL(str [, options])** | check if the string is a URL.
`options` is an object which defaults to `{ protocols: ['http','https','ftp'], require_tld: true, require_protocol: false, require_host: true, require_port: false, require_valid_protocol: true, allow_underscores: false, host_whitelist: false, host_blacklist: false, allow_trailing_dot: false, allow_protocol_relative_urls: false, allow_fragments: true, allow_query_components: true, disallow_auth: false, validate_length: true }`.
`require_protocol` - if set to true isURL will return false if protocol is not present in the URL.
`require_valid_protocol` - isURL will check if the URL's protocol is present in the protocols option.
`protocols` - valid protocols can be modified with this option.
`require_host` - if set to false isURL will not check if host is present in the URL.
`require_port` - if set to true isURL will check if port is present in the URL.
`allow_protocol_relative_urls` - if set to true protocol relative URLs will be allowed.
`allow_fragments` - if set to false isURL will return false if fragments are present.
`allow_query_components` - if set to false isURL will return false if query components are present.
`validate_length` - if set to false isURL will skip string length validation (2083 characters is IE max URL length). |
+| **isUUID(str [, version])** | check if the string is a UUID (version 1, 2, 3, 4 or 5). |
+| **isVariableWidth(str)** | check if the string contains a mixture of full and half-width chars. |
+| **isVAT(str, countryCode)** | check if the string is a [valid VAT number][VAT Number] if validation is available for the given country code matching [ISO 3166-1 alpha-2][ISO 3166-1 alpha-2].
`countryCode` is one of `['AL', 'AR', 'AT', 'AU', 'BE', 'BG', 'BO', 'BR', 'BY', 'CA', 'CH', 'CL', 'CO', 'CR', 'CY', 'CZ', 'DE', 'DK', 'DO', 'EC', 'EE', 'EL', 'ES', 'FI', 'FR', 'GB', 'GT', 'HN', 'HR', 'HU', 'ID', 'IE', 'IL', 'IN', 'IS', 'IT', 'KZ', 'LT', 'LU', 'LV', 'MK', 'MT', 'MX', 'NG', 'NI', 'NL', 'NO', 'NZ', 'PA', 'PE', 'PH', 'PL', 'PT', 'PY', 'RO', 'RS', 'RU', 'SA', 'SE', 'SI', 'SK', 'SM', 'SV', 'TR', 'UA', 'UY', 'UZ', 'VE']`. |
+| **isWhitelisted(str, chars)** | check if the string consists only of characters that appear in the whitelist `chars`. |
+| **matches(str, pattern [, modifiers])** | check if the string matches the pattern.
Either `matches('foo', /foo/i)` or `matches('foo', 'foo', 'i')`. |
## Sanitizers
Here is a list of the sanitizers currently available.
-Sanitizer | Description
--------------------------------------- | -------------------------------
-**blacklist(input, chars)** | remove characters that appear in the blacklist. The characters are used in a RegExp and so you will need to escape some chars, e.g. `blacklist(input, '\\[\\]')`.
-**escape(input)** | replace `<`, `>`, `&`, `'`, `"` and `/` with HTML entities.
-**ltrim(input [, chars])** | trim characters from the left-side of the input.
-**normalizeEmail(email [, options])** | canonicalize an email address. (This doesn't validate that the input is an email, if you want to validate the email use isEmail beforehand).
`options` is an object with the following keys and default values:
- *all_lowercase: true* - Transforms the local part (before the @ symbol) of all email addresses to lowercase. Please note that this may violate RFC 5321, which gives providers the possibility to treat the local part of email addresses in a case sensitive way (although in practice most - yet not all - providers don't). The domain part of the email address is always lowercased, as it is case insensitive per RFC 1035.
- *gmail_lowercase: true* - Gmail addresses are known to be case-insensitive, so this switch allows lowercasing them even when *all_lowercase* is set to false. Please note that when *all_lowercase* is true, Gmail addresses are lowercased regardless of the value of this setting.
- *gmail_remove_dots: true*: Removes dots from the local part of the email address, as Gmail ignores them (e.g. "john.doe" and "johndoe" are considered equal).
- *gmail_remove_subaddress: true*: Normalizes addresses by removing "sub-addresses", which is the part following a "+" sign (e.g. "foo+bar@gmail.com" becomes "foo@gmail.com").
- *gmail_convert_googlemaildotcom: true*: Converts addresses with domain @googlemail.com to @gmail.com, as they're equivalent.
- *outlookdotcom_lowercase: true* - Outlook.com addresses (including Windows Live and Hotmail) are known to be case-insensitive, so this switch allows lowercasing them even when *all_lowercase* is set to false. Please note that when *all_lowercase* is true, Outlook.com addresses are lowercased regardless of the value of this setting.
- *outlookdotcom_remove_subaddress: true*: Normalizes addresses by removing "sub-addresses", which is the part following a "+" sign (e.g. "foo+bar@outlook.com" becomes "foo@outlook.com").
- *yahoo_lowercase: true* - Yahoo Mail addresses are known to be case-insensitive, so this switch allows lowercasing them even when *all_lowercase* is set to false. Please note that when *all_lowercase* is true, Yahoo Mail addresses are lowercased regardless of the value of this setting.
- *yahoo_remove_subaddress: true*: Normalizes addresses by removing "sub-addresses", which is the part following a "-" sign (e.g. "foo-bar@yahoo.com" becomes "foo@yahoo.com").
- *icloud_lowercase: true* - iCloud addresses (including MobileMe) are known to be case-insensitive, so this switch allows lowercasing them even when *all_lowercase* is set to false. Please note that when *all_lowercase* is true, iCloud addresses are lowercased regardless of the value of this setting.
- *icloud_remove_subaddress: true*: Normalizes addresses by removing "sub-addresses", which is the part following a "+" sign (e.g. "foo+bar@icloud.com" becomes "foo@icloud.com").
-**rtrim(input [, chars])** | trim characters from the right-side of the input.
-**stripLow(input [, keep_new_lines])** | remove characters with a numerical value < 32 and 127, mostly control characters. If `keep_new_lines` is `true`, newline characters are preserved (`\n` and `\r`, hex `0xA` and `0xD`). Unicode-safe in JavaScript.
-**toBoolean(input [, strict])** | convert the input string to a boolean. Everything except for `'0'`, `'false'` and `''` returns `true`. In strict mode only `'1'` and `'true'` return `true`.
-**toDate(input)** | convert the input string to a date, or `null` if the input is not a date.
-**toFloat(input)** | convert the input string to a float, or `NaN` if the input is not a float.
-**toInt(input [, radix])** | convert the input string to an integer, or `NaN` if the input is not an integer.
-**trim(input [, chars])** | trim characters (whitespace by default) from both sides of the input.
-**unescape(input)** | replace HTML encoded entities with `<`, `>`, `&`, `'`, `"` and `/`.
-**whitelist(input, chars)** | remove characters that do not appear in the whitelist. The characters are used in a RegExp and so you will need to escape some chars, e.g. `whitelist(input, '\\[\\]')`.
+| Sanitizer | Description |
+| -------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
+| **blacklist(input, chars)** | remove characters that appear in the blacklist. The characters are used in a RegExp and so you will need to escape some chars, e.g. `blacklist(input, '\\[\\]')`. |
+| **escape(input)** | replace `<`, `>`, `&`, `'`, `"` and `/` with HTML entities. |
+| **ltrim(input [, chars])** | trim characters from the left-side of the input. |
+| **normalizeEmail(email [, options])** | canonicalize an email address. (This doesn't validate that the input is an email, if you want to validate the email use isEmail beforehand).
`options` is an object with the following keys and default values:
- _all_lowercase: true_ - Transforms the local part (before the @ symbol) of all email addresses to lowercase. Please note that this may violate RFC 5321, which gives providers the possibility to treat the local part of email addresses in a case sensitive way (although in practice most - yet not all - providers don't). The domain part of the email address is always lowercased, as it is case insensitive per RFC 1035.
- _gmail_lowercase: true_ - Gmail addresses are known to be case-insensitive, so this switch allows lowercasing them even when _all_lowercase_ is set to false. Please note that when _all_lowercase_ is true, Gmail addresses are lowercased regardless of the value of this setting.
- _gmail_remove_dots: true_: Removes dots from the local part of the email address, as Gmail ignores them (e.g. "john.doe" and "johndoe" are considered equal).
- _gmail_remove_subaddress: true_: Normalizes addresses by removing "sub-addresses", which is the part following a "+" sign (e.g. "foo+bar@gmail.com" becomes "foo@gmail.com").
- _gmail_convert_googlemaildotcom: true_: Converts addresses with domain @googlemail.com to @gmail.com, as they're equivalent.
- _outlookdotcom_lowercase: true_ - Outlook.com addresses (including Windows Live and Hotmail) are known to be case-insensitive, so this switch allows lowercasing them even when _all_lowercase_ is set to false. Please note that when _all_lowercase_ is true, Outlook.com addresses are lowercased regardless of the value of this setting.
- _outlookdotcom_remove_subaddress: true_: Normalizes addresses by removing "sub-addresses", which is the part following a "+" sign (e.g. "foo+bar@outlook.com" becomes "foo@outlook.com").
- _yahoo_lowercase: true_ - Yahoo Mail addresses are known to be case-insensitive, so this switch allows lowercasing them even when _all_lowercase_ is set to false. Please note that when _all_lowercase_ is true, Yahoo Mail addresses are lowercased regardless of the value of this setting.
- _yahoo_remove_subaddress: true_: Normalizes addresses by removing "sub-addresses", which is the part following a "-" sign (e.g. "foo-bar@yahoo.com" becomes "foo@yahoo.com").
- _icloud_lowercase: true_ - iCloud addresses (including MobileMe) are known to be case-insensitive, so this switch allows lowercasing them even when _all_lowercase_ is set to false. Please note that when _all_lowercase_ is true, iCloud addresses are lowercased regardless of the value of this setting.
- _icloud_remove_subaddress: true_: Normalizes addresses by removing "sub-addresses", which is the part following a "+" sign (e.g. "foo+bar@icloud.com" becomes "foo@icloud.com").
|
+| **rtrim(input [, chars])** | trim characters from the right-side of the input. |
+| **stripLow(input [, keep_new_lines])** | remove characters with a numerical value < 32 and 127, mostly control characters. If `keep_new_lines` is `true`, newline characters are preserved (`\n` and `\r`, hex `0xA` and `0xD`). Unicode-safe in JavaScript. |
+| **toBoolean(input [, strict])** | convert the input string to a boolean. Everything except for `'0'`, `'false'` and `''` returns `true`. In strict mode only `'1'` and `'true'` return `true`. |
+| **toDate(input)** | convert the input string to a date, or `null` if the input is not a date. |
+| **toFloat(input)** | convert the input string to a float, or `NaN` if the input is not a float. |
+| **toInt(input [, radix])** | convert the input string to an integer, or `NaN` if the input is not an integer. |
+| **trim(input [, chars])** | trim characters (whitespace by default) from both sides of the input. |
+| **unescape(input)** | replace HTML encoded entities with `<`, `>`, `&`, `'`, `"` and `/`. |
+| **whitelist(input, chars)** | remove characters that do not appear in the whitelist. The characters are used in a RegExp and so you will need to escape some chars, e.g. `whitelist(input, '\\[\\]')`. |
### XSS Sanitization
@@ -208,12 +203,12 @@ In general, we follow the "fork-and-pull" Git workflow.
1. Fork the repo on GitHub
2. Clone the project to your own machine
3. Work on your fork
- 1. Make your changes and additions
- - Most of your changes should be focused on `src/` and `test/` folders and/or `README.md`.
- - Files such as `validator.js`, `validator.min.js` and files in `lib/` folder are autogenerated when running tests (`npm test`) and need not to be changed **manually**.
- 2. Change or add tests if needed
- 3. Run tests and make sure they pass
- 4. Add changes to README.md if needed
+ 1. Make your changes and additions
+ - Most of your changes should be focused on `src/` and `test/` folders and/or `README.md`.
+ - Files such as `validator.js`, `validator.min.js` and files in `lib/` folder are autogenerated when running tests (`npm test`) and need not to be changed **manually**.
+ 2. Change or add tests if needed
+ 3. Run tests and make sure they pass
+ 4. Add changes to README.md if needed
4. Commit changes to your own branch
5. **Make sure** you merge the latest from "upstream" and resolve conflicts if there is any
6. Repeat step 3(3) above
@@ -265,25 +260,17 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
```
[downloads-image]: http://img.shields.io/npm/dm/validator.svg
-
[npm-url]: https://npmjs.org/package/validator
[npm-image]: http://img.shields.io/npm/v/validator.svg
-
[codecov-url]: https://codecov.io/gh/validatorjs/validator.js
[codecov-image]: https://codecov.io/gh/validatorjs/validator.js/branch/master/graph/badge.svg
-
[ci-url]: https://github.com/validatorjs/validator.js/actions?query=workflow%3ACI
[ci-image]: https://github.com/validatorjs/validator.js/workflows/CI/badge.svg?branch=master
-
[gitter-url]: https://gitter.im/validatorjs/community
[gitter-image]: https://badges.gitter.im/validatorjs/community.svg
-
[huntr-url]: https://huntr.dev/bounties/disclose/?target=https://github.com/validatorjs/validator.js
[huntr-image]: https://cdn.huntr.dev/huntr_security_badge_mono.svg
-
[amd]: http://requirejs.org/docs/whyamd.html
-[bower]: http://bower.io/
-
[Crockford Base32]: http://www.crockford.com/base32.html
[Base64 URL Safe]: https://base64.guru/standards/base64url
[Data URI Format]: https://developer.mozilla.org/en-US/docs/Web/HTTP/data_URIs
diff --git a/SECURITY.md b/SECURITY.md
index 72592f135..b4be59bad 100644
--- a/SECURITY.md
+++ b/SECURITY.md
@@ -8,4 +8,4 @@ In the case of a confirmed security issue, only the current version of validator
**Please don't disclose security-related issues publicly.**
-If you discover a vulnerability within validator, please use [huntr.dev disclosure form](https://huntr.dev/bounties/disclose/?target=https://github.com/validatorjs/validator.js). We will try to validate and respond to reports in a reasonable time. if the issue is confirmed, we will create a security advisory and a patch as soon as possible.
\ No newline at end of file
+If you discover a vulnerability within validator, please use [huntr.dev disclosure form](https://huntr.dev/bounties/disclose/?target=https://github.com/validatorjs/validator.js). We will try to validate and respond to reports in a reasonable time. if the issue is confirmed, we will create a security advisory and a patch as soon as possible.
diff --git a/bower.json b/bower.json
deleted file mode 100644
index 427670cfc..000000000
--- a/bower.json
+++ /dev/null
@@ -1,19 +0,0 @@
-{
- "name": "validator-js",
- "main": "validator.js",
- "homepage": "https://github.com/validatorjs/validator.js",
- "authors": [
- "Chris O'Hara "
- ],
- "description": "String validation and sanitization",
- "license": "MIT",
- "ignore": [
- "**/.*",
- "index.js",
- "build*.js",
- "package.json",
- "node_modules",
- "bower_components",
- "test"
- ]
-}
diff --git a/build-browser.js b/build-browser.js
deleted file mode 100644
index c863bd399..000000000
--- a/build-browser.js
+++ /dev/null
@@ -1,32 +0,0 @@
-/* eslint import/no-extraneous-dependencies: 0 */
-import fs from "fs";
-import { rollup } from "rollup";
-import babel from "rollup-plugin-babel";
-import babelPresetEnv from "@babel/preset-env";
-import pkg from "./package.json";
-
-rollup({
- entry: "src/index.js",
- plugins: [
- babel({
- presets: [[babelPresetEnv, { modules: false }]],
- babelrc: false,
- }),
- ],
-})
- .then((bundle) =>
- bundle.write({
- dest: "validator.js",
- format: "umd",
- moduleName: pkg.name,
- banner: `/*!\n${String(fs.readFileSync("./LICENSE"))
- .trim()
- .split("\n")
- .map((l) => ` * ${l}`)
- .join("\n")}\n */`,
- })
- )
- .catch((e) => {
- process.stderr.write(`${e.message}\n`);
- process.exit(1);
- });
diff --git a/jsconfig.json b/jsconfig.json
index 1376adb2c..98c933f5c 100644
--- a/jsconfig.json
+++ b/jsconfig.json
@@ -3,4 +3,4 @@
"module": "system",
"target": "ES6"
}
-}
\ No newline at end of file
+}
diff --git a/package-lock.json b/package-lock.json
new file mode 100644
index 000000000..c27110eae
--- /dev/null
+++ b/package-lock.json
@@ -0,0 +1,6735 @@
+{
+ "name": "validator",
+ "version": "13.11.0",
+ "lockfileVersion": 3,
+ "requires": true,
+ "packages": {
+ "": {
+ "name": "validator",
+ "version": "13.11.0",
+ "license": "MIT",
+ "devDependencies": {
+ "@babel/cli": "^7.20.7",
+ "@babel/core": "^7.20.12",
+ "@babel/eslint-parser": "^7.19.1",
+ "@babel/preset-env": "^7.20.2",
+ "@rollup/plugin-babel": "^6.0.3",
+ "@rollup/plugin-terser": "^0.3.0",
+ "@vitest/coverage-c8": "^0.27.1",
+ "babel-plugin-add-module-exports": "^1.0.4",
+ "eslint": "^8.31.0",
+ "eslint-config-airbnb-base": "^15.0.0",
+ "eslint-config-prettier": "9.1.0",
+ "eslint-plugin-import": "^2.27.4",
+ "eslint-plugin-node": "^11.1.0",
+ "npm-run-all": "^4.1.5",
+ "prettier": "3.1.1",
+ "rimraf": "^3.0.2",
+ "rollup": "^3.10.0",
+ "timezone-mock": "^1.3.6",
+ "vitest": "^0.27.1"
+ },
+ "engines": {
+ "node": ">= 14"
+ }
+ },
+ "node_modules/@aashutoshrathi/word-wrap": {
+ "version": "1.2.6",
+ "resolved": "https://registry.npmjs.org/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz",
+ "integrity": "sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/@ampproject/remapping": {
+ "version": "2.2.1",
+ "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz",
+ "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==",
+ "dev": true,
+ "dependencies": {
+ "@jridgewell/gen-mapping": "^0.3.0",
+ "@jridgewell/trace-mapping": "^0.3.9"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@babel/cli": {
+ "version": "7.23.4",
+ "resolved": "https://registry.npmjs.org/@babel/cli/-/cli-7.23.4.tgz",
+ "integrity": "sha512-j3luA9xGKCXVyCa5R7lJvOMM+Kc2JEnAEIgz2ggtjQ/j5YUVgfsg/WsG95bbsgq7YLHuiCOzMnoSasuY16qiCw==",
+ "dev": true,
+ "dependencies": {
+ "@jridgewell/trace-mapping": "^0.3.17",
+ "commander": "^4.0.1",
+ "convert-source-map": "^2.0.0",
+ "fs-readdir-recursive": "^1.1.0",
+ "glob": "^7.2.0",
+ "make-dir": "^2.1.0",
+ "slash": "^2.0.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.23.5",
+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz",
+ "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==",
+ "dev": true,
+ "dependencies": {
+ "@babel/highlight": "^7.23.4",
+ "chalk": "^2.4.2"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/compat-data": {
+ "version": "7.23.5",
+ "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.5.tgz",
+ "integrity": "sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==",
+ "dev": true,
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/core": {
+ "version": "7.23.7",
+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.7.tgz",
+ "integrity": "sha512-+UpDgowcmqe36d4NwqvKsyPMlOLNGMsfMmQ5WGCu+siCe3t3dfe9njrzGfdN4qq+bcNUt0+Vw6haRxBOycs4dw==",
+ "dev": true,
+ "dependencies": {
+ "@ampproject/remapping": "^2.2.0",
+ "@babel/code-frame": "^7.23.5",
+ "@babel/generator": "^7.23.6",
+ "@babel/helper-compilation-targets": "^7.23.6",
+ "@babel/helper-module-transforms": "^7.23.3",
+ "@babel/helpers": "^7.23.7",
+ "@babel/parser": "^7.23.6",
+ "@babel/template": "^7.22.15",
+ "@babel/traverse": "^7.23.7",
+ "@babel/types": "^7.23.6",
+ "convert-source-map": "^2.0.0",
+ "debug": "^4.1.0",
+ "gensync": "^1.0.0-beta.2",
+ "json5": "^2.2.3",
+ "semver": "^6.3.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/babel"
+ }
+ },
+ "node_modules/@babel/eslint-parser": {
+ "version": "7.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/eslint-parser/-/eslint-parser-7.23.3.tgz",
+ "integrity": "sha512-9bTuNlyx7oSstodm1cR1bECj4fkiknsDa1YniISkJemMY3DGhJNYBECbe6QD/q54mp2J8VO66jW3/7uP//iFCw==",
+ "dev": true,
+ "dependencies": {
+ "@nicolo-ribaudo/eslint-scope-5-internals": "5.1.1-v1",
+ "eslint-visitor-keys": "^2.1.0",
+ "semver": "^6.3.1"
+ },
+ "engines": {
+ "node": "^10.13.0 || ^12.13.0 || >=14.0.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.11.0",
+ "eslint": "^7.5.0 || ^8.0.0"
+ }
+ },
+ "node_modules/@babel/generator": {
+ "version": "7.23.6",
+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.6.tgz",
+ "integrity": "sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/types": "^7.23.6",
+ "@jridgewell/gen-mapping": "^0.3.2",
+ "@jridgewell/trace-mapping": "^0.3.17",
+ "jsesc": "^2.5.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-annotate-as-pure": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.22.5.tgz",
+ "integrity": "sha512-LvBTxu8bQSQkcyKOU+a1btnNFQ1dMAd0R6PyW3arXes06F6QLWLIrd681bxRPIXlrMGR3XYnW9JyML7dP3qgxg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/types": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-builder-binary-assignment-operator-visitor": {
+ "version": "7.22.15",
+ "resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.22.15.tgz",
+ "integrity": "sha512-QkBXwGgaoC2GtGZRoma6kv7Szfv06khvhFav67ZExau2RaXzy8MpHSMO2PNoP2XtmQphJQRHFfg77Bq731Yizw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/types": "^7.22.15"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-compilation-targets": {
+ "version": "7.23.6",
+ "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz",
+ "integrity": "sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/compat-data": "^7.23.5",
+ "@babel/helper-validator-option": "^7.23.5",
+ "browserslist": "^4.22.2",
+ "lru-cache": "^5.1.1",
+ "semver": "^6.3.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-create-class-features-plugin": {
+ "version": "7.23.7",
+ "resolved": "https://registry.npmjs.org/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.23.7.tgz",
+ "integrity": "sha512-xCoqR/8+BoNnXOY7RVSgv6X+o7pmT5q1d+gGcRlXYkI+9B31glE4jeejhKVpA04O1AtzOt7OSQ6VYKP5FcRl9g==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-annotate-as-pure": "^7.22.5",
+ "@babel/helper-environment-visitor": "^7.22.20",
+ "@babel/helper-function-name": "^7.23.0",
+ "@babel/helper-member-expression-to-functions": "^7.23.0",
+ "@babel/helper-optimise-call-expression": "^7.22.5",
+ "@babel/helper-replace-supers": "^7.22.20",
+ "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5",
+ "@babel/helper-split-export-declaration": "^7.22.6",
+ "semver": "^6.3.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "node_modules/@babel/helper-create-regexp-features-plugin": {
+ "version": "7.22.15",
+ "resolved": "https://registry.npmjs.org/@babel/helper-create-regexp-features-plugin/-/helper-create-regexp-features-plugin-7.22.15.tgz",
+ "integrity": "sha512-29FkPLFjn4TPEa3RE7GpW+qbE8tlsu3jntNYNfcGsc49LphF1PQIiD+vMZ1z1xVOKt+93khA9tc2JBs3kBjA7w==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-annotate-as-pure": "^7.22.5",
+ "regexpu-core": "^5.3.1",
+ "semver": "^6.3.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "node_modules/@babel/helper-define-polyfill-provider": {
+ "version": "0.4.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-define-polyfill-provider/-/helper-define-polyfill-provider-0.4.4.tgz",
+ "integrity": "sha512-QcJMILQCu2jm5TFPGA3lCpJJTeEP+mqeXooG/NZbg/h5FTFi6V0+99ahlRsW8/kRLyb24LZVCCiclDedhLKcBA==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-compilation-targets": "^7.22.6",
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "debug": "^4.1.1",
+ "lodash.debounce": "^4.0.8",
+ "resolve": "^1.14.2"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0"
+ }
+ },
+ "node_modules/@babel/helper-environment-visitor": {
+ "version": "7.22.20",
+ "resolved": "https://registry.npmjs.org/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz",
+ "integrity": "sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA==",
+ "dev": true,
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-function-name": {
+ "version": "7.23.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-function-name/-/helper-function-name-7.23.0.tgz",
+ "integrity": "sha512-OErEqsrxjZTJciZ4Oo+eoZqeW9UIiOcuYKRJA4ZAgV9myA+pOXhhmpfNCKjEH/auVfEYVFJ6y1Tc4r0eIApqiw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/template": "^7.22.15",
+ "@babel/types": "^7.23.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-hoist-variables": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz",
+ "integrity": "sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/types": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-member-expression-to-functions": {
+ "version": "7.23.0",
+ "resolved": "https://registry.npmjs.org/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.23.0.tgz",
+ "integrity": "sha512-6gfrPwh7OuT6gZyJZvd6WbTfrqAo7vm4xCzAXOusKqq/vWdKXphTpj5klHKNmRUU6/QRGlBsyU9mAIPaWHlqJA==",
+ "dev": true,
+ "dependencies": {
+ "@babel/types": "^7.23.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-module-imports": {
+ "version": "7.22.15",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz",
+ "integrity": "sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w==",
+ "dev": true,
+ "dependencies": {
+ "@babel/types": "^7.22.15"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-module-transforms": {
+ "version": "7.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz",
+ "integrity": "sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-environment-visitor": "^7.22.20",
+ "@babel/helper-module-imports": "^7.22.15",
+ "@babel/helper-simple-access": "^7.22.5",
+ "@babel/helper-split-export-declaration": "^7.22.6",
+ "@babel/helper-validator-identifier": "^7.22.20"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "node_modules/@babel/helper-optimise-call-expression": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.22.5.tgz",
+ "integrity": "sha512-HBwaojN0xFRx4yIvpwGqxiV2tUfl7401jlok564NgB9EHS1y6QT17FmKWm4ztqjeVdXLuC4fSvHc5ePpQjoTbw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/types": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-plugin-utils": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.22.5.tgz",
+ "integrity": "sha512-uLls06UVKgFG9QD4OeFYLEGteMIAa5kpTPcFL28yuCIIzsf6ZyKZMllKVOCZFhiZ5ptnwX4mtKdWCBE/uT4amg==",
+ "dev": true,
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-remap-async-to-generator": {
+ "version": "7.22.20",
+ "resolved": "https://registry.npmjs.org/@babel/helper-remap-async-to-generator/-/helper-remap-async-to-generator-7.22.20.tgz",
+ "integrity": "sha512-pBGyV4uBqOns+0UvhsTO8qgl8hO89PmiDYv+/COyp1aeMcmfrfruz+/nCMFiYyFF/Knn0yfrC85ZzNFjembFTw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-annotate-as-pure": "^7.22.5",
+ "@babel/helper-environment-visitor": "^7.22.20",
+ "@babel/helper-wrap-function": "^7.22.20"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "node_modules/@babel/helper-replace-supers": {
+ "version": "7.22.20",
+ "resolved": "https://registry.npmjs.org/@babel/helper-replace-supers/-/helper-replace-supers-7.22.20.tgz",
+ "integrity": "sha512-qsW0In3dbwQUbK8kejJ4R7IHVGwHJlV6lpG6UA7a9hSa2YEiAib+N1T2kr6PEeUT+Fl7najmSOS6SmAwCHK6Tw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-environment-visitor": "^7.22.20",
+ "@babel/helper-member-expression-to-functions": "^7.22.15",
+ "@babel/helper-optimise-call-expression": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "node_modules/@babel/helper-simple-access": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz",
+ "integrity": "sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w==",
+ "dev": true,
+ "dependencies": {
+ "@babel/types": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-skip-transparent-expression-wrappers": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-skip-transparent-expression-wrappers/-/helper-skip-transparent-expression-wrappers-7.22.5.tgz",
+ "integrity": "sha512-tK14r66JZKiC43p8Ki33yLBVJKlQDFoA8GYN67lWCDCqoL6EMMSuM9b+Iff2jHaM/RRFYl7K+iiru7hbRqNx8Q==",
+ "dev": true,
+ "dependencies": {
+ "@babel/types": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-split-export-declaration": {
+ "version": "7.22.6",
+ "resolved": "https://registry.npmjs.org/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz",
+ "integrity": "sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g==",
+ "dev": true,
+ "dependencies": {
+ "@babel/types": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-string-parser": {
+ "version": "7.23.4",
+ "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz",
+ "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-validator-identifier": {
+ "version": "7.22.20",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz",
+ "integrity": "sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==",
+ "dev": true,
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-validator-option": {
+ "version": "7.23.5",
+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz",
+ "integrity": "sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==",
+ "dev": true,
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helper-wrap-function": {
+ "version": "7.22.20",
+ "resolved": "https://registry.npmjs.org/@babel/helper-wrap-function/-/helper-wrap-function-7.22.20.tgz",
+ "integrity": "sha512-pms/UwkOpnQe/PDAEdV/d7dVCoBbB+R4FvYoHGZz+4VPcg7RtYy2KP7S2lbuWM6FCSgob5wshfGESbC/hzNXZw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-function-name": "^7.22.5",
+ "@babel/template": "^7.22.15",
+ "@babel/types": "^7.22.19"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/helpers": {
+ "version": "7.23.7",
+ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.7.tgz",
+ "integrity": "sha512-6AMnjCoC8wjqBzDHkuqpa7jAKwvMo4dC+lr/TFBz+ucfulO1XMpDnwWPGBNwClOKZ8h6xn5N81W/R5OrcKtCbQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/template": "^7.22.15",
+ "@babel/traverse": "^7.23.7",
+ "@babel/types": "^7.23.6"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/highlight": {
+ "version": "7.23.4",
+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz",
+ "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-validator-identifier": "^7.22.20",
+ "chalk": "^2.4.2",
+ "js-tokens": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/parser": {
+ "version": "7.23.6",
+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.6.tgz",
+ "integrity": "sha512-Z2uID7YJ7oNvAI20O9X0bblw7Qqs8Q2hFy0R9tAfnfLkp5MW0UH9eUvnDSnFwKZ0AvgS1ucqR4KzvVHgnke1VQ==",
+ "dev": true,
+ "bin": {
+ "parser": "bin/babel-parser.js"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": {
+ "version": "7.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression/-/plugin-bugfix-safari-id-destructuring-collision-in-function-expression-7.23.3.tgz",
+ "integrity": "sha512-iRkKcCqb7iGnq9+3G6rZ+Ciz5VywC4XNRHe57lKM+jOeYAoR0lVqdeeDRfh0tQcTfw/+vBhHn926FmQhLtlFLQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "node_modules/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": {
+ "version": "7.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining/-/plugin-bugfix-v8-spread-parameters-in-optional-chaining-7.23.3.tgz",
+ "integrity": "sha512-WwlxbfMNdVEpQjZmK5mhm7oSwD3dS6eU+Iwsi4Knl9wAletWem7kaRsGOG+8UEbRyqxY4SS5zvtfXwX+jMxUwQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5",
+ "@babel/plugin-transform-optional-chaining": "^7.23.3"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.13.0"
+ }
+ },
+ "node_modules/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": {
+ "version": "7.23.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly/-/plugin-bugfix-v8-static-class-fields-redefine-readonly-7.23.7.tgz",
+ "integrity": "sha512-LlRT7HgaifEpQA1ZgLVOIJZZFVPWN5iReq/7/JixwBtwcoeVGDBD53ZV28rrsLYOZs1Y/EHhA8N/Z6aazHR8cw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-environment-visitor": "^7.22.20",
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "node_modules/@babel/plugin-proposal-private-property-in-object": {
+ "version": "7.21.0-placeholder-for-preset-env.2",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-proposal-private-property-in-object/-/plugin-proposal-private-property-in-object-7.21.0-placeholder-for-preset-env.2.tgz",
+ "integrity": "sha512-SOSkfJDddaM7mak6cPEpswyTRnuRltl429hMraQEglW+OkovnCzsiszTmsrlY//qLFjCpQDFRvjdm2wA5pPm9w==",
+ "dev": true,
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "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-import-assertions": {
+ "version": "7.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-assertions/-/plugin-syntax-import-assertions-7.23.3.tgz",
+ "integrity": "sha512-lPgDSU+SJLK3xmFDTV2ZRQAiM7UuUjGidwBywFavObCiZc1BeAAcMtHJKUya92hPHO+at63JJPLygilZard8jw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-import-attributes": {
+ "version": "7.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-attributes/-/plugin-syntax-import-attributes-7.23.3.tgz",
+ "integrity": "sha512-pawnE0P9g10xgoP7yKr6CK63K2FMsTE+FZidZO/1PwRdzmAPVs+HS1mAURUsgaoxammTJvULUdIkEK0gOcU2tA==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-syntax-import-meta": {
+ "version": "7.10.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-import-meta/-/plugin-syntax-import-meta-7.10.4.tgz",
+ "integrity": "sha512-Yqfm+XDx0+Prh3VSeEQCPU81yC+JWZ2pDPFSS4ZdpfZhp4MkFMaDC1UqseovEKwSUpnIL7+vK+Clp7bfh0iD7g==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.10.4"
+ },
+ "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-syntax-unicode-sets-regex": {
+ "version": "7.18.6",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-unicode-sets-regex/-/plugin-syntax-unicode-sets-regex-7.18.6.tgz",
+ "integrity": "sha512-727YkEAPwSIQTv5im8QHz3upqp92JTWhidIC81Tdx4VJYIte/VndKf1qKrfnnhPLiPghStWfvC/iFaMCQu7Nqg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-create-regexp-features-plugin": "^7.18.6",
+ "@babel/helper-plugin-utils": "^7.18.6"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-arrow-functions": {
+ "version": "7.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-arrow-functions/-/plugin-transform-arrow-functions-7.23.3.tgz",
+ "integrity": "sha512-NzQcQrzaQPkaEwoTm4Mhyl8jI1huEL/WWIEvudjTCMJ9aBZNpsJbMASx7EQECtQQPS/DcnFpo0FIh3LvEO9cxQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-async-generator-functions": {
+ "version": "7.23.7",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-generator-functions/-/plugin-transform-async-generator-functions-7.23.7.tgz",
+ "integrity": "sha512-PdxEpL71bJp1byMG0va5gwQcXHxuEYC/BgI/e88mGTtohbZN28O5Yit0Plkkm/dBzCF/BxmbNcses1RH1T+urA==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-environment-visitor": "^7.22.20",
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/helper-remap-async-to-generator": "^7.22.20",
+ "@babel/plugin-syntax-async-generators": "^7.8.4"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-async-to-generator": {
+ "version": "7.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-async-to-generator/-/plugin-transform-async-to-generator-7.23.3.tgz",
+ "integrity": "sha512-A7LFsKi4U4fomjqXJlZg/u0ft/n8/7n7lpffUP/ZULx/DtV9SGlNKZolHH6PE8Xl1ngCc0M11OaeZptXVkfKSw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-module-imports": "^7.22.15",
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/helper-remap-async-to-generator": "^7.22.20"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-block-scoped-functions": {
+ "version": "7.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoped-functions/-/plugin-transform-block-scoped-functions-7.23.3.tgz",
+ "integrity": "sha512-vI+0sIaPIO6CNuM9Kk5VmXcMVRiOpDh7w2zZt9GXzmE/9KD70CUEVhvPR/etAeNK/FAEkhxQtXOzVF3EuRL41A==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-block-scoping": {
+ "version": "7.23.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-block-scoping/-/plugin-transform-block-scoping-7.23.4.tgz",
+ "integrity": "sha512-0QqbP6B6HOh7/8iNR4CQU2Th/bbRtBp4KS9vcaZd1fZ0wSh5Fyssg0UCIHwxh+ka+pNDREbVLQnHCMHKZfPwfw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-class-properties": {
+ "version": "7.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-properties/-/plugin-transform-class-properties-7.23.3.tgz",
+ "integrity": "sha512-uM+AN8yCIjDPccsKGlw271xjJtGii+xQIF/uMPS8H15L12jZTsLfF4o5vNO7d/oUguOyfdikHGc/yi9ge4SGIg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-create-class-features-plugin": "^7.22.15",
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-class-static-block": {
+ "version": "7.23.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-class-static-block/-/plugin-transform-class-static-block-7.23.4.tgz",
+ "integrity": "sha512-nsWu/1M+ggti1SOALj3hfx5FXzAY06fwPJsUZD4/A5e1bWi46VUIWtD+kOX6/IdhXGsXBWllLFDSnqSCdUNydQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-create-class-features-plugin": "^7.22.15",
+ "@babel/helper-plugin-utils": "^7.22.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-transform-classes": {
+ "version": "7.23.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-classes/-/plugin-transform-classes-7.23.5.tgz",
+ "integrity": "sha512-jvOTR4nicqYC9yzOHIhXG5emiFEOpappSJAl73SDSEDcybD+Puuze8Tnpb9p9qEyYup24tq891gkaygIFvWDqg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-annotate-as-pure": "^7.22.5",
+ "@babel/helper-compilation-targets": "^7.22.15",
+ "@babel/helper-environment-visitor": "^7.22.20",
+ "@babel/helper-function-name": "^7.23.0",
+ "@babel/helper-optimise-call-expression": "^7.22.5",
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/helper-replace-supers": "^7.22.20",
+ "@babel/helper-split-export-declaration": "^7.22.6",
+ "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.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-computed-properties/-/plugin-transform-computed-properties-7.23.3.tgz",
+ "integrity": "sha512-dTj83UVTLw/+nbiHqQSFdwO9CbTtwq1DsDqm3CUEtDrZNET5rT5E6bIdTlOftDTDLMYxvxHNEYO4B9SLl8SLZw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/template": "^7.22.15"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-destructuring": {
+ "version": "7.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-destructuring/-/plugin-transform-destructuring-7.23.3.tgz",
+ "integrity": "sha512-n225npDqjDIr967cMScVKHXJs7rout1q+tt50inyBCPkyZ8KxeI6d+GIbSBTT/w/9WdlWDOej3V9HE5Lgk57gw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-dotall-regex": {
+ "version": "7.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dotall-regex/-/plugin-transform-dotall-regex-7.23.3.tgz",
+ "integrity": "sha512-vgnFYDHAKzFaTVp+mneDsIEbnJ2Np/9ng9iviHw3P/KVcgONxpNULEW/51Z/BaFojG2GI2GwwXck5uV1+1NOYQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-create-regexp-features-plugin": "^7.22.15",
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-duplicate-keys": {
+ "version": "7.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-duplicate-keys/-/plugin-transform-duplicate-keys-7.23.3.tgz",
+ "integrity": "sha512-RrqQ+BQmU3Oyav3J+7/myfvRCq7Tbz+kKLLshUmMwNlDHExbGL7ARhajvoBJEvc+fCguPPu887N+3RRXBVKZUA==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-dynamic-import": {
+ "version": "7.23.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-dynamic-import/-/plugin-transform-dynamic-import-7.23.4.tgz",
+ "integrity": "sha512-V6jIbLhdJK86MaLh4Jpghi8ho5fGzt3imHOBu/x0jlBaPYqDoWz4RDXjmMOfnh+JWNaQleEAByZLV0QzBT4YQQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.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-transform-exponentiation-operator": {
+ "version": "7.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-exponentiation-operator/-/plugin-transform-exponentiation-operator-7.23.3.tgz",
+ "integrity": "sha512-5fhCsl1odX96u7ILKHBj4/Y8vipoqwsJMh4csSA8qFfxrZDEA4Ssku2DyNvMJSmZNOEBT750LfFPbtrnTP90BQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-builder-binary-assignment-operator-visitor": "^7.22.15",
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-export-namespace-from": {
+ "version": "7.23.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-export-namespace-from/-/plugin-transform-export-namespace-from-7.23.4.tgz",
+ "integrity": "sha512-GzuSBcKkx62dGzZI1WVgTWvkkz84FZO5TC5T8dl/Tht/rAla6Dg/Mz9Yhypg+ezVACf/rgDuQt3kbWEv7LdUDQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.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-transform-for-of": {
+ "version": "7.23.6",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-for-of/-/plugin-transform-for-of-7.23.6.tgz",
+ "integrity": "sha512-aYH4ytZ0qSuBbpfhuofbg/e96oQ7U2w1Aw/UQmKT+1l39uEhUPoFS3fHevDc1G0OvewyDudfMKY1OulczHzWIw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-function-name": {
+ "version": "7.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-function-name/-/plugin-transform-function-name-7.23.3.tgz",
+ "integrity": "sha512-I1QXp1LxIvt8yLaib49dRW5Okt7Q4oaxao6tFVKS/anCdEOMtYwWVKoiOA1p34GOWIZjUK0E+zCp7+l1pfQyiw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-compilation-targets": "^7.22.15",
+ "@babel/helper-function-name": "^7.23.0",
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-json-strings": {
+ "version": "7.23.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-json-strings/-/plugin-transform-json-strings-7.23.4.tgz",
+ "integrity": "sha512-81nTOqM1dMwZ/aRXQ59zVubN9wHGqk6UtqRK+/q+ciXmRy8fSolhGVvG09HHRGo4l6fr/c4ZhXUQH0uFW7PZbg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.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-transform-literals": {
+ "version": "7.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-literals/-/plugin-transform-literals-7.23.3.tgz",
+ "integrity": "sha512-wZ0PIXRxnwZvl9AYpqNUxpZ5BiTGrYt7kueGQ+N5FiQ7RCOD4cm8iShd6S6ggfVIWaJf2EMk8eRzAh52RfP4rQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-logical-assignment-operators": {
+ "version": "7.23.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-logical-assignment-operators/-/plugin-transform-logical-assignment-operators-7.23.4.tgz",
+ "integrity": "sha512-Mc/ALf1rmZTP4JKKEhUwiORU+vcfarFVLfcFiolKUo6sewoxSEgl36ak5t+4WamRsNr6nzjZXQjM35WsU+9vbg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.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-transform-member-expression-literals": {
+ "version": "7.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-member-expression-literals/-/plugin-transform-member-expression-literals-7.23.3.tgz",
+ "integrity": "sha512-sC3LdDBDi5x96LA+Ytekz2ZPk8i/Ck+DEuDbRAll5rknJ5XRTSaPKEYwomLcs1AA8wg9b3KjIQRsnApj+q51Ag==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-modules-amd": {
+ "version": "7.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-amd/-/plugin-transform-modules-amd-7.23.3.tgz",
+ "integrity": "sha512-vJYQGxeKM4t8hYCKVBlZX/gtIY2I7mRGFNcm85sgXGMTBcoV3QdVtdpbcWEbzbfUIUZKwvgFT82mRvaQIebZzw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-module-transforms": "^7.23.3",
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-modules-commonjs": {
+ "version": "7.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-commonjs/-/plugin-transform-modules-commonjs-7.23.3.tgz",
+ "integrity": "sha512-aVS0F65LKsdNOtcz6FRCpE4OgsP2OFnW46qNxNIX9h3wuzaNcSQsJysuMwqSibC98HPrf2vCgtxKNwS0DAlgcA==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-module-transforms": "^7.23.3",
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/helper-simple-access": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-modules-systemjs": {
+ "version": "7.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-systemjs/-/plugin-transform-modules-systemjs-7.23.3.tgz",
+ "integrity": "sha512-ZxyKGTkF9xT9YJuKQRo19ewf3pXpopuYQd8cDXqNzc3mUNbOME0RKMoZxviQk74hwzfQsEe66dE92MaZbdHKNQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-hoist-variables": "^7.22.5",
+ "@babel/helper-module-transforms": "^7.23.3",
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/helper-validator-identifier": "^7.22.20"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-modules-umd": {
+ "version": "7.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-modules-umd/-/plugin-transform-modules-umd-7.23.3.tgz",
+ "integrity": "sha512-zHsy9iXX2nIsCBFPud3jKn1IRPWg3Ing1qOZgeKV39m1ZgIdpJqvlWVeiHBZC6ITRG0MfskhYe9cLgntfSFPIg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-module-transforms": "^7.23.3",
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-named-capturing-groups-regex": {
+ "version": "7.22.5",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-named-capturing-groups-regex/-/plugin-transform-named-capturing-groups-regex-7.22.5.tgz",
+ "integrity": "sha512-YgLLKmS3aUBhHaxp5hi1WJTgOUb/NCuDHzGT9z9WTt3YG+CPRhJs6nprbStx6DnWM4dh6gt7SU3sZodbZ08adQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-create-regexp-features-plugin": "^7.22.5",
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-new-target": {
+ "version": "7.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-new-target/-/plugin-transform-new-target-7.23.3.tgz",
+ "integrity": "sha512-YJ3xKqtJMAT5/TIZnpAR3I+K+WaDowYbN3xyxI8zxx/Gsypwf9B9h0VB+1Nh6ACAAPRS5NSRje0uVv5i79HYGQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-nullish-coalescing-operator": {
+ "version": "7.23.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-nullish-coalescing-operator/-/plugin-transform-nullish-coalescing-operator-7.23.4.tgz",
+ "integrity": "sha512-jHE9EVVqHKAQx+VePv5LLGHjmHSJR76vawFPTdlxR/LVJPfOEGxREQwQfjuZEOPTwG92X3LINSh3M40Rv4zpVA==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.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-transform-numeric-separator": {
+ "version": "7.23.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-numeric-separator/-/plugin-transform-numeric-separator-7.23.4.tgz",
+ "integrity": "sha512-mps6auzgwjRrwKEZA05cOwuDc9FAzoyFS4ZsG/8F43bTLf/TgkJg7QXOrPO1JO599iA3qgK9MXdMGOEC8O1h6Q==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.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-transform-object-rest-spread": {
+ "version": "7.23.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-rest-spread/-/plugin-transform-object-rest-spread-7.23.4.tgz",
+ "integrity": "sha512-9x9K1YyeQVw0iOXJlIzwm8ltobIIv7j2iLyP2jIhEbqPRQ7ScNgwQufU2I0Gq11VjyG4gI4yMXt2VFags+1N3g==",
+ "dev": true,
+ "dependencies": {
+ "@babel/compat-data": "^7.23.3",
+ "@babel/helper-compilation-targets": "^7.22.15",
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/plugin-syntax-object-rest-spread": "^7.8.3",
+ "@babel/plugin-transform-parameters": "^7.23.3"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-object-super": {
+ "version": "7.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-object-super/-/plugin-transform-object-super-7.23.3.tgz",
+ "integrity": "sha512-BwQ8q0x2JG+3lxCVFohg+KbQM7plfpBwThdW9A6TMtWwLsbDA01Ek2Zb/AgDN39BiZsExm4qrXxjk+P1/fzGrA==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/helper-replace-supers": "^7.22.20"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-optional-catch-binding": {
+ "version": "7.23.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-catch-binding/-/plugin-transform-optional-catch-binding-7.23.4.tgz",
+ "integrity": "sha512-XIq8t0rJPHf6Wvmbn9nFxU6ao4c7WhghTR5WyV8SrJfUFzyxhCm4nhC+iAp3HFhbAKLfYpgzhJ6t4XCtVwqO5A==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.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-transform-optional-chaining": {
+ "version": "7.23.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-optional-chaining/-/plugin-transform-optional-chaining-7.23.4.tgz",
+ "integrity": "sha512-ZU8y5zWOfjM5vZ+asjgAPwDaBjJzgufjES89Rs4Lpq63O300R/kOz30WCLo6BxxX6QVEilwSlpClnG5cZaikTA==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/helper-skip-transparent-expression-wrappers": "^7.22.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-transform-parameters": {
+ "version": "7.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-parameters/-/plugin-transform-parameters-7.23.3.tgz",
+ "integrity": "sha512-09lMt6UsUb3/34BbECKVbVwrT9bO6lILWln237z7sLaWnMsTi7Yc9fhX5DLpkJzAGfaReXI22wP41SZmnAA3Vw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-private-methods": {
+ "version": "7.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-methods/-/plugin-transform-private-methods-7.23.3.tgz",
+ "integrity": "sha512-UzqRcRtWsDMTLrRWFvUBDwmw06tCQH9Rl1uAjfh6ijMSmGYQ+fpdB+cnqRC8EMh5tuuxSv0/TejGL+7vyj+50g==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-create-class-features-plugin": "^7.22.15",
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-private-property-in-object": {
+ "version": "7.23.4",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-private-property-in-object/-/plugin-transform-private-property-in-object-7.23.4.tgz",
+ "integrity": "sha512-9G3K1YqTq3F4Vt88Djx1UZ79PDyj+yKRnUy7cZGSMe+a7jkwD259uKKuUzQlPkGam7R+8RJwh5z4xO27fA1o2A==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-annotate-as-pure": "^7.22.5",
+ "@babel/helper-create-class-features-plugin": "^7.22.15",
+ "@babel/helper-plugin-utils": "^7.22.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-transform-property-literals": {
+ "version": "7.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-property-literals/-/plugin-transform-property-literals-7.23.3.tgz",
+ "integrity": "sha512-jR3Jn3y7cZp4oEWPFAlRsSWjxKe4PZILGBSd4nis1TsC5qeSpb+nrtihJuDhNI7QHiVbUaiXa0X2RZY3/TI6Nw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-regenerator": {
+ "version": "7.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-regenerator/-/plugin-transform-regenerator-7.23.3.tgz",
+ "integrity": "sha512-KP+75h0KghBMcVpuKisx3XTu9Ncut8Q8TuvGO4IhY+9D5DFEckQefOuIsB/gQ2tG71lCke4NMrtIPS8pOj18BQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "regenerator-transform": "^0.15.2"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-reserved-words": {
+ "version": "7.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-reserved-words/-/plugin-transform-reserved-words-7.23.3.tgz",
+ "integrity": "sha512-QnNTazY54YqgGxwIexMZva9gqbPa15t/x9VS+0fsEFWplwVpXYZivtgl43Z1vMpc1bdPP2PP8siFeVcnFvA3Cg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-shorthand-properties": {
+ "version": "7.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-shorthand-properties/-/plugin-transform-shorthand-properties-7.23.3.tgz",
+ "integrity": "sha512-ED2fgqZLmexWiN+YNFX26fx4gh5qHDhn1O2gvEhreLW2iI63Sqm4llRLCXALKrCnbN4Jy0VcMQZl/SAzqug/jg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-spread": {
+ "version": "7.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-spread/-/plugin-transform-spread-7.23.3.tgz",
+ "integrity": "sha512-VvfVYlrlBVu+77xVTOAoxQ6mZbnIq5FM0aGBSFEcIh03qHf+zNqA4DC/3XMUozTg7bZV3e3mZQ0i13VB6v5yUg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/helper-skip-transparent-expression-wrappers": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-sticky-regex": {
+ "version": "7.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-sticky-regex/-/plugin-transform-sticky-regex-7.23.3.tgz",
+ "integrity": "sha512-HZOyN9g+rtvnOU3Yh7kSxXrKbzgrm5X4GncPY1QOquu7epga5MxKHVpYu2hvQnry/H+JjckSYRb93iNfsioAGg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-template-literals": {
+ "version": "7.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-template-literals/-/plugin-transform-template-literals-7.23.3.tgz",
+ "integrity": "sha512-Flok06AYNp7GV2oJPZZcP9vZdszev6vPBkHLwxwSpaIqx75wn6mUd3UFWsSsA0l8nXAKkyCmL/sR02m8RYGeHg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-typeof-symbol": {
+ "version": "7.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-typeof-symbol/-/plugin-transform-typeof-symbol-7.23.3.tgz",
+ "integrity": "sha512-4t15ViVnaFdrPC74be1gXBSMzXk3B4Us9lP7uLRQHTFpV5Dvt33pn+2MyyNxmN3VTTm3oTrZVMUmuw3oBnQ2oQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-unicode-escapes": {
+ "version": "7.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.23.3.tgz",
+ "integrity": "sha512-OMCUx/bU6ChE3r4+ZdylEqAjaQgHAgipgW8nsCfu5pGqDcFytVd91AwRvUJSBZDz0exPGgnjoqhgRYLRjFZc9Q==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-unicode-property-regex": {
+ "version": "7.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-property-regex/-/plugin-transform-unicode-property-regex-7.23.3.tgz",
+ "integrity": "sha512-KcLIm+pDZkWZQAFJ9pdfmh89EwVfmNovFBcXko8szpBeF8z68kWIPeKlmSOkT9BXJxs2C0uk+5LxoxIv62MROA==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-create-regexp-features-plugin": "^7.22.15",
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-unicode-regex": {
+ "version": "7.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-regex/-/plugin-transform-unicode-regex-7.23.3.tgz",
+ "integrity": "sha512-wMHpNA4x2cIA32b/ci3AfwNgheiva2W0WUKWTK7vBHBhDKfPsc5cFGNWm69WBqpwd86u1qwZ9PWevKqm1A3yAw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-create-regexp-features-plugin": "^7.22.15",
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/plugin-transform-unicode-sets-regex": {
+ "version": "7.23.3",
+ "resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-sets-regex/-/plugin-transform-unicode-sets-regex-7.23.3.tgz",
+ "integrity": "sha512-W7lliA/v9bNR83Qc3q1ip9CQMZ09CcHDbHfbLRDNuAhn1Mvkr1ZNF7hPmztMQvtTGVLJ9m8IZqWsTkXOml8dbw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-create-regexp-features-plugin": "^7.22.15",
+ "@babel/helper-plugin-utils": "^7.22.5"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0"
+ }
+ },
+ "node_modules/@babel/preset-env": {
+ "version": "7.23.7",
+ "resolved": "https://registry.npmjs.org/@babel/preset-env/-/preset-env-7.23.7.tgz",
+ "integrity": "sha512-SY27X/GtTz/L4UryMNJ6p4fH4nsgWbz84y9FE0bQeWJP6O5BhgVCt53CotQKHCOeXJel8VyhlhujhlltKms/CA==",
+ "dev": true,
+ "dependencies": {
+ "@babel/compat-data": "^7.23.5",
+ "@babel/helper-compilation-targets": "^7.23.6",
+ "@babel/helper-plugin-utils": "^7.22.5",
+ "@babel/helper-validator-option": "^7.23.5",
+ "@babel/plugin-bugfix-safari-id-destructuring-collision-in-function-expression": "^7.23.3",
+ "@babel/plugin-bugfix-v8-spread-parameters-in-optional-chaining": "^7.23.3",
+ "@babel/plugin-bugfix-v8-static-class-fields-redefine-readonly": "^7.23.7",
+ "@babel/plugin-proposal-private-property-in-object": "7.21.0-placeholder-for-preset-env.2",
+ "@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-import-assertions": "^7.23.3",
+ "@babel/plugin-syntax-import-attributes": "^7.23.3",
+ "@babel/plugin-syntax-import-meta": "^7.10.4",
+ "@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-syntax-unicode-sets-regex": "^7.18.6",
+ "@babel/plugin-transform-arrow-functions": "^7.23.3",
+ "@babel/plugin-transform-async-generator-functions": "^7.23.7",
+ "@babel/plugin-transform-async-to-generator": "^7.23.3",
+ "@babel/plugin-transform-block-scoped-functions": "^7.23.3",
+ "@babel/plugin-transform-block-scoping": "^7.23.4",
+ "@babel/plugin-transform-class-properties": "^7.23.3",
+ "@babel/plugin-transform-class-static-block": "^7.23.4",
+ "@babel/plugin-transform-classes": "^7.23.5",
+ "@babel/plugin-transform-computed-properties": "^7.23.3",
+ "@babel/plugin-transform-destructuring": "^7.23.3",
+ "@babel/plugin-transform-dotall-regex": "^7.23.3",
+ "@babel/plugin-transform-duplicate-keys": "^7.23.3",
+ "@babel/plugin-transform-dynamic-import": "^7.23.4",
+ "@babel/plugin-transform-exponentiation-operator": "^7.23.3",
+ "@babel/plugin-transform-export-namespace-from": "^7.23.4",
+ "@babel/plugin-transform-for-of": "^7.23.6",
+ "@babel/plugin-transform-function-name": "^7.23.3",
+ "@babel/plugin-transform-json-strings": "^7.23.4",
+ "@babel/plugin-transform-literals": "^7.23.3",
+ "@babel/plugin-transform-logical-assignment-operators": "^7.23.4",
+ "@babel/plugin-transform-member-expression-literals": "^7.23.3",
+ "@babel/plugin-transform-modules-amd": "^7.23.3",
+ "@babel/plugin-transform-modules-commonjs": "^7.23.3",
+ "@babel/plugin-transform-modules-systemjs": "^7.23.3",
+ "@babel/plugin-transform-modules-umd": "^7.23.3",
+ "@babel/plugin-transform-named-capturing-groups-regex": "^7.22.5",
+ "@babel/plugin-transform-new-target": "^7.23.3",
+ "@babel/plugin-transform-nullish-coalescing-operator": "^7.23.4",
+ "@babel/plugin-transform-numeric-separator": "^7.23.4",
+ "@babel/plugin-transform-object-rest-spread": "^7.23.4",
+ "@babel/plugin-transform-object-super": "^7.23.3",
+ "@babel/plugin-transform-optional-catch-binding": "^7.23.4",
+ "@babel/plugin-transform-optional-chaining": "^7.23.4",
+ "@babel/plugin-transform-parameters": "^7.23.3",
+ "@babel/plugin-transform-private-methods": "^7.23.3",
+ "@babel/plugin-transform-private-property-in-object": "^7.23.4",
+ "@babel/plugin-transform-property-literals": "^7.23.3",
+ "@babel/plugin-transform-regenerator": "^7.23.3",
+ "@babel/plugin-transform-reserved-words": "^7.23.3",
+ "@babel/plugin-transform-shorthand-properties": "^7.23.3",
+ "@babel/plugin-transform-spread": "^7.23.3",
+ "@babel/plugin-transform-sticky-regex": "^7.23.3",
+ "@babel/plugin-transform-template-literals": "^7.23.3",
+ "@babel/plugin-transform-typeof-symbol": "^7.23.3",
+ "@babel/plugin-transform-unicode-escapes": "^7.23.3",
+ "@babel/plugin-transform-unicode-property-regex": "^7.23.3",
+ "@babel/plugin-transform-unicode-regex": "^7.23.3",
+ "@babel/plugin-transform-unicode-sets-regex": "^7.23.3",
+ "@babel/preset-modules": "0.1.6-no-external-plugins",
+ "babel-plugin-polyfill-corejs2": "^0.4.7",
+ "babel-plugin-polyfill-corejs3": "^0.8.7",
+ "babel-plugin-polyfill-regenerator": "^0.5.4",
+ "core-js-compat": "^3.31.0",
+ "semver": "^6.3.1"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0"
+ }
+ },
+ "node_modules/@babel/preset-modules": {
+ "version": "0.1.6-no-external-plugins",
+ "resolved": "https://registry.npmjs.org/@babel/preset-modules/-/preset-modules-0.1.6-no-external-plugins.tgz",
+ "integrity": "sha512-HrcgcIESLm9aIR842yhJ5RWan/gebQUJ6E/E5+rf0y9o6oj7w0Br+sWuL6kEQ/o/AdfvR1Je9jG18/gnpwjEyA==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-plugin-utils": "^7.0.0",
+ "@babel/types": "^7.4.4",
+ "esutils": "^2.0.2"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0-0 || ^8.0.0-0 <8.0.0"
+ }
+ },
+ "node_modules/@babel/regjsgen": {
+ "version": "0.8.0",
+ "resolved": "https://registry.npmjs.org/@babel/regjsgen/-/regjsgen-0.8.0.tgz",
+ "integrity": "sha512-x/rqGMdzj+fWZvCOYForTghzbtqPDZ5gPwaoNGHdgDfF2QA/XZbCBp4Moo5scrkAMPhB7z26XM/AaHuIJdgauA==",
+ "dev": true
+ },
+ "node_modules/@babel/runtime": {
+ "version": "7.23.7",
+ "resolved": "https://registry.npmjs.org/@babel/runtime/-/runtime-7.23.7.tgz",
+ "integrity": "sha512-w06OXVOFso7LcbzMiDGt+3X7Rh7Ho8MmgPoWU3rarH+8upf+wSU/grlGbWzQyr3DkdN6ZeuMFjpdwW0Q+HxobA==",
+ "dev": true,
+ "dependencies": {
+ "regenerator-runtime": "^0.14.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/template": {
+ "version": "7.22.15",
+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz",
+ "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==",
+ "dev": true,
+ "dependencies": {
+ "@babel/code-frame": "^7.22.13",
+ "@babel/parser": "^7.22.15",
+ "@babel/types": "^7.22.15"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/traverse": {
+ "version": "7.23.7",
+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.7.tgz",
+ "integrity": "sha512-tY3mM8rH9jM0YHFGyfC0/xf+SB5eKUu7HPj7/k3fpi9dAlsMc5YbQvDi0Sh2QTPXqMhyaAtzAr807TIyfQrmyg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/code-frame": "^7.23.5",
+ "@babel/generator": "^7.23.6",
+ "@babel/helper-environment-visitor": "^7.22.20",
+ "@babel/helper-function-name": "^7.23.0",
+ "@babel/helper-hoist-variables": "^7.22.5",
+ "@babel/helper-split-export-declaration": "^7.22.6",
+ "@babel/parser": "^7.23.6",
+ "@babel/types": "^7.23.6",
+ "debug": "^4.3.1",
+ "globals": "^11.1.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@babel/types": {
+ "version": "7.23.6",
+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.6.tgz",
+ "integrity": "sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-string-parser": "^7.23.4",
+ "@babel/helper-validator-identifier": "^7.22.20",
+ "to-fast-properties": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=6.9.0"
+ }
+ },
+ "node_modules/@bcoe/v8-coverage": {
+ "version": "0.2.3",
+ "resolved": "https://registry.npmjs.org/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz",
+ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==",
+ "dev": true
+ },
+ "node_modules/@esbuild/android-arm": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz",
+ "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/android-arm64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz",
+ "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/android-x64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz",
+ "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "android"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/darwin-arm64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz",
+ "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/darwin-x64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz",
+ "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "darwin"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/freebsd-arm64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz",
+ "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/freebsd-x64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz",
+ "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "freebsd"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/linux-arm": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz",
+ "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==",
+ "cpu": [
+ "arm"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/linux-arm64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz",
+ "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/linux-ia32": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz",
+ "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/linux-loong64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz",
+ "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==",
+ "cpu": [
+ "loong64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/linux-mips64el": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz",
+ "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==",
+ "cpu": [
+ "mips64el"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/linux-ppc64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz",
+ "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==",
+ "cpu": [
+ "ppc64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/linux-riscv64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz",
+ "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==",
+ "cpu": [
+ "riscv64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/linux-s390x": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz",
+ "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==",
+ "cpu": [
+ "s390x"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/linux-x64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz",
+ "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "linux"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/netbsd-x64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz",
+ "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "netbsd"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/openbsd-x64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz",
+ "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "openbsd"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/sunos-x64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz",
+ "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "sunos"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/win32-arm64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz",
+ "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==",
+ "cpu": [
+ "arm64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/win32-ia32": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz",
+ "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==",
+ "cpu": [
+ "ia32"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@esbuild/win32-x64": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz",
+ "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==",
+ "cpu": [
+ "x64"
+ ],
+ "dev": true,
+ "optional": true,
+ "os": [
+ "win32"
+ ],
+ "engines": {
+ "node": ">=12"
+ }
+ },
+ "node_modules/@eslint-community/eslint-utils": {
+ "version": "4.4.0",
+ "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz",
+ "integrity": "sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA==",
+ "dev": true,
+ "dependencies": {
+ "eslint-visitor-keys": "^3.3.0"
+ },
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "peerDependencies": {
+ "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0"
+ }
+ },
+ "node_modules/@eslint-community/eslint-utils/node_modules/eslint-visitor-keys": {
+ "version": "3.4.3",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz",
+ "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==",
+ "dev": true,
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/@eslint-community/regexpp": {
+ "version": "4.10.0",
+ "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz",
+ "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==",
+ "dev": true,
+ "engines": {
+ "node": "^12.0.0 || ^14.0.0 || >=16.0.0"
+ }
+ },
+ "node_modules/@eslint/eslintrc": {
+ "version": "2.1.4",
+ "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-2.1.4.tgz",
+ "integrity": "sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==",
+ "dev": true,
+ "dependencies": {
+ "ajv": "^6.12.4",
+ "debug": "^4.3.2",
+ "espree": "^9.6.0",
+ "globals": "^13.19.0",
+ "ignore": "^5.2.0",
+ "import-fresh": "^3.2.1",
+ "js-yaml": "^4.1.0",
+ "minimatch": "^3.1.2",
+ "strip-json-comments": "^3.1.1"
+ },
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/@eslint/eslintrc/node_modules/globals": {
+ "version": "13.24.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz",
+ "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==",
+ "dev": true,
+ "dependencies": {
+ "type-fest": "^0.20.2"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/@eslint/js": {
+ "version": "8.56.0",
+ "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz",
+ "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==",
+ "dev": true,
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ }
+ },
+ "node_modules/@humanwhocodes/config-array": {
+ "version": "0.11.13",
+ "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz",
+ "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==",
+ "dev": true,
+ "dependencies": {
+ "@humanwhocodes/object-schema": "^2.0.1",
+ "debug": "^4.1.1",
+ "minimatch": "^3.0.5"
+ },
+ "engines": {
+ "node": ">=10.10.0"
+ }
+ },
+ "node_modules/@humanwhocodes/module-importer": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",
+ "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==",
+ "dev": true,
+ "engines": {
+ "node": ">=12.22"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/nzakas"
+ }
+ },
+ "node_modules/@humanwhocodes/object-schema": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz",
+ "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==",
+ "dev": true
+ },
+ "node_modules/@istanbuljs/schema": {
+ "version": "0.1.3",
+ "resolved": "https://registry.npmjs.org/@istanbuljs/schema/-/schema-0.1.3.tgz",
+ "integrity": "sha512-ZXRY4jNvVgSVQ8DL3LTcakaAtXwTVUxE81hslsyD2AtoXW/wVob10HkOJ1X/pAlcI7D+2YoZKg5do8G/w6RYgA==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/@jridgewell/gen-mapping": {
+ "version": "0.3.3",
+ "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz",
+ "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==",
+ "dev": true,
+ "dependencies": {
+ "@jridgewell/set-array": "^1.0.1",
+ "@jridgewell/sourcemap-codec": "^1.4.10",
+ "@jridgewell/trace-mapping": "^0.3.9"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@jridgewell/resolve-uri": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz",
+ "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==",
+ "dev": true,
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@jridgewell/set-array": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz",
+ "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==",
+ "dev": true,
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/@jridgewell/source-map": {
+ "version": "0.3.5",
+ "resolved": "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.5.tgz",
+ "integrity": "sha512-UTYAUj/wviwdsMfzoSJspJxbkH5o1snzwX0//0ENX1u/55kkZZkcTZP6u9bwKGkv+dkk9at4m1Cpt0uY80kcpQ==",
+ "dev": true,
+ "dependencies": {
+ "@jridgewell/gen-mapping": "^0.3.0",
+ "@jridgewell/trace-mapping": "^0.3.9"
+ }
+ },
+ "node_modules/@jridgewell/sourcemap-codec": {
+ "version": "1.4.15",
+ "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz",
+ "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==",
+ "dev": true
+ },
+ "node_modules/@jridgewell/trace-mapping": {
+ "version": "0.3.20",
+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.20.tgz",
+ "integrity": "sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==",
+ "dev": true,
+ "dependencies": {
+ "@jridgewell/resolve-uri": "^3.1.0",
+ "@jridgewell/sourcemap-codec": "^1.4.14"
+ }
+ },
+ "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/@nicolo-ribaudo/eslint-scope-5-internals": {
+ "version": "5.1.1-v1",
+ "resolved": "https://registry.npmjs.org/@nicolo-ribaudo/eslint-scope-5-internals/-/eslint-scope-5-internals-5.1.1-v1.tgz",
+ "integrity": "sha512-54/JRvkLIzzDWshCWfuhadfrfZVPiElY8Fcgmg1HroEly/EDSszzhBAsarCux+D/kOslTRquNzuyGSmUSTTHGg==",
+ "dev": true,
+ "dependencies": {
+ "eslint-scope": "5.1.1"
+ }
+ },
+ "node_modules/@nodelib/fs.scandir": {
+ "version": "2.1.5",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz",
+ "integrity": "sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==",
+ "dev": true,
+ "dependencies": {
+ "@nodelib/fs.stat": "2.0.5",
+ "run-parallel": "^1.1.9"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/@nodelib/fs.stat": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz",
+ "integrity": "sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A==",
+ "dev": true,
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/@nodelib/fs.walk": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz",
+ "integrity": "sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==",
+ "dev": true,
+ "dependencies": {
+ "@nodelib/fs.scandir": "2.1.5",
+ "fastq": "^1.6.0"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/@rollup/plugin-babel": {
+ "version": "6.0.4",
+ "resolved": "https://registry.npmjs.org/@rollup/plugin-babel/-/plugin-babel-6.0.4.tgz",
+ "integrity": "sha512-YF7Y52kFdFT/xVSuVdjkV5ZdX/3YtmX0QulG+x0taQOtJdHYzVU61aSSkAgVJ7NOv6qPkIYiJSgSWWN/DM5sGw==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-module-imports": "^7.18.6",
+ "@rollup/pluginutils": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.0.0",
+ "@types/babel__core": "^7.1.9",
+ "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/babel__core": {
+ "optional": true
+ },
+ "rollup": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@rollup/plugin-terser": {
+ "version": "0.3.0",
+ "resolved": "https://registry.npmjs.org/@rollup/plugin-terser/-/plugin-terser-0.3.0.tgz",
+ "integrity": "sha512-mYTkNW9KjOscS/3QWU5LfOKsR3/fAAVDaqcAe2TZ7ng6pN46f+C7FOZbITuIW/neA+PhcjoKl7yMyB3XcmA4gw==",
+ "dev": true,
+ "dependencies": {
+ "serialize-javascript": "^6.0.0",
+ "smob": "^0.0.6",
+ "terser": "^5.15.1"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ },
+ "peerDependencies": {
+ "rollup": "^2.x || ^3.x"
+ },
+ "peerDependenciesMeta": {
+ "rollup": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@rollup/pluginutils": {
+ "version": "5.1.0",
+ "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-5.1.0.tgz",
+ "integrity": "sha512-XTIWOPPcpvyKI6L1NHo0lFlCyznUEyPmPY1mc3KpPVDYulHSTvyeLNVW00QTLIAFNhR3kYnJTQHeGqU4M3n09g==",
+ "dev": true,
+ "dependencies": {
+ "@types/estree": "^1.0.0",
+ "estree-walker": "^2.0.2",
+ "picomatch": "^2.3.1"
+ },
+ "engines": {
+ "node": ">=14.0.0"
+ },
+ "peerDependencies": {
+ "rollup": "^1.20.0||^2.0.0||^3.0.0||^4.0.0"
+ },
+ "peerDependenciesMeta": {
+ "rollup": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/@types/chai": {
+ "version": "4.3.11",
+ "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.3.11.tgz",
+ "integrity": "sha512-qQR1dr2rGIHYlJulmr8Ioq3De0Le9E4MJ5AiaeAETJJpndT1uUNHsGFK3L/UIu+rbkQSdj8J/w2bCsBZc/Y5fQ==",
+ "dev": true
+ },
+ "node_modules/@types/chai-subset": {
+ "version": "1.3.5",
+ "resolved": "https://registry.npmjs.org/@types/chai-subset/-/chai-subset-1.3.5.tgz",
+ "integrity": "sha512-c2mPnw+xHtXDoHmdtcCXGwyLMiauiAyxWMzhGpqHC4nqI/Y5G2XhTampslK2rb59kpcuHon03UH8W6iYUzw88A==",
+ "dev": true,
+ "dependencies": {
+ "@types/chai": "*"
+ }
+ },
+ "node_modules/@types/estree": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz",
+ "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==",
+ "dev": true
+ },
+ "node_modules/@types/istanbul-lib-coverage": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz",
+ "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==",
+ "dev": true
+ },
+ "node_modules/@types/json5": {
+ "version": "0.0.29",
+ "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz",
+ "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==",
+ "dev": true
+ },
+ "node_modules/@types/node": {
+ "version": "20.10.6",
+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.10.6.tgz",
+ "integrity": "sha512-Vac8H+NlRNNlAmDfGUP7b5h/KA+AtWIzuXy0E6OyP8f1tCLYAtPvKRRDJjAPqhpCb0t6U2j7/xqAuLEebW2kiw==",
+ "dev": true,
+ "dependencies": {
+ "undici-types": "~5.26.4"
+ }
+ },
+ "node_modules/@ungap/structured-clone": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz",
+ "integrity": "sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==",
+ "dev": true
+ },
+ "node_modules/@vitest/coverage-c8": {
+ "version": "0.27.3",
+ "resolved": "https://registry.npmjs.org/@vitest/coverage-c8/-/coverage-c8-0.27.3.tgz",
+ "integrity": "sha512-xIN4FXXwJqeP6z0gfQ06gbyBMRN2mYvZ4/mn4F96mKXzch0Y93fBeS81eo7D/2YtjbeJBUcU9/amPVb2T+h83Q==",
+ "deprecated": "v8 coverage is moved to @vitest/coverage-v8 package",
+ "dev": true,
+ "dependencies": {
+ "c8": "^7.12.0",
+ "vitest": "0.27.3"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/antfu"
+ }
+ },
+ "node_modules/acorn": {
+ "version": "8.11.3",
+ "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.11.3.tgz",
+ "integrity": "sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==",
+ "dev": true,
+ "bin": {
+ "acorn": "bin/acorn"
+ },
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/acorn-jsx": {
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz",
+ "integrity": "sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==",
+ "dev": true,
+ "peerDependencies": {
+ "acorn": "^6.0.0 || ^7.0.0 || ^8.0.0"
+ }
+ },
+ "node_modules/acorn-walk": {
+ "version": "8.3.1",
+ "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.1.tgz",
+ "integrity": "sha512-TgUZgYvqZprrl7YldZNoa9OciCAyZR+Ejm9eXzKCmjsF5IKp/wgQ7Z/ZpjpGTIUPwrHQIcYeI8qDh4PsEwxMbw==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.4.0"
+ }
+ },
+ "node_modules/ajv": {
+ "version": "6.12.6",
+ "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz",
+ "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==",
+ "dev": true,
+ "dependencies": {
+ "fast-deep-equal": "^3.1.1",
+ "fast-json-stable-stringify": "^2.0.0",
+ "json-schema-traverse": "^0.4.1",
+ "uri-js": "^4.2.2"
+ },
+ "funding": {
+ "type": "github",
+ "url": "https://github.com/sponsors/epoberezkin"
+ }
+ },
+ "node_modules/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,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "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.3",
+ "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.3.tgz",
+ "integrity": "sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==",
+ "dev": true,
+ "optional": true,
+ "dependencies": {
+ "normalize-path": "^3.0.0",
+ "picomatch": "^2.0.4"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/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
+ },
+ "node_modules/array-buffer-byte-length": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz",
+ "integrity": "sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "is-array-buffer": "^3.0.1"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/array-includes": {
+ "version": "3.1.7",
+ "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.7.tgz",
+ "integrity": "sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "define-properties": "^1.2.0",
+ "es-abstract": "^1.22.1",
+ "get-intrinsic": "^1.2.1",
+ "is-string": "^1.0.7"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/array.prototype.findlastindex": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.3.tgz",
+ "integrity": "sha512-LzLoiOMAxvy+Gd3BAq3B7VeIgPdo+Q8hthvKtXybMvRV0jrXfJM/t8mw7nNlpEcVlVUnCnM2KSX4XU5HmpodOA==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "define-properties": "^1.2.0",
+ "es-abstract": "^1.22.1",
+ "es-shim-unscopables": "^1.0.0",
+ "get-intrinsic": "^1.2.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/array.prototype.flat": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz",
+ "integrity": "sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "define-properties": "^1.2.0",
+ "es-abstract": "^1.22.1",
+ "es-shim-unscopables": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/array.prototype.flatmap": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz",
+ "integrity": "sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "define-properties": "^1.2.0",
+ "es-abstract": "^1.22.1",
+ "es-shim-unscopables": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/arraybuffer.prototype.slice": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz",
+ "integrity": "sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==",
+ "dev": true,
+ "dependencies": {
+ "array-buffer-byte-length": "^1.0.0",
+ "call-bind": "^1.0.2",
+ "define-properties": "^1.2.0",
+ "es-abstract": "^1.22.1",
+ "get-intrinsic": "^1.2.1",
+ "is-array-buffer": "^3.0.2",
+ "is-shared-array-buffer": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/assertion-error": {
+ "version": "1.1.0",
+ "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz",
+ "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==",
+ "dev": true,
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/available-typed-arrays": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz",
+ "integrity": "sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/babel-plugin-add-module-exports": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/babel-plugin-add-module-exports/-/babel-plugin-add-module-exports-1.0.4.tgz",
+ "integrity": "sha512-g+8yxHUZ60RcyaUpfNzy56OtWW+x9cyEe9j+CranqLiqbju2yf/Cy6ZtYK40EZxtrdHllzlVZgLmcOUCTlJ7Jg==",
+ "dev": true
+ },
+ "node_modules/babel-plugin-polyfill-corejs2": {
+ "version": "0.4.7",
+ "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs2/-/babel-plugin-polyfill-corejs2-0.4.7.tgz",
+ "integrity": "sha512-LidDk/tEGDfuHW2DWh/Hgo4rmnw3cduK6ZkOI1NPFceSK3n/yAGeOsNT7FLnSGHkXj3RHGSEVkN3FsCTY6w2CQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/compat-data": "^7.22.6",
+ "@babel/helper-define-polyfill-provider": "^0.4.4",
+ "semver": "^6.3.1"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0"
+ }
+ },
+ "node_modules/babel-plugin-polyfill-corejs3": {
+ "version": "0.8.7",
+ "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-corejs3/-/babel-plugin-polyfill-corejs3-0.8.7.tgz",
+ "integrity": "sha512-KyDvZYxAzkC0Aj2dAPyDzi2Ym15e5JKZSK+maI7NAwSqofvuFglbSsxE7wUOvTg9oFVnHMzVzBKcqEb4PJgtOA==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-define-polyfill-provider": "^0.4.4",
+ "core-js-compat": "^3.33.1"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.4.0 || ^8.0.0-0 <8.0.0"
+ }
+ },
+ "node_modules/babel-plugin-polyfill-regenerator": {
+ "version": "0.5.4",
+ "resolved": "https://registry.npmjs.org/babel-plugin-polyfill-regenerator/-/babel-plugin-polyfill-regenerator-0.5.4.tgz",
+ "integrity": "sha512-S/x2iOCvDaCASLYsOOgWOq4bCfKYVqvO/uxjkaYyZ3rVsVE3CeAI/c84NpyuBBymEgNvHgjEot3a9/Z/kXvqsg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/helper-define-polyfill-provider": "^0.4.4"
+ },
+ "peerDependencies": {
+ "@babel/core": "^7.4.0 || ^8.0.0-0 <8.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.22.2",
+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.2.tgz",
+ "integrity": "sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/browserslist"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/browserslist"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "dependencies": {
+ "caniuse-lite": "^1.0.30001565",
+ "electron-to-chromium": "^1.4.601",
+ "node-releases": "^2.0.14",
+ "update-browserslist-db": "^1.0.13"
+ },
+ "bin": {
+ "browserslist": "cli.js"
+ },
+ "engines": {
+ "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7"
+ }
+ },
+ "node_modules/buffer-from": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz",
+ "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==",
+ "dev": true
+ },
+ "node_modules/c8": {
+ "version": "7.14.0",
+ "resolved": "https://registry.npmjs.org/c8/-/c8-7.14.0.tgz",
+ "integrity": "sha512-i04rtkkcNcCf7zsQcSv/T9EbUn4RXQ6mropeMcjFOsQXQ0iGLAr/xT6TImQg4+U9hmNpN9XdvPkjUL1IzbgxJw==",
+ "dev": true,
+ "dependencies": {
+ "@bcoe/v8-coverage": "^0.2.3",
+ "@istanbuljs/schema": "^0.1.3",
+ "find-up": "^5.0.0",
+ "foreground-child": "^2.0.0",
+ "istanbul-lib-coverage": "^3.2.0",
+ "istanbul-lib-report": "^3.0.0",
+ "istanbul-reports": "^3.1.4",
+ "rimraf": "^3.0.2",
+ "test-exclude": "^6.0.0",
+ "v8-to-istanbul": "^9.0.0",
+ "yargs": "^16.2.0",
+ "yargs-parser": "^20.2.9"
+ },
+ "bin": {
+ "c8": "bin/c8.js"
+ },
+ "engines": {
+ "node": ">=10.12.0"
+ }
+ },
+ "node_modules/cac": {
+ "version": "6.7.14",
+ "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz",
+ "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/call-bind": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz",
+ "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==",
+ "dev": true,
+ "dependencies": {
+ "function-bind": "^1.1.2",
+ "get-intrinsic": "^1.2.1",
+ "set-function-length": "^1.1.1"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/callsites": {
+ "version": "3.1.0",
+ "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz",
+ "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/caniuse-lite": {
+ "version": "1.0.30001574",
+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001574.tgz",
+ "integrity": "sha512-BtYEK4r/iHt/txm81KBudCUcTy7t+s9emrIaHqjYurQ10x71zJ5VQ9x1dYPcz/b+pKSp4y/v1xSI67A+LzpNyg==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/browserslist"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/caniuse-lite"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ]
+ },
+ "node_modules/chai": {
+ "version": "4.4.0",
+ "resolved": "https://registry.npmjs.org/chai/-/chai-4.4.0.tgz",
+ "integrity": "sha512-x9cHNq1uvkCdU+5xTkNh5WtgD4e4yDFCsp9jVc7N7qVeKeftv3gO/ZrviX5d+3ZfxdYnZXZYujjRInu1RogU6A==",
+ "dev": true,
+ "dependencies": {
+ "assertion-error": "^1.1.0",
+ "check-error": "^1.0.3",
+ "deep-eql": "^4.1.3",
+ "get-func-name": "^2.0.2",
+ "loupe": "^2.3.6",
+ "pathval": "^1.1.1",
+ "type-detect": "^4.0.8"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "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/check-error": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.3.tgz",
+ "integrity": "sha512-iKEoDYaRmd1mxM90a2OEfWhjsjPpYPuQ+lMYsoxB126+t8fw7ySEO48nmDg5COTjxDI65/Y2OWpeEHk3ZOe8zg==",
+ "dev": true,
+ "dependencies": {
+ "get-func-name": "^2.0.2"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/chokidar": {
+ "version": "3.5.3",
+ "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz",
+ "integrity": "sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "individual",
+ "url": "https://paulmillr.com/funding/"
+ }
+ ],
+ "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/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,
+ "dependencies": {
+ "string-width": "^4.2.0",
+ "strip-ansi": "^6.0.0",
+ "wrap-ansi": "^7.0.0"
+ }
+ },
+ "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": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==",
+ "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": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==",
+ "dev": true
+ },
+ "node_modules/confusing-browser-globals": {
+ "version": "1.0.11",
+ "resolved": "https://registry.npmjs.org/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz",
+ "integrity": "sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA==",
+ "dev": true
+ },
+ "node_modules/convert-source-map": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz",
+ "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==",
+ "dev": true
+ },
+ "node_modules/core-js-compat": {
+ "version": "3.35.0",
+ "resolved": "https://registry.npmjs.org/core-js-compat/-/core-js-compat-3.35.0.tgz",
+ "integrity": "sha512-5blwFAddknKeNgsjBzilkdQ0+YK8L1PfqPYq40NOYMYFSS38qj+hpTcLLWwpIwA2A5bje/x5jmVn2tzUMg9IVw==",
+ "dev": true,
+ "dependencies": {
+ "browserslist": "^4.22.2"
+ },
+ "funding": {
+ "type": "opencollective",
+ "url": "https://opencollective.com/core-js"
+ }
+ },
+ "node_modules/cross-spawn": {
+ "version": "7.0.3",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.3.tgz",
+ "integrity": "sha512-iRDPJKUPVEND7dHPO8rkbOnPpyDygcDFtWjpeWNCgy8WP2rXcxXL8TskReQl6OrB2G7+UJrags1q15Fudc7G6w==",
+ "dev": true,
+ "dependencies": {
+ "path-key": "^3.1.0",
+ "shebang-command": "^2.0.0",
+ "which": "^2.0.1"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/debug": {
+ "version": "4.3.4",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz",
+ "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==",
+ "dev": true,
+ "dependencies": {
+ "ms": "2.1.2"
+ },
+ "engines": {
+ "node": ">=6.0"
+ },
+ "peerDependenciesMeta": {
+ "supports-color": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/deep-eql": {
+ "version": "4.1.3",
+ "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-4.1.3.tgz",
+ "integrity": "sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==",
+ "dev": true,
+ "dependencies": {
+ "type-detect": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/deep-is": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz",
+ "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==",
+ "dev": true
+ },
+ "node_modules/define-data-property": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz",
+ "integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==",
+ "dev": true,
+ "dependencies": {
+ "get-intrinsic": "^1.2.1",
+ "gopd": "^1.0.1",
+ "has-property-descriptors": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/define-properties": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.2.1.tgz",
+ "integrity": "sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==",
+ "dev": true,
+ "dependencies": {
+ "define-data-property": "^1.0.1",
+ "has-property-descriptors": "^1.0.0",
+ "object-keys": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/doctrine": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz",
+ "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==",
+ "dev": true,
+ "dependencies": {
+ "esutils": "^2.0.2"
+ },
+ "engines": {
+ "node": ">=6.0.0"
+ }
+ },
+ "node_modules/electron-to-chromium": {
+ "version": "1.4.622",
+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.622.tgz",
+ "integrity": "sha512-GZ47DEy0Gm2Z8RVG092CkFvX7SdotG57c4YZOe8W8qD4rOmk3plgeNmiLVRHP/Liqj1wRiY3uUUod9vb9hnxZA==",
+ "dev": true
+ },
+ "node_modules/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
+ },
+ "node_modules/error-ex": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz",
+ "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==",
+ "dev": true,
+ "dependencies": {
+ "is-arrayish": "^0.2.1"
+ }
+ },
+ "node_modules/es-abstract": {
+ "version": "1.22.3",
+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.3.tgz",
+ "integrity": "sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==",
+ "dev": true,
+ "dependencies": {
+ "array-buffer-byte-length": "^1.0.0",
+ "arraybuffer.prototype.slice": "^1.0.2",
+ "available-typed-arrays": "^1.0.5",
+ "call-bind": "^1.0.5",
+ "es-set-tostringtag": "^2.0.1",
+ "es-to-primitive": "^1.2.1",
+ "function.prototype.name": "^1.1.6",
+ "get-intrinsic": "^1.2.2",
+ "get-symbol-description": "^1.0.0",
+ "globalthis": "^1.0.3",
+ "gopd": "^1.0.1",
+ "has-property-descriptors": "^1.0.0",
+ "has-proto": "^1.0.1",
+ "has-symbols": "^1.0.3",
+ "hasown": "^2.0.0",
+ "internal-slot": "^1.0.5",
+ "is-array-buffer": "^3.0.2",
+ "is-callable": "^1.2.7",
+ "is-negative-zero": "^2.0.2",
+ "is-regex": "^1.1.4",
+ "is-shared-array-buffer": "^1.0.2",
+ "is-string": "^1.0.7",
+ "is-typed-array": "^1.1.12",
+ "is-weakref": "^1.0.2",
+ "object-inspect": "^1.13.1",
+ "object-keys": "^1.1.1",
+ "object.assign": "^4.1.4",
+ "regexp.prototype.flags": "^1.5.1",
+ "safe-array-concat": "^1.0.1",
+ "safe-regex-test": "^1.0.0",
+ "string.prototype.trim": "^1.2.8",
+ "string.prototype.trimend": "^1.0.7",
+ "string.prototype.trimstart": "^1.0.7",
+ "typed-array-buffer": "^1.0.0",
+ "typed-array-byte-length": "^1.0.0",
+ "typed-array-byte-offset": "^1.0.0",
+ "typed-array-length": "^1.0.4",
+ "unbox-primitive": "^1.0.2",
+ "which-typed-array": "^1.1.13"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/es-set-tostringtag": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz",
+ "integrity": "sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==",
+ "dev": true,
+ "dependencies": {
+ "get-intrinsic": "^1.2.2",
+ "has-tostringtag": "^1.0.0",
+ "hasown": "^2.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/es-shim-unscopables": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz",
+ "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==",
+ "dev": true,
+ "dependencies": {
+ "hasown": "^2.0.0"
+ }
+ },
+ "node_modules/es-to-primitive": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz",
+ "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==",
+ "dev": true,
+ "dependencies": {
+ "is-callable": "^1.1.4",
+ "is-date-object": "^1.0.1",
+ "is-symbol": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/esbuild": {
+ "version": "0.18.20",
+ "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz",
+ "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==",
+ "dev": true,
+ "hasInstallScript": true,
+ "bin": {
+ "esbuild": "bin/esbuild"
+ },
+ "engines": {
+ "node": ">=12"
+ },
+ "optionalDependencies": {
+ "@esbuild/android-arm": "0.18.20",
+ "@esbuild/android-arm64": "0.18.20",
+ "@esbuild/android-x64": "0.18.20",
+ "@esbuild/darwin-arm64": "0.18.20",
+ "@esbuild/darwin-x64": "0.18.20",
+ "@esbuild/freebsd-arm64": "0.18.20",
+ "@esbuild/freebsd-x64": "0.18.20",
+ "@esbuild/linux-arm": "0.18.20",
+ "@esbuild/linux-arm64": "0.18.20",
+ "@esbuild/linux-ia32": "0.18.20",
+ "@esbuild/linux-loong64": "0.18.20",
+ "@esbuild/linux-mips64el": "0.18.20",
+ "@esbuild/linux-ppc64": "0.18.20",
+ "@esbuild/linux-riscv64": "0.18.20",
+ "@esbuild/linux-s390x": "0.18.20",
+ "@esbuild/linux-x64": "0.18.20",
+ "@esbuild/netbsd-x64": "0.18.20",
+ "@esbuild/openbsd-x64": "0.18.20",
+ "@esbuild/sunos-x64": "0.18.20",
+ "@esbuild/win32-arm64": "0.18.20",
+ "@esbuild/win32-ia32": "0.18.20",
+ "@esbuild/win32-x64": "0.18.20"
+ }
+ },
+ "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": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.8.0"
+ }
+ },
+ "node_modules/eslint": {
+ "version": "8.56.0",
+ "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.56.0.tgz",
+ "integrity": "sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==",
+ "dev": true,
+ "dependencies": {
+ "@eslint-community/eslint-utils": "^4.2.0",
+ "@eslint-community/regexpp": "^4.6.1",
+ "@eslint/eslintrc": "^2.1.4",
+ "@eslint/js": "8.56.0",
+ "@humanwhocodes/config-array": "^0.11.13",
+ "@humanwhocodes/module-importer": "^1.0.1",
+ "@nodelib/fs.walk": "^1.2.8",
+ "@ungap/structured-clone": "^1.2.0",
+ "ajv": "^6.12.4",
+ "chalk": "^4.0.0",
+ "cross-spawn": "^7.0.2",
+ "debug": "^4.3.2",
+ "doctrine": "^3.0.0",
+ "escape-string-regexp": "^4.0.0",
+ "eslint-scope": "^7.2.2",
+ "eslint-visitor-keys": "^3.4.3",
+ "espree": "^9.6.1",
+ "esquery": "^1.4.2",
+ "esutils": "^2.0.2",
+ "fast-deep-equal": "^3.1.3",
+ "file-entry-cache": "^6.0.1",
+ "find-up": "^5.0.0",
+ "glob-parent": "^6.0.2",
+ "globals": "^13.19.0",
+ "graphemer": "^1.4.0",
+ "ignore": "^5.2.0",
+ "imurmurhash": "^0.1.4",
+ "is-glob": "^4.0.0",
+ "is-path-inside": "^3.0.3",
+ "js-yaml": "^4.1.0",
+ "json-stable-stringify-without-jsonify": "^1.0.1",
+ "levn": "^0.4.1",
+ "lodash.merge": "^4.6.2",
+ "minimatch": "^3.1.2",
+ "natural-compare": "^1.4.0",
+ "optionator": "^0.9.3",
+ "strip-ansi": "^6.0.1",
+ "text-table": "^0.2.0"
+ },
+ "bin": {
+ "eslint": "bin/eslint.js"
+ },
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/eslint-config-airbnb-base": {
+ "version": "15.0.0",
+ "resolved": "https://registry.npmjs.org/eslint-config-airbnb-base/-/eslint-config-airbnb-base-15.0.0.tgz",
+ "integrity": "sha512-xaX3z4ZZIcFLvh2oUNvcX5oEofXda7giYmuplVxoOg5A7EXJMrUyqRgR+mhDhPK8LZ4PttFOBvCYDbX3sUoUig==",
+ "dev": true,
+ "dependencies": {
+ "confusing-browser-globals": "^1.0.10",
+ "object.assign": "^4.1.2",
+ "object.entries": "^1.1.5",
+ "semver": "^6.3.0"
+ },
+ "engines": {
+ "node": "^10.12.0 || >=12.0.0"
+ },
+ "peerDependencies": {
+ "eslint": "^7.32.0 || ^8.2.0",
+ "eslint-plugin-import": "^2.25.2"
+ }
+ },
+ "node_modules/eslint-config-prettier": {
+ "version": "9.1.0",
+ "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-9.1.0.tgz",
+ "integrity": "sha512-NSWl5BFQWEPi1j4TjVNItzYV7dZXZ+wP6I6ZhrBGpChQhZRUaElihE9uRRkcbRnNb76UMKDF3r+WTmNcGPKsqw==",
+ "dev": true,
+ "bin": {
+ "eslint-config-prettier": "bin/cli.js"
+ },
+ "peerDependencies": {
+ "eslint": ">=7.0.0"
+ }
+ },
+ "node_modules/eslint-import-resolver-node": {
+ "version": "0.3.9",
+ "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz",
+ "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==",
+ "dev": true,
+ "dependencies": {
+ "debug": "^3.2.7",
+ "is-core-module": "^2.13.0",
+ "resolve": "^1.22.4"
+ }
+ },
+ "node_modules/eslint-import-resolver-node/node_modules/debug": {
+ "version": "3.2.7",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
+ "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
+ "dev": true,
+ "dependencies": {
+ "ms": "^2.1.1"
+ }
+ },
+ "node_modules/eslint-module-utils": {
+ "version": "2.8.0",
+ "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz",
+ "integrity": "sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw==",
+ "dev": true,
+ "dependencies": {
+ "debug": "^3.2.7"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "peerDependenciesMeta": {
+ "eslint": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/eslint-module-utils/node_modules/debug": {
+ "version": "3.2.7",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
+ "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
+ "dev": true,
+ "dependencies": {
+ "ms": "^2.1.1"
+ }
+ },
+ "node_modules/eslint-plugin-es": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz",
+ "integrity": "sha512-GUmAsJaN4Fc7Gbtl8uOBlayo2DqhwWvEzykMHSCZHU3XdJ+NSzzZcVhXh3VxX5icqQ+oQdIEawXX8xkR3mIFmQ==",
+ "dev": true,
+ "dependencies": {
+ "eslint-utils": "^2.0.0",
+ "regexpp": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8.10.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/mysticatea"
+ },
+ "peerDependencies": {
+ "eslint": ">=4.19.1"
+ }
+ },
+ "node_modules/eslint-plugin-import": {
+ "version": "2.29.1",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz",
+ "integrity": "sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==",
+ "dev": true,
+ "dependencies": {
+ "array-includes": "^3.1.7",
+ "array.prototype.findlastindex": "^1.2.3",
+ "array.prototype.flat": "^1.3.2",
+ "array.prototype.flatmap": "^1.3.2",
+ "debug": "^3.2.7",
+ "doctrine": "^2.1.0",
+ "eslint-import-resolver-node": "^0.3.9",
+ "eslint-module-utils": "^2.8.0",
+ "hasown": "^2.0.0",
+ "is-core-module": "^2.13.1",
+ "is-glob": "^4.0.3",
+ "minimatch": "^3.1.2",
+ "object.fromentries": "^2.0.7",
+ "object.groupby": "^1.0.1",
+ "object.values": "^1.1.7",
+ "semver": "^6.3.1",
+ "tsconfig-paths": "^3.15.0"
+ },
+ "engines": {
+ "node": ">=4"
+ },
+ "peerDependencies": {
+ "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8"
+ }
+ },
+ "node_modules/eslint-plugin-import/node_modules/debug": {
+ "version": "3.2.7",
+ "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",
+ "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",
+ "dev": true,
+ "dependencies": {
+ "ms": "^2.1.1"
+ }
+ },
+ "node_modules/eslint-plugin-import/node_modules/doctrine": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz",
+ "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==",
+ "dev": true,
+ "dependencies": {
+ "esutils": "^2.0.2"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/eslint-plugin-node": {
+ "version": "11.1.0",
+ "resolved": "https://registry.npmjs.org/eslint-plugin-node/-/eslint-plugin-node-11.1.0.tgz",
+ "integrity": "sha512-oUwtPJ1W0SKD0Tr+wqu92c5xuCeQqB3hSCHasn/ZgjFdA9iDGNkNf2Zi9ztY7X+hNuMib23LNGRm6+uN+KLE3g==",
+ "dev": true,
+ "dependencies": {
+ "eslint-plugin-es": "^3.0.0",
+ "eslint-utils": "^2.0.0",
+ "ignore": "^5.1.1",
+ "minimatch": "^3.0.4",
+ "resolve": "^1.10.1",
+ "semver": "^6.1.0"
+ },
+ "engines": {
+ "node": ">=8.10.0"
+ },
+ "peerDependencies": {
+ "eslint": ">=5.16.0"
+ }
+ },
+ "node_modules/eslint-scope": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz",
+ "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==",
+ "dev": true,
+ "dependencies": {
+ "esrecurse": "^4.3.0",
+ "estraverse": "^4.1.1"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "node_modules/eslint-utils": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz",
+ "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==",
+ "dev": true,
+ "dependencies": {
+ "eslint-visitor-keys": "^1.1.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/mysticatea"
+ }
+ },
+ "node_modules/eslint-utils/node_modules/eslint-visitor-keys": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz",
+ "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/eslint-visitor-keys": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz",
+ "integrity": "sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/eslint/node_modules/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,
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/eslint/node_modules/chalk": {
+ "version": "4.1.2",
+ "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz",
+ "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==",
+ "dev": true,
+ "dependencies": {
+ "ansi-styles": "^4.1.0",
+ "supports-color": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/chalk?sponsor=1"
+ }
+ },
+ "node_modules/eslint/node_modules/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,
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "node_modules/eslint/node_modules/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
+ },
+ "node_modules/eslint/node_modules/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,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/eslint/node_modules/eslint-scope": {
+ "version": "7.2.2",
+ "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-7.2.2.tgz",
+ "integrity": "sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg==",
+ "dev": true,
+ "dependencies": {
+ "esrecurse": "^4.3.0",
+ "estraverse": "^5.2.0"
+ },
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/eslint/node_modules/eslint-visitor-keys": {
+ "version": "3.4.3",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz",
+ "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==",
+ "dev": true,
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/eslint/node_modules/estraverse": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
+ "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
+ "dev": true,
+ "engines": {
+ "node": ">=4.0"
+ }
+ },
+ "node_modules/eslint/node_modules/glob-parent": {
+ "version": "6.0.2",
+ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-6.0.2.tgz",
+ "integrity": "sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==",
+ "dev": true,
+ "dependencies": {
+ "is-glob": "^4.0.3"
+ },
+ "engines": {
+ "node": ">=10.13.0"
+ }
+ },
+ "node_modules/eslint/node_modules/globals": {
+ "version": "13.24.0",
+ "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz",
+ "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==",
+ "dev": true,
+ "dependencies": {
+ "type-fest": "^0.20.2"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/eslint/node_modules/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,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/eslint/node_modules/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,
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/espree": {
+ "version": "9.6.1",
+ "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz",
+ "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==",
+ "dev": true,
+ "dependencies": {
+ "acorn": "^8.9.0",
+ "acorn-jsx": "^5.3.2",
+ "eslint-visitor-keys": "^3.4.1"
+ },
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/espree/node_modules/eslint-visitor-keys": {
+ "version": "3.4.3",
+ "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz",
+ "integrity": "sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==",
+ "dev": true,
+ "engines": {
+ "node": "^12.22.0 || ^14.17.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://opencollective.com/eslint"
+ }
+ },
+ "node_modules/esquery": {
+ "version": "1.5.0",
+ "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.5.0.tgz",
+ "integrity": "sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==",
+ "dev": true,
+ "dependencies": {
+ "estraverse": "^5.1.0"
+ },
+ "engines": {
+ "node": ">=0.10"
+ }
+ },
+ "node_modules/esquery/node_modules/estraverse": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
+ "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
+ "dev": true,
+ "engines": {
+ "node": ">=4.0"
+ }
+ },
+ "node_modules/esrecurse": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz",
+ "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==",
+ "dev": true,
+ "dependencies": {
+ "estraverse": "^5.2.0"
+ },
+ "engines": {
+ "node": ">=4.0"
+ }
+ },
+ "node_modules/esrecurse/node_modules/estraverse": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz",
+ "integrity": "sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==",
+ "dev": true,
+ "engines": {
+ "node": ">=4.0"
+ }
+ },
+ "node_modules/estraverse": {
+ "version": "4.3.0",
+ "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz",
+ "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==",
+ "dev": true,
+ "engines": {
+ "node": ">=4.0"
+ }
+ },
+ "node_modules/estree-walker": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-2.0.2.tgz",
+ "integrity": "sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==",
+ "dev": true
+ },
+ "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/fast-deep-equal": {
+ "version": "3.1.3",
+ "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz",
+ "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",
+ "dev": true
+ },
+ "node_modules/fast-json-stable-stringify": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz",
+ "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==",
+ "dev": true
+ },
+ "node_modules/fast-levenshtein": {
+ "version": "2.0.6",
+ "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz",
+ "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==",
+ "dev": true
+ },
+ "node_modules/fastq": {
+ "version": "1.16.0",
+ "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.16.0.tgz",
+ "integrity": "sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==",
+ "dev": true,
+ "dependencies": {
+ "reusify": "^1.0.4"
+ }
+ },
+ "node_modules/file-entry-cache": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.1.tgz",
+ "integrity": "sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==",
+ "dev": true,
+ "dependencies": {
+ "flat-cache": "^3.0.4"
+ },
+ "engines": {
+ "node": "^10.12.0 || >=12.0.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/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,
+ "dependencies": {
+ "locate-path": "^6.0.0",
+ "path-exists": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/flat-cache": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz",
+ "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==",
+ "dev": true,
+ "dependencies": {
+ "flatted": "^3.2.9",
+ "keyv": "^4.5.3",
+ "rimraf": "^3.0.2"
+ },
+ "engines": {
+ "node": "^10.12.0 || >=12.0.0"
+ }
+ },
+ "node_modules/flatted": {
+ "version": "3.2.9",
+ "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz",
+ "integrity": "sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==",
+ "dev": true
+ },
+ "node_modules/for-each": {
+ "version": "0.3.3",
+ "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz",
+ "integrity": "sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==",
+ "dev": true,
+ "dependencies": {
+ "is-callable": "^1.1.3"
+ }
+ },
+ "node_modules/foreground-child": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz",
+ "integrity": "sha512-dCIq9FpEcyQyXKCkyzmlPTFNgrCzPudOe+mhvJU5zAtlBnGVy2yKxtfsxK2tQBThwq225jcvBjpw1Gr40uzZCA==",
+ "dev": true,
+ "dependencies": {
+ "cross-spawn": "^7.0.0",
+ "signal-exit": "^3.0.2"
+ },
+ "engines": {
+ "node": ">=8.0.0"
+ }
+ },
+ "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": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==",
+ "dev": true
+ },
+ "node_modules/fsevents": {
+ "version": "2.3.3",
+ "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz",
+ "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
+ "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.2",
+ "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz",
+ "integrity": "sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==",
+ "dev": true,
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/function.prototype.name": {
+ "version": "1.1.6",
+ "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.6.tgz",
+ "integrity": "sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "define-properties": "^1.2.0",
+ "es-abstract": "^1.22.1",
+ "functions-have-names": "^1.2.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/functions-have-names": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz",
+ "integrity": "sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ==",
+ "dev": true,
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "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-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,
+ "engines": {
+ "node": "6.* || 8.* || >= 10.*"
+ }
+ },
+ "node_modules/get-func-name": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.2.tgz",
+ "integrity": "sha512-8vXOvuE167CtIc3OyItco7N/dpRtBbYOsPsXCz7X/PMnlGjYjSGuZJgM1Y7mmew7BKf9BqvLX2tnOVy1BBUsxQ==",
+ "dev": true,
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/get-intrinsic": {
+ "version": "1.2.2",
+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz",
+ "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==",
+ "dev": true,
+ "dependencies": {
+ "function-bind": "^1.1.2",
+ "has-proto": "^1.0.1",
+ "has-symbols": "^1.0.3",
+ "hasown": "^2.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/get-symbol-description": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.0.tgz",
+ "integrity": "sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "get-intrinsic": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/glob": {
+ "version": "7.2.3",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz",
+ "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==",
+ "dev": true,
+ "dependencies": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.1.1",
+ "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/globalthis": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.3.tgz",
+ "integrity": "sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA==",
+ "dev": true,
+ "dependencies": {
+ "define-properties": "^1.1.3"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/gopd": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz",
+ "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==",
+ "dev": true,
+ "dependencies": {
+ "get-intrinsic": "^1.1.3"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/graceful-fs": {
+ "version": "4.2.11",
+ "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz",
+ "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==",
+ "dev": true
+ },
+ "node_modules/graphemer": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/graphemer/-/graphemer-1.4.0.tgz",
+ "integrity": "sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==",
+ "dev": true
+ },
+ "node_modules/has-bigints": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz",
+ "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==",
+ "dev": true,
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-flag": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz",
+ "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/has-property-descriptors": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz",
+ "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==",
+ "dev": true,
+ "dependencies": {
+ "get-intrinsic": "^1.2.2"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-proto": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.1.tgz",
+ "integrity": "sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-symbols": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz",
+ "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/has-tostringtag": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/has-tostringtag/-/has-tostringtag-1.0.0.tgz",
+ "integrity": "sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ==",
+ "dev": true,
+ "dependencies": {
+ "has-symbols": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/hasown": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.0.tgz",
+ "integrity": "sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==",
+ "dev": true,
+ "dependencies": {
+ "function-bind": "^1.1.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/hosted-git-info": {
+ "version": "2.8.9",
+ "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz",
+ "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==",
+ "dev": true
+ },
+ "node_modules/html-escaper": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/html-escaper/-/html-escaper-2.0.2.tgz",
+ "integrity": "sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==",
+ "dev": true
+ },
+ "node_modules/ignore": {
+ "version": "5.3.0",
+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz",
+ "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==",
+ "dev": true,
+ "engines": {
+ "node": ">= 4"
+ }
+ },
+ "node_modules/import-fresh": {
+ "version": "3.3.0",
+ "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz",
+ "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==",
+ "dev": true,
+ "dependencies": {
+ "parent-module": "^1.0.0",
+ "resolve-from": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/imurmurhash": {
+ "version": "0.1.4",
+ "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz",
+ "integrity": "sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.8.19"
+ }
+ },
+ "node_modules/inflight": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+ "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==",
+ "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/internal-slot": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.6.tgz",
+ "integrity": "sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==",
+ "dev": true,
+ "dependencies": {
+ "get-intrinsic": "^1.2.2",
+ "hasown": "^2.0.0",
+ "side-channel": "^1.0.4"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/is-array-buffer": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/is-array-buffer/-/is-array-buffer-3.0.2.tgz",
+ "integrity": "sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "get-intrinsic": "^1.2.0",
+ "is-typed-array": "^1.1.10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-arrayish": {
+ "version": "0.2.1",
+ "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz",
+ "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==",
+ "dev": true
+ },
+ "node_modules/is-bigint": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz",
+ "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==",
+ "dev": true,
+ "dependencies": {
+ "has-bigints": "^1.0.1"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "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-boolean-object": {
+ "version": "1.1.2",
+ "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz",
+ "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "has-tostringtag": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-callable": {
+ "version": "1.2.7",
+ "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.7.tgz",
+ "integrity": "sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-core-module": {
+ "version": "2.13.1",
+ "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.13.1.tgz",
+ "integrity": "sha512-hHrIjvZsftOsvKSn2TRYl63zvxsgE0K+0mYMoH6gD4omR5IWB2KynivBQczo3+wF1cCkjzvptnI9Q0sPU66ilw==",
+ "dev": true,
+ "dependencies": {
+ "hasown": "^2.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-date-object": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz",
+ "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==",
+ "dev": true,
+ "dependencies": {
+ "has-tostringtag": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "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": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/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,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/is-glob": {
+ "version": "4.0.3",
+ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz",
+ "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==",
+ "dev": true,
+ "dependencies": {
+ "is-extglob": "^2.1.1"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/is-negative-zero": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.2.tgz",
+ "integrity": "sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "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/is-number-object": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz",
+ "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==",
+ "dev": true,
+ "dependencies": {
+ "has-tostringtag": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-path-inside": {
+ "version": "3.0.3",
+ "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.3.tgz",
+ "integrity": "sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/is-regex": {
+ "version": "1.1.4",
+ "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz",
+ "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "has-tostringtag": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-shared-array-buffer": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz",
+ "integrity": "sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.2"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-string": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz",
+ "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==",
+ "dev": true,
+ "dependencies": {
+ "has-tostringtag": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-symbol": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz",
+ "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==",
+ "dev": true,
+ "dependencies": {
+ "has-symbols": "^1.0.2"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-typed-array": {
+ "version": "1.1.12",
+ "resolved": "https://registry.npmjs.org/is-typed-array/-/is-typed-array-1.1.12.tgz",
+ "integrity": "sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg==",
+ "dev": true,
+ "dependencies": {
+ "which-typed-array": "^1.1.11"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/is-weakref": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.0.2.tgz",
+ "integrity": "sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.2"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/isarray": {
+ "version": "2.0.5",
+ "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz",
+ "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==",
+ "dev": true
+ },
+ "node_modules/isexe": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
+ "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
+ "dev": true
+ },
+ "node_modules/istanbul-lib-coverage": {
+ "version": "3.2.2",
+ "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz",
+ "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/istanbul-lib-report": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz",
+ "integrity": "sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==",
+ "dev": true,
+ "dependencies": {
+ "istanbul-lib-coverage": "^3.0.0",
+ "make-dir": "^4.0.0",
+ "supports-color": "^7.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/istanbul-lib-report/node_modules/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,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/istanbul-lib-report/node_modules/lru-cache": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz",
+ "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==",
+ "dev": true,
+ "dependencies": {
+ "yallist": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/istanbul-lib-report/node_modules/make-dir": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-4.0.0.tgz",
+ "integrity": "sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==",
+ "dev": true,
+ "dependencies": {
+ "semver": "^7.5.3"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/istanbul-lib-report/node_modules/semver": {
+ "version": "7.5.4",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
+ "integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
+ "dev": true,
+ "dependencies": {
+ "lru-cache": "^6.0.0"
+ },
+ "bin": {
+ "semver": "bin/semver.js"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/istanbul-lib-report/node_modules/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,
+ "dependencies": {
+ "has-flag": "^4.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/istanbul-lib-report/node_modules/yallist": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",
+ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",
+ "dev": true
+ },
+ "node_modules/istanbul-reports": {
+ "version": "3.1.6",
+ "resolved": "https://registry.npmjs.org/istanbul-reports/-/istanbul-reports-3.1.6.tgz",
+ "integrity": "sha512-TLgnMkKg3iTDsQ9PbPTdpfAK2DzjF9mqUG7RMgcQl8oFjad8ob4laGxv5XV5U9MAfx8D6tSJiUyuAwzLicaxlg==",
+ "dev": true,
+ "dependencies": {
+ "html-escaper": "^2.0.0",
+ "istanbul-lib-report": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "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/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,
+ "dependencies": {
+ "argparse": "^2.0.1"
+ },
+ "bin": {
+ "js-yaml": "bin/js-yaml.js"
+ }
+ },
+ "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/json-buffer": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/json-buffer/-/json-buffer-3.0.1.tgz",
+ "integrity": "sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==",
+ "dev": true
+ },
+ "node_modules/json-parse-better-errors": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/json-parse-better-errors/-/json-parse-better-errors-1.0.2.tgz",
+ "integrity": "sha512-mrqyZKfX5EhL7hvqcV6WG1yYjnjeuYDzDhhcAAUrq8Po85NBQBJP+ZDUT75qZQ98IkUoBqdkExkukOU7Ts2wrw==",
+ "dev": true
+ },
+ "node_modules/json-schema-traverse": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz",
+ "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==",
+ "dev": true
+ },
+ "node_modules/json-stable-stringify-without-jsonify": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz",
+ "integrity": "sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==",
+ "dev": true
+ },
+ "node_modules/json5": {
+ "version": "2.2.3",
+ "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
+ "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
+ "dev": true,
+ "bin": {
+ "json5": "lib/cli.js"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/jsonc-parser": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/jsonc-parser/-/jsonc-parser-3.2.0.tgz",
+ "integrity": "sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==",
+ "dev": true
+ },
+ "node_modules/keyv": {
+ "version": "4.5.4",
+ "resolved": "https://registry.npmjs.org/keyv/-/keyv-4.5.4.tgz",
+ "integrity": "sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==",
+ "dev": true,
+ "dependencies": {
+ "json-buffer": "3.0.1"
+ }
+ },
+ "node_modules/levn": {
+ "version": "0.4.1",
+ "resolved": "https://registry.npmjs.org/levn/-/levn-0.4.1.tgz",
+ "integrity": "sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==",
+ "dev": true,
+ "dependencies": {
+ "prelude-ls": "^1.2.1",
+ "type-check": "~0.4.0"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/load-json-file": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-4.0.0.tgz",
+ "integrity": "sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==",
+ "dev": true,
+ "dependencies": {
+ "graceful-fs": "^4.1.2",
+ "parse-json": "^4.0.0",
+ "pify": "^3.0.0",
+ "strip-bom": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/load-json-file/node_modules/pify": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
+ "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/local-pkg": {
+ "version": "0.4.3",
+ "resolved": "https://registry.npmjs.org/local-pkg/-/local-pkg-0.4.3.tgz",
+ "integrity": "sha512-SFppqq5p42fe2qcZQqqEOiVRXl+WCP1MdT6k7BDEW1j++sp5fIY+/fdRQitvKgB5BrBcmrs5m/L0v2FrU5MY1g==",
+ "dev": true,
+ "engines": {
+ "node": ">=14"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/antfu"
+ }
+ },
+ "node_modules/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,
+ "dependencies": {
+ "p-locate": "^5.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/lodash.debounce": {
+ "version": "4.0.8",
+ "resolved": "https://registry.npmjs.org/lodash.debounce/-/lodash.debounce-4.0.8.tgz",
+ "integrity": "sha512-FT1yDzDYEoYWhnSGnpE/4Kj1fLZkDFyqRb7fNt6FdYOSxlUWAtp42Eh6Wb0rGIv/m9Bgo7x4GhQbm5Ys4SG5ow==",
+ "dev": true
+ },
+ "node_modules/lodash.merge": {
+ "version": "4.6.2",
+ "resolved": "https://registry.npmjs.org/lodash.merge/-/lodash.merge-4.6.2.tgz",
+ "integrity": "sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==",
+ "dev": true
+ },
+ "node_modules/loupe": {
+ "version": "2.3.7",
+ "resolved": "https://registry.npmjs.org/loupe/-/loupe-2.3.7.tgz",
+ "integrity": "sha512-zSMINGVYkdpYSOBmLi0D1Uo7JU9nVdQKrHxC8eYlV+9YKK9WePqAlL7lSlorG/U2Fw1w0hTBmaa/jrQ3UbPHtA==",
+ "dev": true,
+ "dependencies": {
+ "get-func-name": "^2.0.1"
+ }
+ },
+ "node_modules/lru-cache": {
+ "version": "5.1.1",
+ "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz",
+ "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==",
+ "dev": true,
+ "dependencies": {
+ "yallist": "^3.0.2"
+ }
+ },
+ "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/make-dir/node_modules/semver": {
+ "version": "5.7.2",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
+ "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
+ "dev": true,
+ "bin": {
+ "semver": "bin/semver"
+ }
+ },
+ "node_modules/memorystream": {
+ "version": "0.3.1",
+ "resolved": "https://registry.npmjs.org/memorystream/-/memorystream-0.3.1.tgz",
+ "integrity": "sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.10.0"
+ }
+ },
+ "node_modules/minimatch": {
+ "version": "3.1.2",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",
+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",
+ "dev": true,
+ "dependencies": {
+ "brace-expansion": "^1.1.7"
+ },
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/minimist": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz",
+ "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==",
+ "dev": true,
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/mlly": {
+ "version": "1.4.2",
+ "resolved": "https://registry.npmjs.org/mlly/-/mlly-1.4.2.tgz",
+ "integrity": "sha512-i/Ykufi2t1EZ6NaPLdfnZk2AX8cs0d+mTzVKuPfqPKPatxLApaBoxJQ9x1/uckXtrS/U5oisPMDkNs0yQTaBRg==",
+ "dev": true,
+ "dependencies": {
+ "acorn": "^8.10.0",
+ "pathe": "^1.1.1",
+ "pkg-types": "^1.0.3",
+ "ufo": "^1.3.0"
+ }
+ },
+ "node_modules/mlly/node_modules/pathe": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.1.tgz",
+ "integrity": "sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q==",
+ "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/nanoid": {
+ "version": "3.3.7",
+ "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.7.tgz",
+ "integrity": "sha512-eSRppjcPIatRIMC1U6UngP8XFcz8MQWGQdt1MTBQ7NaAmvXDfvNxbvWV3x2y6CdEUciCSsDHDQZbhYaB8QEo2g==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "bin": {
+ "nanoid": "bin/nanoid.cjs"
+ },
+ "engines": {
+ "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1"
+ }
+ },
+ "node_modules/natural-compare": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz",
+ "integrity": "sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==",
+ "dev": true
+ },
+ "node_modules/nice-try": {
+ "version": "1.0.5",
+ "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz",
+ "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==",
+ "dev": true
+ },
+ "node_modules/node-releases": {
+ "version": "2.0.14",
+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz",
+ "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==",
+ "dev": true
+ },
+ "node_modules/normalize-package-data": {
+ "version": "2.5.0",
+ "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz",
+ "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==",
+ "dev": true,
+ "dependencies": {
+ "hosted-git-info": "^2.1.4",
+ "resolve": "^1.10.0",
+ "semver": "2 || 3 || 4 || 5",
+ "validate-npm-package-license": "^3.0.1"
+ }
+ },
+ "node_modules/normalize-package-data/node_modules/semver": {
+ "version": "5.7.2",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
+ "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
+ "dev": true,
+ "bin": {
+ "semver": "bin/semver"
+ }
+ },
+ "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/npm-run-all": {
+ "version": "4.1.5",
+ "resolved": "https://registry.npmjs.org/npm-run-all/-/npm-run-all-4.1.5.tgz",
+ "integrity": "sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==",
+ "dev": true,
+ "dependencies": {
+ "ansi-styles": "^3.2.1",
+ "chalk": "^2.4.1",
+ "cross-spawn": "^6.0.5",
+ "memorystream": "^0.3.1",
+ "minimatch": "^3.0.4",
+ "pidtree": "^0.3.0",
+ "read-pkg": "^3.0.0",
+ "shell-quote": "^1.6.1",
+ "string.prototype.padend": "^3.0.0"
+ },
+ "bin": {
+ "npm-run-all": "bin/npm-run-all/index.js",
+ "run-p": "bin/run-p/index.js",
+ "run-s": "bin/run-s/index.js"
+ },
+ "engines": {
+ "node": ">= 4"
+ }
+ },
+ "node_modules/npm-run-all/node_modules/cross-spawn": {
+ "version": "6.0.5",
+ "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz",
+ "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==",
+ "dev": true,
+ "dependencies": {
+ "nice-try": "^1.0.4",
+ "path-key": "^2.0.1",
+ "semver": "^5.5.0",
+ "shebang-command": "^1.2.0",
+ "which": "^1.2.9"
+ },
+ "engines": {
+ "node": ">=4.8"
+ }
+ },
+ "node_modules/npm-run-all/node_modules/path-key": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz",
+ "integrity": "sha512-fEHGKCSmUSDPv4uoj8AlD+joPlq3peND+HRYyxFz4KPw4z926S/b8rIuFs2FYJg3BwsxJf6A9/3eIdLaYC+9Dw==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/npm-run-all/node_modules/semver": {
+ "version": "5.7.2",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz",
+ "integrity": "sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==",
+ "dev": true,
+ "bin": {
+ "semver": "bin/semver"
+ }
+ },
+ "node_modules/npm-run-all/node_modules/shebang-command": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz",
+ "integrity": "sha512-EV3L1+UQWGor21OmnvojK36mhg+TyIKDh3iFBKBohr5xeXIhNBcx8oWdgkTEEQ+BEFFYdLRuqMfd5L84N1V5Vg==",
+ "dev": true,
+ "dependencies": {
+ "shebang-regex": "^1.0.0"
+ },
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/npm-run-all/node_modules/shebang-regex": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz",
+ "integrity": "sha512-wpoSFAxys6b2a2wHZ1XpDSgD7N9iVjg29Ph9uV/uaP9Ex/KXlkTZTeddxDPSYQpgvzKLGJke2UU0AzoGCjNIvQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/npm-run-all/node_modules/which": {
+ "version": "1.3.1",
+ "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz",
+ "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==",
+ "dev": true,
+ "dependencies": {
+ "isexe": "^2.0.0"
+ },
+ "bin": {
+ "which": "bin/which"
+ }
+ },
+ "node_modules/object-inspect": {
+ "version": "1.13.1",
+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz",
+ "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==",
+ "dev": true,
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "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.5",
+ "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz",
+ "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.5",
+ "define-properties": "^1.2.1",
+ "has-symbols": "^1.0.3",
+ "object-keys": "^1.1.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/object.entries": {
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.7.tgz",
+ "integrity": "sha512-jCBs/0plmPsOnrKAfFQXRG2NFjlhZgjjcBLSmTnEhU8U6vVTsVe8ANeQJCHTl3gSsI4J+0emOoCgoKlmQPMgmA==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "define-properties": "^1.2.0",
+ "es-abstract": "^1.22.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/object.fromentries": {
+ "version": "2.0.7",
+ "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.7.tgz",
+ "integrity": "sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "define-properties": "^1.2.0",
+ "es-abstract": "^1.22.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/object.groupby": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.1.tgz",
+ "integrity": "sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "define-properties": "^1.2.0",
+ "es-abstract": "^1.22.1",
+ "get-intrinsic": "^1.2.1"
+ }
+ },
+ "node_modules/object.values": {
+ "version": "1.1.7",
+ "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.7.tgz",
+ "integrity": "sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "define-properties": "^1.2.0",
+ "es-abstract": "^1.22.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": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==",
+ "dev": true,
+ "dependencies": {
+ "wrappy": "1"
+ }
+ },
+ "node_modules/optionator": {
+ "version": "0.9.3",
+ "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.3.tgz",
+ "integrity": "sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==",
+ "dev": true,
+ "dependencies": {
+ "@aashutoshrathi/word-wrap": "^1.2.3",
+ "deep-is": "^0.1.3",
+ "fast-levenshtein": "^2.0.6",
+ "levn": "^0.4.1",
+ "prelude-ls": "^1.2.1",
+ "type-check": "^0.4.0"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/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,
+ "dependencies": {
+ "yocto-queue": "^0.1.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/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,
+ "dependencies": {
+ "p-limit": "^3.0.2"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/parent-module": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz",
+ "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==",
+ "dev": true,
+ "dependencies": {
+ "callsites": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/parse-json": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-4.0.0.tgz",
+ "integrity": "sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==",
+ "dev": true,
+ "dependencies": {
+ "error-ex": "^1.3.1",
+ "json-parse-better-errors": "^1.0.1"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/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,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "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": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/path-key": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
+ "integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "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/path-type": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/path-type/-/path-type-3.0.0.tgz",
+ "integrity": "sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==",
+ "dev": true,
+ "dependencies": {
+ "pify": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/path-type/node_modules/pify": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/pify/-/pify-3.0.0.tgz",
+ "integrity": "sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/pathe": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/pathe/-/pathe-0.2.0.tgz",
+ "integrity": "sha512-sTitTPYnn23esFR3RlqYBWn4c45WGeLcsKzQiUpXJAyfcWkolvlYpV8FLo7JishK946oQwMFUCHXQ9AjGPKExw==",
+ "dev": true
+ },
+ "node_modules/pathval": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz",
+ "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==",
+ "dev": true,
+ "engines": {
+ "node": "*"
+ }
+ },
+ "node_modules/picocolors": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
+ "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==",
+ "dev": true
+ },
+ "node_modules/picomatch": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz",
+ "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==",
+ "dev": true,
+ "engines": {
+ "node": ">=8.6"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/jonschlinkert"
+ }
+ },
+ "node_modules/pidtree": {
+ "version": "0.3.1",
+ "resolved": "https://registry.npmjs.org/pidtree/-/pidtree-0.3.1.tgz",
+ "integrity": "sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==",
+ "dev": true,
+ "bin": {
+ "pidtree": "bin/pidtree.js"
+ },
+ "engines": {
+ "node": ">=0.10"
+ }
+ },
+ "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/pkg-types": {
+ "version": "1.0.3",
+ "resolved": "https://registry.npmjs.org/pkg-types/-/pkg-types-1.0.3.tgz",
+ "integrity": "sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==",
+ "dev": true,
+ "dependencies": {
+ "jsonc-parser": "^3.2.0",
+ "mlly": "^1.2.0",
+ "pathe": "^1.1.0"
+ }
+ },
+ "node_modules/pkg-types/node_modules/pathe": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/pathe/-/pathe-1.1.1.tgz",
+ "integrity": "sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q==",
+ "dev": true
+ },
+ "node_modules/postcss": {
+ "version": "8.4.33",
+ "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.33.tgz",
+ "integrity": "sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/postcss/"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/postcss"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "dependencies": {
+ "nanoid": "^3.3.7",
+ "picocolors": "^1.0.0",
+ "source-map-js": "^1.0.2"
+ },
+ "engines": {
+ "node": "^10 || ^12 || >=14"
+ }
+ },
+ "node_modules/prelude-ls": {
+ "version": "1.2.1",
+ "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.2.1.tgz",
+ "integrity": "sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/prettier": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/prettier/-/prettier-3.1.1.tgz",
+ "integrity": "sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==",
+ "dev": true,
+ "bin": {
+ "prettier": "bin/prettier.cjs"
+ },
+ "engines": {
+ "node": ">=14"
+ },
+ "funding": {
+ "url": "https://github.com/prettier/prettier?sponsor=1"
+ }
+ },
+ "node_modules/punycode": {
+ "version": "2.3.1",
+ "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.1.tgz",
+ "integrity": "sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==",
+ "dev": true,
+ "engines": {
+ "node": ">=6"
+ }
+ },
+ "node_modules/queue-microtask": {
+ "version": "1.2.3",
+ "resolved": "https://registry.npmjs.org/queue-microtask/-/queue-microtask-1.2.3.tgz",
+ "integrity": "sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ]
+ },
+ "node_modules/randombytes": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz",
+ "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==",
+ "dev": true,
+ "dependencies": {
+ "safe-buffer": "^5.1.0"
+ }
+ },
+ "node_modules/read-pkg": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-3.0.0.tgz",
+ "integrity": "sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==",
+ "dev": true,
+ "dependencies": {
+ "load-json-file": "^4.0.0",
+ "normalize-package-data": "^2.3.2",
+ "path-type": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "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": "10.1.1",
+ "resolved": "https://registry.npmjs.org/regenerate-unicode-properties/-/regenerate-unicode-properties-10.1.1.tgz",
+ "integrity": "sha512-X007RyZLsCJVVrjgEFVpLUTZwyOZk3oiL75ZcuYjlIWd6rNJtOjkBwQc5AsRrpbKVkxN6sklw/k/9m2jJYOf8Q==",
+ "dev": true,
+ "dependencies": {
+ "regenerate": "^1.4.2"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/regenerator-runtime": {
+ "version": "0.14.1",
+ "resolved": "https://registry.npmjs.org/regenerator-runtime/-/regenerator-runtime-0.14.1.tgz",
+ "integrity": "sha512-dYnhHh0nJoMfnkZs6GmmhFknAGRrLznOu5nc9ML+EJxGvrx6H7teuevqVqCuPcPK//3eDrrjQhehXVx9cnkGdw==",
+ "dev": true
+ },
+ "node_modules/regenerator-transform": {
+ "version": "0.15.2",
+ "resolved": "https://registry.npmjs.org/regenerator-transform/-/regenerator-transform-0.15.2.tgz",
+ "integrity": "sha512-hfMp2BoF0qOk3uc5V20ALGDS2ddjQaLrdl7xrGXvAIow7qeWRM2VA2HuCHkUKk9slq3VwEwLNK3DFBqDfPGYtg==",
+ "dev": true,
+ "dependencies": {
+ "@babel/runtime": "^7.8.4"
+ }
+ },
+ "node_modules/regexp.prototype.flags": {
+ "version": "1.5.1",
+ "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz",
+ "integrity": "sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "define-properties": "^1.2.0",
+ "set-function-name": "^2.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/regexpp": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.2.0.tgz",
+ "integrity": "sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/mysticatea"
+ }
+ },
+ "node_modules/regexpu-core": {
+ "version": "5.3.2",
+ "resolved": "https://registry.npmjs.org/regexpu-core/-/regexpu-core-5.3.2.tgz",
+ "integrity": "sha512-RAM5FlZz+Lhmo7db9L298p2vHP5ZywrVXmVXpmAD9GuL5MPH6t9ROw1iA/wfHkQ76Qe7AaPF0nGuim96/IrQMQ==",
+ "dev": true,
+ "dependencies": {
+ "@babel/regjsgen": "^0.8.0",
+ "regenerate": "^1.4.2",
+ "regenerate-unicode-properties": "^10.1.0",
+ "regjsparser": "^0.9.1",
+ "unicode-match-property-ecmascript": "^2.0.0",
+ "unicode-match-property-value-ecmascript": "^2.1.0"
+ },
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/regjsparser": {
+ "version": "0.9.1",
+ "resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.9.1.tgz",
+ "integrity": "sha512-dQUtn90WanSNl+7mQKcXAgZxvUe7Z0SqXlgzv0za4LwiUhyzBC58yQO3liFoUgu8GiJVInAhJjkj1N0EtQ5nkQ==",
+ "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": "sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA==",
+ "dev": true,
+ "bin": {
+ "jsesc": "bin/jsesc"
+ }
+ },
+ "node_modules/require-directory": {
+ "version": "2.1.1",
+ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz",
+ "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/resolve": {
+ "version": "1.22.8",
+ "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz",
+ "integrity": "sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==",
+ "dev": true,
+ "dependencies": {
+ "is-core-module": "^2.13.0",
+ "path-parse": "^1.0.7",
+ "supports-preserve-symlinks-flag": "^1.0.0"
+ },
+ "bin": {
+ "resolve": "bin/resolve"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/resolve-from": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz",
+ "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/reusify": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz",
+ "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==",
+ "dev": true,
+ "engines": {
+ "iojs": ">=1.0.0",
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/rimraf": {
+ "version": "3.0.2",
+ "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz",
+ "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==",
+ "dev": true,
+ "dependencies": {
+ "glob": "^7.1.3"
+ },
+ "bin": {
+ "rimraf": "bin.js"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/isaacs"
+ }
+ },
+ "node_modules/rollup": {
+ "version": "3.29.4",
+ "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.4.tgz",
+ "integrity": "sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==",
+ "dev": true,
+ "bin": {
+ "rollup": "dist/bin/rollup"
+ },
+ "engines": {
+ "node": ">=14.18.0",
+ "npm": ">=8.0.0"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.2"
+ }
+ },
+ "node_modules/run-parallel": {
+ "version": "1.2.0",
+ "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.2.0.tgz",
+ "integrity": "sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ],
+ "dependencies": {
+ "queue-microtask": "^1.2.2"
+ }
+ },
+ "node_modules/safe-array-concat": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.1.tgz",
+ "integrity": "sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "get-intrinsic": "^1.2.1",
+ "has-symbols": "^1.0.3",
+ "isarray": "^2.0.5"
+ },
+ "engines": {
+ "node": ">=0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/safe-buffer": {
+ "version": "5.2.1",
+ "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz",
+ "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/feross"
+ },
+ {
+ "type": "patreon",
+ "url": "https://www.patreon.com/feross"
+ },
+ {
+ "type": "consulting",
+ "url": "https://feross.org/support"
+ }
+ ]
+ },
+ "node_modules/safe-regex-test": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz",
+ "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "get-intrinsic": "^1.1.3",
+ "is-regex": "^1.1.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/semver": {
+ "version": "6.3.1",
+ "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",
+ "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",
+ "dev": true,
+ "bin": {
+ "semver": "bin/semver.js"
+ }
+ },
+ "node_modules/serialize-javascript": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.1.tgz",
+ "integrity": "sha512-owoXEFjWRllis8/M1Q+Cw5k8ZH40e3zhp/ovX+Xr/vi1qj6QesbyXXViFbpNvWvPNAD62SutwEXavefrLJWj7w==",
+ "dev": true,
+ "dependencies": {
+ "randombytes": "^2.1.0"
+ }
+ },
+ "node_modules/set-function-length": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.1.1.tgz",
+ "integrity": "sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==",
+ "dev": true,
+ "dependencies": {
+ "define-data-property": "^1.1.1",
+ "get-intrinsic": "^1.2.1",
+ "gopd": "^1.0.1",
+ "has-property-descriptors": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/set-function-name": {
+ "version": "2.0.1",
+ "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz",
+ "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==",
+ "dev": true,
+ "dependencies": {
+ "define-data-property": "^1.0.1",
+ "functions-have-names": "^1.2.3",
+ "has-property-descriptors": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/shebang-command": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
+ "integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
+ "dev": true,
+ "dependencies": {
+ "shebang-regex": "^3.0.0"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/shebang-regex": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
+ "integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
+ "dev": true,
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/shell-quote": {
+ "version": "1.8.1",
+ "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.8.1.tgz",
+ "integrity": "sha512-6j1W9l1iAs/4xYBI1SYOVZyFcCis9b4KCLQ8fgAGG07QvzaRLVVRQvAy85yNmmZSjYjg4MWh4gNvlPujU/5LpA==",
+ "dev": true,
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/side-channel": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz",
+ "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.0",
+ "get-intrinsic": "^1.0.2",
+ "object-inspect": "^1.9.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/siginfo": {
+ "version": "2.0.0",
+ "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz",
+ "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==",
+ "dev": true
+ },
+ "node_modules/signal-exit": {
+ "version": "3.0.7",
+ "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz",
+ "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==",
+ "dev": true
+ },
+ "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/smob": {
+ "version": "0.0.6",
+ "resolved": "https://registry.npmjs.org/smob/-/smob-0.0.6.tgz",
+ "integrity": "sha512-V21+XeNni+tTyiST1MHsa84AQhT1aFZipzPpOFAVB8DkHzwJyjjAmt9bgwnuZiZWnIbMo2duE29wybxv/7HWUw==",
+ "dev": true
+ },
+ "node_modules/source-map": {
+ "version": "0.6.1",
+ "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
+ "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/source-map-js": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
+ "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==",
+ "dev": true,
+ "engines": {
+ "node": ">=0.10.0"
+ }
+ },
+ "node_modules/source-map-support": {
+ "version": "0.5.21",
+ "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz",
+ "integrity": "sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==",
+ "dev": true,
+ "dependencies": {
+ "buffer-from": "^1.0.0",
+ "source-map": "^0.6.0"
+ }
+ },
+ "node_modules/spdx-correct": {
+ "version": "3.2.0",
+ "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.2.0.tgz",
+ "integrity": "sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==",
+ "dev": true,
+ "dependencies": {
+ "spdx-expression-parse": "^3.0.0",
+ "spdx-license-ids": "^3.0.0"
+ }
+ },
+ "node_modules/spdx-exceptions": {
+ "version": "2.3.0",
+ "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz",
+ "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==",
+ "dev": true
+ },
+ "node_modules/spdx-expression-parse": {
+ "version": "3.0.1",
+ "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz",
+ "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==",
+ "dev": true,
+ "dependencies": {
+ "spdx-exceptions": "^2.1.0",
+ "spdx-license-ids": "^3.0.0"
+ }
+ },
+ "node_modules/spdx-license-ids": {
+ "version": "3.0.16",
+ "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.16.tgz",
+ "integrity": "sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==",
+ "dev": true
+ },
+ "node_modules/stackback": {
+ "version": "0.0.2",
+ "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz",
+ "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==",
+ "dev": true
+ },
+ "node_modules/std-env": {
+ "version": "3.7.0",
+ "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.7.0.tgz",
+ "integrity": "sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==",
+ "dev": true
+ },
+ "node_modules/string-width": {
+ "version": "4.2.3",
+ "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz",
+ "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
+ "dev": true,
+ "dependencies": {
+ "emoji-regex": "^8.0.0",
+ "is-fullwidth-code-point": "^3.0.0",
+ "strip-ansi": "^6.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/string.prototype.padend": {
+ "version": "3.1.5",
+ "resolved": "https://registry.npmjs.org/string.prototype.padend/-/string.prototype.padend-3.1.5.tgz",
+ "integrity": "sha512-DOB27b/2UTTD+4myKUFh+/fXWcu/UDyASIXfg+7VzoCNNGOfWvoyU/x5pvVHr++ztyt/oSYI1BcWBBG/hmlNjA==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "define-properties": "^1.2.0",
+ "es-abstract": "^1.22.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/string.prototype.trim": {
+ "version": "1.2.8",
+ "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz",
+ "integrity": "sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "define-properties": "^1.2.0",
+ "es-abstract": "^1.22.1"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/string.prototype.trimend": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz",
+ "integrity": "sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "define-properties": "^1.2.0",
+ "es-abstract": "^1.22.1"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/string.prototype.trimstart": {
+ "version": "1.0.7",
+ "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz",
+ "integrity": "sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "define-properties": "^1.2.0",
+ "es-abstract": "^1.22.1"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/strip-ansi": {
+ "version": "6.0.1",
+ "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz",
+ "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
+ "dev": true,
+ "dependencies": {
+ "ansi-regex": "^5.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/strip-bom": {
+ "version": "3.0.0",
+ "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz",
+ "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/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,
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/strip-literal": {
+ "version": "1.3.0",
+ "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-1.3.0.tgz",
+ "integrity": "sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg==",
+ "dev": true,
+ "dependencies": {
+ "acorn": "^8.10.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/antfu"
+ }
+ },
+ "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/supports-preserve-symlinks-flag": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz",
+ "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==",
+ "dev": true,
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/terser": {
+ "version": "5.26.0",
+ "resolved": "https://registry.npmjs.org/terser/-/terser-5.26.0.tgz",
+ "integrity": "sha512-dytTGoE2oHgbNV9nTzgBEPaqAWvcJNl66VZ0BkJqlvp71IjO8CxdBx/ykCNb47cLnCmCvRZ6ZR0tLkqvZCdVBQ==",
+ "dev": true,
+ "dependencies": {
+ "@jridgewell/source-map": "^0.3.3",
+ "acorn": "^8.8.2",
+ "commander": "^2.20.0",
+ "source-map-support": "~0.5.20"
+ },
+ "bin": {
+ "terser": "bin/terser"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/terser/node_modules/commander": {
+ "version": "2.20.3",
+ "resolved": "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz",
+ "integrity": "sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ==",
+ "dev": true
+ },
+ "node_modules/test-exclude": {
+ "version": "6.0.0",
+ "resolved": "https://registry.npmjs.org/test-exclude/-/test-exclude-6.0.0.tgz",
+ "integrity": "sha512-cAGWPIyOHU6zlmg88jwm7VRyXnMN7iV68OGAbYDk/Mh/xC/pzVPlQtY6ngoIH/5/tciuhGfvESU8GrHrcxD56w==",
+ "dev": true,
+ "dependencies": {
+ "@istanbuljs/schema": "^0.1.2",
+ "glob": "^7.1.4",
+ "minimatch": "^3.0.4"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/text-table": {
+ "version": "0.2.0",
+ "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",
+ "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==",
+ "dev": true
+ },
+ "node_modules/timezone-mock": {
+ "version": "1.3.6",
+ "resolved": "https://registry.npmjs.org/timezone-mock/-/timezone-mock-1.3.6.tgz",
+ "integrity": "sha512-YcloWmZfLD9Li5m2VcobkCDNVaLMx8ohAb/97l/wYS3m+0TIEK5PFNMZZfRcusc6sFjIfxu8qcJT0CNnOdpqmg==",
+ "dev": true
+ },
+ "node_modules/tinybench": {
+ "version": "2.5.1",
+ "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.5.1.tgz",
+ "integrity": "sha512-65NKvSuAVDP/n4CqH+a9w2kTlLReS9vhsAP06MWx+/89nMinJyB2icyl58RIcqCmIggpojIGeuJGhjU1aGMBSg==",
+ "dev": true
+ },
+ "node_modules/tinypool": {
+ "version": "0.3.1",
+ "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-0.3.1.tgz",
+ "integrity": "sha512-zLA1ZXlstbU2rlpA4CIeVaqvWq41MTWqLY3FfsAXgC8+f7Pk7zroaJQxDgxn1xNudKW6Kmj4808rPFShUlIRmQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=14.0.0"
+ }
+ },
+ "node_modules/tinyspy": {
+ "version": "1.1.1",
+ "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-1.1.1.tgz",
+ "integrity": "sha512-UVq5AXt/gQlti7oxoIg5oi/9r0WpF7DGEVwXgqWSMmyN16+e3tl5lIvTaOpJ3TAtu5xFzWccFRM4R5NaWHF+4g==",
+ "dev": true,
+ "engines": {
+ "node": ">=14.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": "sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==",
+ "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/tsconfig-paths": {
+ "version": "3.15.0",
+ "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz",
+ "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==",
+ "dev": true,
+ "dependencies": {
+ "@types/json5": "^0.0.29",
+ "json5": "^1.0.2",
+ "minimist": "^1.2.6",
+ "strip-bom": "^3.0.0"
+ }
+ },
+ "node_modules/tsconfig-paths/node_modules/json5": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz",
+ "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==",
+ "dev": true,
+ "dependencies": {
+ "minimist": "^1.2.0"
+ },
+ "bin": {
+ "json5": "lib/cli.js"
+ }
+ },
+ "node_modules/type-check": {
+ "version": "0.4.0",
+ "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.4.0.tgz",
+ "integrity": "sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==",
+ "dev": true,
+ "dependencies": {
+ "prelude-ls": "^1.2.1"
+ },
+ "engines": {
+ "node": ">= 0.8.0"
+ }
+ },
+ "node_modules/type-detect": {
+ "version": "4.0.8",
+ "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz",
+ "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/type-fest": {
+ "version": "0.20.2",
+ "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.20.2.tgz",
+ "integrity": "sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ },
+ "node_modules/typed-array-buffer": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz",
+ "integrity": "sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "get-intrinsic": "^1.2.1",
+ "is-typed-array": "^1.1.10"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ }
+ },
+ "node_modules/typed-array-byte-length": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz",
+ "integrity": "sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "for-each": "^0.3.3",
+ "has-proto": "^1.0.1",
+ "is-typed-array": "^1.1.10"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/typed-array-byte-offset": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz",
+ "integrity": "sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg==",
+ "dev": true,
+ "dependencies": {
+ "available-typed-arrays": "^1.0.5",
+ "call-bind": "^1.0.2",
+ "for-each": "^0.3.3",
+ "has-proto": "^1.0.1",
+ "is-typed-array": "^1.1.10"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/typed-array-length": {
+ "version": "1.0.4",
+ "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.4.tgz",
+ "integrity": "sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "for-each": "^0.3.3",
+ "is-typed-array": "^1.1.9"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/ufo": {
+ "version": "1.3.2",
+ "resolved": "https://registry.npmjs.org/ufo/-/ufo-1.3.2.tgz",
+ "integrity": "sha512-o+ORpgGwaYQXgqGDwd+hkS4PuZ3QnmqMMxRuajK/a38L6fTpcE5GPIfrf+L/KemFzfUpeUQc1rRS1iDBozvnFA==",
+ "dev": true
+ },
+ "node_modules/unbox-primitive": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.2.tgz",
+ "integrity": "sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==",
+ "dev": true,
+ "dependencies": {
+ "call-bind": "^1.0.2",
+ "has-bigints": "^1.0.2",
+ "has-symbols": "^1.0.3",
+ "which-boxed-primitive": "^1.0.2"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/undici-types": {
+ "version": "5.26.5",
+ "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz",
+ "integrity": "sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==",
+ "dev": true
+ },
+ "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.1.0",
+ "resolved": "https://registry.npmjs.org/unicode-match-property-value-ecmascript/-/unicode-match-property-value-ecmascript-2.1.0.tgz",
+ "integrity": "sha512-qxkjQt6qjg/mYscYMC0XKRn3Rh0wFPlfxB0xkt9CfyTvpX1Ra0+rAmdX2QyAobptSEvuy4RtpPRui6XkV+8wjA==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/unicode-property-aliases-ecmascript": {
+ "version": "2.1.0",
+ "resolved": "https://registry.npmjs.org/unicode-property-aliases-ecmascript/-/unicode-property-aliases-ecmascript-2.1.0.tgz",
+ "integrity": "sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==",
+ "dev": true,
+ "engines": {
+ "node": ">=4"
+ }
+ },
+ "node_modules/update-browserslist-db": {
+ "version": "1.0.13",
+ "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz",
+ "integrity": "sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==",
+ "dev": true,
+ "funding": [
+ {
+ "type": "opencollective",
+ "url": "https://opencollective.com/browserslist"
+ },
+ {
+ "type": "tidelift",
+ "url": "https://tidelift.com/funding/github/npm/browserslist"
+ },
+ {
+ "type": "github",
+ "url": "https://github.com/sponsors/ai"
+ }
+ ],
+ "dependencies": {
+ "escalade": "^3.1.1",
+ "picocolors": "^1.0.0"
+ },
+ "bin": {
+ "update-browserslist-db": "cli.js"
+ },
+ "peerDependencies": {
+ "browserslist": ">= 4.21.0"
+ }
+ },
+ "node_modules/uri-js": {
+ "version": "4.4.1",
+ "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz",
+ "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==",
+ "dev": true,
+ "dependencies": {
+ "punycode": "^2.1.0"
+ }
+ },
+ "node_modules/v8-to-istanbul": {
+ "version": "9.2.0",
+ "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz",
+ "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==",
+ "dev": true,
+ "dependencies": {
+ "@jridgewell/trace-mapping": "^0.3.12",
+ "@types/istanbul-lib-coverage": "^2.0.1",
+ "convert-source-map": "^2.0.0"
+ },
+ "engines": {
+ "node": ">=10.12.0"
+ }
+ },
+ "node_modules/validate-npm-package-license": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz",
+ "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==",
+ "dev": true,
+ "dependencies": {
+ "spdx-correct": "^3.0.0",
+ "spdx-expression-parse": "^3.0.0"
+ }
+ },
+ "node_modules/vite": {
+ "version": "4.5.1",
+ "resolved": "https://registry.npmjs.org/vite/-/vite-4.5.1.tgz",
+ "integrity": "sha512-AXXFaAJ8yebyqzoNB9fu2pHoo/nWX+xZlaRwoeYUxEqBO+Zj4msE5G+BhGBll9lYEKv9Hfks52PAF2X7qDYXQA==",
+ "dev": true,
+ "dependencies": {
+ "esbuild": "^0.18.10",
+ "postcss": "^8.4.27",
+ "rollup": "^3.27.1"
+ },
+ "bin": {
+ "vite": "bin/vite.js"
+ },
+ "engines": {
+ "node": "^14.18.0 || >=16.0.0"
+ },
+ "funding": {
+ "url": "https://github.com/vitejs/vite?sponsor=1"
+ },
+ "optionalDependencies": {
+ "fsevents": "~2.3.2"
+ },
+ "peerDependencies": {
+ "@types/node": ">= 14",
+ "less": "*",
+ "lightningcss": "^1.21.0",
+ "sass": "*",
+ "stylus": "*",
+ "sugarss": "*",
+ "terser": "^5.4.0"
+ },
+ "peerDependenciesMeta": {
+ "@types/node": {
+ "optional": true
+ },
+ "less": {
+ "optional": true
+ },
+ "lightningcss": {
+ "optional": true
+ },
+ "sass": {
+ "optional": true
+ },
+ "stylus": {
+ "optional": true
+ },
+ "sugarss": {
+ "optional": true
+ },
+ "terser": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/vite-node": {
+ "version": "0.27.3",
+ "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-0.27.3.tgz",
+ "integrity": "sha512-eyJYOO64o5HIp8poc4bJX+ZNBwMZeI3f6/JdiUmJgW02Mt7LnoCtDMRVmLaY9S05SIsjGe339ZK4uo2wQ+bF9g==",
+ "dev": true,
+ "dependencies": {
+ "cac": "^6.7.14",
+ "debug": "^4.3.4",
+ "mlly": "^1.1.0",
+ "pathe": "^0.2.0",
+ "picocolors": "^1.0.0",
+ "source-map": "^0.6.1",
+ "source-map-support": "^0.5.21",
+ "vite": "^3.0.0 || ^4.0.0"
+ },
+ "bin": {
+ "vite-node": "vite-node.mjs"
+ },
+ "engines": {
+ "node": ">=v14.16.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/antfu"
+ }
+ },
+ "node_modules/vitest": {
+ "version": "0.27.3",
+ "resolved": "https://registry.npmjs.org/vitest/-/vitest-0.27.3.tgz",
+ "integrity": "sha512-Ld3UVgRVhJUtqvQ3dW89GxiApFAgBsWJZBCWzK+gA3w2yG68csXlGZZ4WDJURf+8ecNfgrScga6xY+8YSOpiMg==",
+ "dev": true,
+ "dependencies": {
+ "@types/chai": "^4.3.4",
+ "@types/chai-subset": "^1.3.3",
+ "@types/node": "*",
+ "acorn": "^8.8.1",
+ "acorn-walk": "^8.2.0",
+ "cac": "^6.7.14",
+ "chai": "^4.3.7",
+ "debug": "^4.3.4",
+ "local-pkg": "^0.4.2",
+ "picocolors": "^1.0.0",
+ "source-map": "^0.6.1",
+ "std-env": "^3.3.1",
+ "strip-literal": "^1.0.0",
+ "tinybench": "^2.3.1",
+ "tinypool": "^0.3.0",
+ "tinyspy": "^1.0.2",
+ "vite": "^3.0.0 || ^4.0.0",
+ "vite-node": "0.27.3",
+ "why-is-node-running": "^2.2.2"
+ },
+ "bin": {
+ "vitest": "vitest.mjs"
+ },
+ "engines": {
+ "node": ">=v14.16.0"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/antfu"
+ },
+ "peerDependencies": {
+ "@edge-runtime/vm": "*",
+ "@vitest/browser": "*",
+ "@vitest/ui": "*",
+ "happy-dom": "*",
+ "jsdom": "*"
+ },
+ "peerDependenciesMeta": {
+ "@edge-runtime/vm": {
+ "optional": true
+ },
+ "@vitest/browser": {
+ "optional": true
+ },
+ "@vitest/ui": {
+ "optional": true
+ },
+ "happy-dom": {
+ "optional": true
+ },
+ "jsdom": {
+ "optional": true
+ }
+ }
+ },
+ "node_modules/which": {
+ "version": "2.0.2",
+ "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
+ "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
+ "dev": true,
+ "dependencies": {
+ "isexe": "^2.0.0"
+ },
+ "bin": {
+ "node-which": "bin/node-which"
+ },
+ "engines": {
+ "node": ">= 8"
+ }
+ },
+ "node_modules/which-boxed-primitive": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz",
+ "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==",
+ "dev": true,
+ "dependencies": {
+ "is-bigint": "^1.0.1",
+ "is-boolean-object": "^1.1.0",
+ "is-number-object": "^1.0.4",
+ "is-string": "^1.0.5",
+ "is-symbol": "^1.0.3"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/which-typed-array": {
+ "version": "1.1.13",
+ "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz",
+ "integrity": "sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==",
+ "dev": true,
+ "dependencies": {
+ "available-typed-arrays": "^1.0.5",
+ "call-bind": "^1.0.4",
+ "for-each": "^0.3.3",
+ "gopd": "^1.0.1",
+ "has-tostringtag": "^1.0.0"
+ },
+ "engines": {
+ "node": ">= 0.4"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/ljharb"
+ }
+ },
+ "node_modules/why-is-node-running": {
+ "version": "2.2.2",
+ "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.2.2.tgz",
+ "integrity": "sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==",
+ "dev": true,
+ "dependencies": {
+ "siginfo": "^2.0.0",
+ "stackback": "0.0.2"
+ },
+ "bin": {
+ "why-is-node-running": "cli.js"
+ },
+ "engines": {
+ "node": ">=8"
+ }
+ },
+ "node_modules/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,
+ "dependencies": {
+ "ansi-styles": "^4.0.0",
+ "string-width": "^4.1.0",
+ "strip-ansi": "^6.0.0"
+ },
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/wrap-ansi?sponsor=1"
+ }
+ },
+ "node_modules/wrap-ansi/node_modules/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,
+ "dependencies": {
+ "color-convert": "^2.0.1"
+ },
+ "engines": {
+ "node": ">=8"
+ },
+ "funding": {
+ "url": "https://github.com/chalk/ansi-styles?sponsor=1"
+ }
+ },
+ "node_modules/wrap-ansi/node_modules/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,
+ "dependencies": {
+ "color-name": "~1.1.4"
+ },
+ "engines": {
+ "node": ">=7.0.0"
+ }
+ },
+ "node_modules/wrap-ansi/node_modules/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
+ },
+ "node_modules/wrappy": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==",
+ "dev": true
+ },
+ "node_modules/y18n": {
+ "version": "5.0.8",
+ "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz",
+ "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/yallist": {
+ "version": "3.1.1",
+ "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz",
+ "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==",
+ "dev": true
+ },
+ "node_modules/yargs": {
+ "version": "16.2.0",
+ "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz",
+ "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==",
+ "dev": true,
+ "dependencies": {
+ "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"
+ },
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/yargs-parser": {
+ "version": "20.2.9",
+ "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-20.2.9.tgz",
+ "integrity": "sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==",
+ "dev": true,
+ "engines": {
+ "node": ">=10"
+ }
+ },
+ "node_modules/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,
+ "engines": {
+ "node": ">=10"
+ },
+ "funding": {
+ "url": "https://github.com/sponsors/sindresorhus"
+ }
+ }
+ }
+}
diff --git a/package.json b/package.json
index 153e5c1a4..8392f13ab 100644
--- a/package.json
+++ b/package.json
@@ -3,13 +3,14 @@
"description": "String validation and sanitization",
"version": "13.11.0",
"sideEffects": false,
+ "type": "module",
"homepage": "https://github.com/validatorjs/validator.js",
"files": [
"index.js",
"es",
"lib",
"README.md",
- "LICENCE",
+ "LICENSE",
"validator.js",
"validator.min.js"
],
@@ -28,6 +29,42 @@
"Anthony Nandaa (https://github.com/profnandaa)"
],
"main": "index.js",
+ "module": "./es/index.js",
+ "exports": {
+ ".": {
+ "import": "./es/index.js",
+ "require": "./index.js",
+ "browser": "./validator.min.js"
+ },
+ "./index.js": {
+ "import": "./es/index.js",
+ "require": "./index.js"
+ },
+ "./es": "./es/index.js",
+ "./es/lib/*": "./es/lib/*.js",
+ "./es/lib/*.js": "./es/lib/*.js",
+ "./es/*": "./es/lib/*.js",
+ "./es/*.js": "./es/lib/*.js",
+ "./lib/*": {
+ "import": "./es/lib/*.js",
+ "require": "./lib/*.js"
+ },
+ "./lib/*.js": {
+ "import": "./es/lib/*.js",
+ "require": "./lib/*.js"
+ },
+ "./package.json": "./package.json",
+ "./validator.js": "./validator.js",
+ "./validator.min.js": "./validator.min.js",
+ "./*": {
+ "import": "./es/lib/*.js",
+ "require": "./lib/*.js"
+ },
+ "./*.js": {
+ "import": "./es/lib/*.js",
+ "require": "./lib/*.js"
+ }
+ },
"bugs": {
"url": "https://github.com/validatorjs/validator.js/issues"
},
@@ -36,23 +73,25 @@
"url": "git+https://github.com/validatorjs/validator.js.git"
},
"devDependencies": {
- "@babel/cli": "^7.0.0",
- "@babel/core": "^7.0.0",
- "@babel/preset-env": "^7.0.0",
- "@babel/register": "^7.0.0",
- "babel-eslint": "^10.0.1",
- "babel-plugin-add-module-exports": "^1.0.0",
- "eslint": "^4.19.1",
- "eslint-config-airbnb-base": "^12.1.0",
- "eslint-plugin-import": "^2.11.0",
- "mocha": "^6.2.3",
+ "@babel/cli": "^7.20.7",
+ "@babel/core": "^7.20.12",
+ "@babel/eslint-parser": "^7.19.1",
+ "@babel/preset-env": "^7.20.2",
+ "@rollup/plugin-babel": "^6.0.3",
+ "@rollup/plugin-terser": "^0.3.0",
+ "@vitest/coverage-c8": "^0.27.1",
+ "babel-plugin-add-module-exports": "^1.0.4",
+ "eslint": "^8.31.0",
+ "eslint-config-airbnb-base": "^15.0.0",
+ "eslint-config-prettier": "9.1.0",
+ "eslint-plugin-import": "^2.27.4",
+ "eslint-plugin-node": "^11.1.0",
"npm-run-all": "^4.1.5",
- "nyc": "^14.1.0",
- "rimraf": "^3.0.0",
- "rollup": "^0.47.0",
- "rollup-plugin-babel": "^4.0.1",
+ "prettier": "3.1.1",
+ "rimraf": "^3.0.2",
+ "rollup": "^3.10.0",
"timezone-mock": "^1.3.6",
- "uglify-js": "^3.0.19"
+ "vitest": "^0.27.1"
},
"scripts": {
"lint": "eslint src test",
@@ -61,16 +100,16 @@
"clean:es": "rimraf es",
"clean:browser": "rimraf validator*.js",
"clean": "run-p clean:*",
- "minify": "uglifyjs validator.js -o validator.min.js --compress --mangle --comments /Copyright/",
- "build:browser": "node --require @babel/register build-browser && npm run minify",
+ "build:browser": "rollup -c",
"build:es": "babel src -d es --env-name=es",
"build:node": "babel src -d .",
"build": "run-p build:*",
"pretest": "npm run build && npm run lint",
- "test": "nyc --reporter=cobertura --reporter=text-summary mocha --require @babel/register --reporter dot --recursive"
+ "test": "vitest --coverage",
+ "format": "prettier . --write"
},
"engines": {
- "node": ">= 0.10"
+ "node": ">= 14"
},
"license": "MIT"
}
diff --git a/rollup.config.mjs b/rollup.config.mjs
new file mode 100644
index 000000000..0b42d5dff
--- /dev/null
+++ b/rollup.config.mjs
@@ -0,0 +1,41 @@
+/* eslint-disable import/no-extraneous-dependencies */
+import fs from 'fs';
+import babel from '@rollup/plugin-babel';
+import babelPresetEnv from '@babel/preset-env';
+import terser from '@rollup/plugin-terser';
+
+const license = `/*!\n${String(fs.readFileSync('./LICENSE'))
+ .trim()
+ .split('\n')
+ .map((l) => (l ? ` * ${l}` : ' *'))
+ .join('\n')}\n */`;
+
+/**
+ * @type {import('rollup').RollupOptions}
+ */
+const config = {
+ input: 'src/index.js',
+ output: [
+ {
+ file: 'validator.js',
+ format: 'umd',
+ name: 'validator',
+ banner: license,
+ },
+ {
+ file: 'validator.min.js',
+ format: 'umd',
+ name: 'validator',
+ plugins: [terser()],
+ banner: license,
+ },
+ ],
+ plugins: [
+ babel({
+ presets: [[babelPresetEnv, { modules: false }]],
+ babelrc: false,
+ }),
+ ],
+};
+
+export default config;
diff --git a/src/index.js b/src/index.js
index bef4cfff4..c45d5f138 100644
--- a/src/index.js
+++ b/src/index.js
@@ -1,130 +1,136 @@
-import toDate from './lib/toDate';
-import toFloat from './lib/toFloat';
-import toInt from './lib/toInt';
-import toBoolean from './lib/toBoolean';
-import equals from './lib/equals';
-import contains from './lib/contains';
-import matches from './lib/matches';
-
-import isEmail from './lib/isEmail';
-import isURL from './lib/isURL';
-import isMACAddress from './lib/isMACAddress';
-import isIP from './lib/isIP';
-import isIPRange from './lib/isIPRange';
-import isFQDN from './lib/isFQDN';
-import isDate from './lib/isDate';
-import isTime from './lib/isTime';
-
-import isBoolean from './lib/isBoolean';
-import isLocale from './lib/isLocale';
-
-import isAlpha, { locales as isAlphaLocales } from './lib/isAlpha';
-import isAlphanumeric, { locales as isAlphanumericLocales } from './lib/isAlphanumeric';
-import isNumeric from './lib/isNumeric';
-import isPassportNumber from './lib/isPassportNumber';
-import isPort from './lib/isPort';
-import isLowercase from './lib/isLowercase';
-import isUppercase from './lib/isUppercase';
-
-import isIMEI from './lib/isIMEI';
-
-import isAscii from './lib/isAscii';
-import isFullWidth from './lib/isFullWidth';
-import isHalfWidth from './lib/isHalfWidth';
-import isVariableWidth from './lib/isVariableWidth';
-import isMultibyte from './lib/isMultibyte';
-import isSemVer from './lib/isSemVer';
-import isSurrogatePair from './lib/isSurrogatePair';
-
-import isInt from './lib/isInt';
-import isFloat, { locales as isFloatLocales } from './lib/isFloat';
-import isDecimal from './lib/isDecimal';
-import isHexadecimal from './lib/isHexadecimal';
-import isOctal from './lib/isOctal';
-import isDivisibleBy from './lib/isDivisibleBy';
-
-import isHexColor from './lib/isHexColor';
-import isRgbColor from './lib/isRgbColor';
-import isHSL from './lib/isHSL';
-
-import isISRC from './lib/isISRC';
-
-import isIBAN, { locales as ibanLocales } from './lib/isIBAN';
-import isBIC from './lib/isBIC';
-
-import isMD5 from './lib/isMD5';
-import isHash from './lib/isHash';
-import isJWT from './lib/isJWT';
-
-import isJSON from './lib/isJSON';
-import isEmpty from './lib/isEmpty';
-
-import isLength from './lib/isLength';
-import isByteLength from './lib/isByteLength';
-
-import isUUID from './lib/isUUID';
-import isMongoId from './lib/isMongoId';
-
-import isAfter from './lib/isAfter';
-import isBefore from './lib/isBefore';
-
-import isIn from './lib/isIn';
-
-import isLuhnNumber from './lib/isLuhnNumber';
-import isCreditCard from './lib/isCreditCard';
-import isIdentityCard from './lib/isIdentityCard';
-
-import isEAN from './lib/isEAN';
-import isISIN from './lib/isISIN';
-import isISBN from './lib/isISBN';
-import isISSN from './lib/isISSN';
-import isTaxID from './lib/isTaxID';
-
-import isMobilePhone, { locales as isMobilePhoneLocales } from './lib/isMobilePhone';
-
-import isEthereumAddress from './lib/isEthereumAddress';
-
-import isCurrency from './lib/isCurrency';
-
-import isBtcAddress from './lib/isBtcAddress';
-
-import { isISO6346, isFreightContainerID } from './lib/isISO6346';
-import isISO6391 from './lib/isISO6391';
-import isISO8601 from './lib/isISO8601';
-import isRFC3339 from './lib/isRFC3339';
-import isISO31661Alpha2 from './lib/isISO31661Alpha2';
-import isISO31661Alpha3 from './lib/isISO31661Alpha3';
-import isISO4217 from './lib/isISO4217';
-
-import isBase32 from './lib/isBase32';
-import isBase58 from './lib/isBase58';
-import isBase64 from './lib/isBase64';
-import isDataURI from './lib/isDataURI';
-import isMagnetURI from './lib/isMagnetURI';
-import isMailtoURI from './lib/isMailtoURI';
-
-import isMimeType from './lib/isMimeType';
-
-import isLatLong from './lib/isLatLong';
-import isPostalCode, { locales as isPostalCodeLocales } from './lib/isPostalCode';
-
-import ltrim from './lib/ltrim';
-import rtrim from './lib/rtrim';
-import trim from './lib/trim';
-import escape from './lib/escape';
-import unescape from './lib/unescape';
-import stripLow from './lib/stripLow';
-import whitelist from './lib/whitelist';
-import blacklist from './lib/blacklist';
-import isWhitelisted from './lib/isWhitelisted';
+import toDate from './lib/toDate.js';
+import toFloat from './lib/toFloat.js';
+import toInt from './lib/toInt.js';
+import toBoolean from './lib/toBoolean.js';
+import equals from './lib/equals.js';
+import contains from './lib/contains.js';
+import matches from './lib/matches.js';
+
+import isEmail from './lib/isEmail.js';
+import isURL from './lib/isURL.js';
+import isMACAddress from './lib/isMACAddress.js';
+import isIP from './lib/isIP.js';
+import isIPRange from './lib/isIPRange.js';
+import isFQDN from './lib/isFQDN.js';
+import isDate from './lib/isDate.js';
+import isTime from './lib/isTime.js';
+
+import isBoolean from './lib/isBoolean.js';
+import isLocale from './lib/isLocale.js';
+
+import isAlpha, { locales as isAlphaLocales } from './lib/isAlpha.js';
+import isAlphanumeric, {
+ locales as isAlphanumericLocales,
+} from './lib/isAlphanumeric.js';
+import isNumeric from './lib/isNumeric.js';
+import isPassportNumber from './lib/isPassportNumber.js';
+import isPort from './lib/isPort.js';
+import isLowercase from './lib/isLowercase.js';
+import isUppercase from './lib/isUppercase.js';
+
+import isIMEI from './lib/isIMEI.js';
+
+import isAscii from './lib/isAscii.js';
+import isFullWidth from './lib/isFullWidth.js';
+import isHalfWidth from './lib/isHalfWidth.js';
+import isVariableWidth from './lib/isVariableWidth.js';
+import isMultibyte from './lib/isMultibyte.js';
+import isSemVer from './lib/isSemVer.js';
+import isSurrogatePair from './lib/isSurrogatePair.js';
+
+import isInt from './lib/isInt.js';
+import isFloat, { locales as isFloatLocales } from './lib/isFloat.js';
+import isDecimal from './lib/isDecimal.js';
+import isHexadecimal from './lib/isHexadecimal.js';
+import isOctal from './lib/isOctal.js';
+import isDivisibleBy from './lib/isDivisibleBy.js';
+
+import isHexColor from './lib/isHexColor.js';
+import isRgbColor from './lib/isRgbColor.js';
+import isHSL from './lib/isHSL.js';
+
+import isISRC from './lib/isISRC.js';
+
+import isIBAN, { locales as ibanLocales } from './lib/isIBAN.js';
+import isBIC from './lib/isBIC.js';
+
+import isMD5 from './lib/isMD5.js';
+import isHash from './lib/isHash.js';
+import isJWT from './lib/isJWT.js';
+
+import isJSON from './lib/isJSON.js';
+import isEmpty from './lib/isEmpty.js';
+
+import isLength from './lib/isLength.js';
+import isByteLength from './lib/isByteLength.js';
+
+import isUUID from './lib/isUUID.js';
+import isMongoId from './lib/isMongoId.js';
+
+import isAfter from './lib/isAfter.js';
+import isBefore from './lib/isBefore.js';
+
+import isIn from './lib/isIn.js';
+
+import isLuhnNumber from './lib/isLuhnNumber.js';
+import isCreditCard from './lib/isCreditCard.js';
+import isIdentityCard from './lib/isIdentityCard.js';
+
+import isEAN from './lib/isEAN.js';
+import isISIN from './lib/isISIN.js';
+import isISBN from './lib/isISBN.js';
+import isISSN from './lib/isISSN.js';
+import isTaxID from './lib/isTaxID.js';
+
+import isMobilePhone, {
+ locales as isMobilePhoneLocales,
+} from './lib/isMobilePhone.js';
+
+import isEthereumAddress from './lib/isEthereumAddress.js';
+
+import isCurrency from './lib/isCurrency.js';
+
+import isBtcAddress from './lib/isBtcAddress.js';
+
+import { isISO6346, isFreightContainerID } from './lib/isISO6346.js';
+import isISO6391 from './lib/isISO6391.js';
+import isISO8601 from './lib/isISO8601.js';
+import isRFC3339 from './lib/isRFC3339.js';
+import isISO31661Alpha2 from './lib/isISO31661Alpha2.js';
+import isISO31661Alpha3 from './lib/isISO31661Alpha3.js';
+import isISO4217 from './lib/isISO4217.js';
+
+import isBase32 from './lib/isBase32.js';
+import isBase58 from './lib/isBase58.js';
+import isBase64 from './lib/isBase64.js';
+import isDataURI from './lib/isDataURI.js';
+import isMagnetURI from './lib/isMagnetURI.js';
+import isMailtoURI from './lib/isMailtoURI.js';
+
+import isMimeType from './lib/isMimeType.js';
+
+import isLatLong from './lib/isLatLong.js';
+import isPostalCode, {
+ locales as isPostalCodeLocales,
+} from './lib/isPostalCode.js';
+
+import ltrim from './lib/ltrim.js';
+import rtrim from './lib/rtrim.js';
+import trim from './lib/trim.js';
+import escape from './lib/escape.js';
+import unescape from './lib/unescape.js';
+import stripLow from './lib/stripLow.js';
+import whitelist from './lib/whitelist.js';
+import blacklist from './lib/blacklist.js';
+import isWhitelisted from './lib/isWhitelisted.js';
+
+import normalizeEmail from './lib/normalizeEmail.js';
-import normalizeEmail from './lib/normalizeEmail';
+import isSlug from './lib/isSlug.js';
+import isLicensePlate from './lib/isLicensePlate.js';
+import isStrongPassword from './lib/isStrongPassword.js';
-import isSlug from './lib/isSlug';
-import isLicensePlate from './lib/isLicensePlate';
-import isStrongPassword from './lib/isStrongPassword';
-
-import isVAT from './lib/isVAT';
+import isVAT from './lib/isVAT.js';
const version = '13.11.0';
diff --git a/src/lib/alpha.js b/src/lib/alpha.js
index d540ed1cf..25d32f8a7 100644
--- a/src/lib/alpha.js
+++ b/src/lib/alpha.js
@@ -1,3 +1,4 @@
+/* eslint-disable no-misleading-character-class */
export const alpha = {
'en-US': /^[A-Z]+$/i,
'az-AZ': /^[A-VXYZÇƏĞİıÖŞÜ]+$/i,
@@ -28,7 +29,8 @@ export const alpha = {
'th-TH': /^[ก-๐\s]+$/i,
'tr-TR': /^[A-ZÇĞİıÖŞÜ]+$/i,
'uk-UA': /^[А-ЩЬЮЯЄIЇҐі]+$/i,
- 'vi-VN': /^[A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,
+ 'vi-VN':
+ /^[A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,
'ko-KR': /^[ㄱ-ㅎㅏ-ㅣ가-힣]*$/,
'ku-IQ': /^[ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,
ar: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,
@@ -59,7 +61,8 @@ export const alphanumeric = {
'pl-PL': /^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i,
'pt-PT': /^[0-9A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,
'ru-RU': /^[0-9А-ЯЁ]+$/i,
- 'kk-KZ': /^[0-9А-ЯЁ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i,
+ 'kk-KZ':
+ /^[0-9А-ЯЁ\u04D8\u04B0\u0406\u04A2\u0492\u04AE\u049A\u04E8\u04BA]+$/i,
'sl-SI': /^[0-9A-ZČĆĐŠŽ]+$/i,
'sk-SK': /^[0-9A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,
'sr-RS@latin': /^[0-9A-ZČĆŽŠĐ]+$/i,
@@ -70,7 +73,8 @@ export const alphanumeric = {
'uk-UA': /^[0-9А-ЩЬЮЯЄIЇҐі]+$/i,
'ko-KR': /^[0-9ㄱ-ㅎㅏ-ㅣ가-힣]*$/,
'ku-IQ': /^[٠١٢٣٤٥٦٧٨٩0-9ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,
- 'vi-VN': /^[0-9A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,
+ 'vi-VN':
+ /^[0-9A-ZÀÁẠẢÃÂẦẤẬẨẪĂẰẮẶẲẴĐÈÉẸẺẼÊỀẾỆỂỄÌÍỊỈĨÒÓỌỎÕÔỒỐỘỔỖƠỜỚỢỞỠÙÚỤỦŨƯỪỨỰỬỮỲÝỴỶỸ]+$/i,
ar: /^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,
he: /^[0-9א-ת]+$/,
fa: /^['0-9آاءأؤئبپتثجچحخدذرزژسشصضطظعغفقکگلمنوهةی۱۲۳۴۵۶۷۸۹۰']+$/i,
@@ -84,7 +88,6 @@ export const decimal = {
ar: '٫',
};
-
export const englishLocales = ['AU', 'GB', 'HK', 'IN', 'NZ', 'ZA', 'ZM'];
for (let locale, i = 0; i < englishLocales.length; i++) {
@@ -95,8 +98,25 @@ for (let locale, i = 0; i < englishLocales.length; i++) {
}
// Source: http://www.localeplanet.com/java/
-export const arabicLocales = ['AE', 'BH', 'DZ', 'EG', 'IQ', 'JO', 'KW', 'LB', 'LY',
- 'MA', 'QM', 'QA', 'SA', 'SD', 'SY', 'TN', 'YE'];
+export const arabicLocales = [
+ 'AE',
+ 'BH',
+ 'DZ',
+ 'EG',
+ 'IQ',
+ 'JO',
+ 'KW',
+ 'LB',
+ 'LY',
+ 'MA',
+ 'QM',
+ 'QA',
+ 'SA',
+ 'SD',
+ 'SY',
+ 'TN',
+ 'YE',
+];
for (let locale, i = 0; i < arabicLocales.length; i++) {
locale = `ar-${arabicLocales[i]}`;
@@ -125,9 +145,35 @@ for (let locale, i = 0; i < bengaliLocales.length; i++) {
// Source: https://en.wikipedia.org/wiki/Decimal_mark
export const dotDecimal = ['ar-EG', 'ar-LB', 'ar-LY'];
export const commaDecimal = [
- 'bg-BG', 'cs-CZ', 'da-DK', 'de-DE', 'el-GR', 'en-ZM', 'es-ES', 'fr-CA', 'fr-FR',
- 'id-ID', 'it-IT', 'ku-IQ', 'hi-IN', 'hu-HU', 'nb-NO', 'nn-NO', 'nl-NL', 'pl-PL', 'pt-PT',
- 'ru-RU', 'kk-KZ', 'si-LK', 'sl-SI', 'sr-RS@latin', 'sr-RS', 'sv-SE', 'tr-TR', 'uk-UA', 'vi-VN',
+ 'bg-BG',
+ 'cs-CZ',
+ 'da-DK',
+ 'de-DE',
+ 'el-GR',
+ 'en-ZM',
+ 'es-ES',
+ 'fr-CA',
+ 'fr-FR',
+ 'id-ID',
+ 'it-IT',
+ 'ku-IQ',
+ 'hi-IN',
+ 'hu-HU',
+ 'nb-NO',
+ 'nn-NO',
+ 'nl-NL',
+ 'pl-PL',
+ 'pt-PT',
+ 'ru-RU',
+ 'kk-KZ',
+ 'si-LK',
+ 'sl-SI',
+ 'sr-RS@latin',
+ 'sr-RS',
+ 'sv-SE',
+ 'tr-TR',
+ 'uk-UA',
+ 'vi-VN',
];
for (let i = 0; i < dotDecimal.length; i++) {
diff --git a/src/lib/blacklist.js b/src/lib/blacklist.js
index d796dbb10..6839ad738 100644
--- a/src/lib/blacklist.js
+++ b/src/lib/blacklist.js
@@ -1,4 +1,4 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
export default function blacklist(str, chars) {
assertString(str);
diff --git a/src/lib/contains.js b/src/lib/contains.js
index 7be314b04..f2af203d1 100644
--- a/src/lib/contains.js
+++ b/src/lib/contains.js
@@ -1,6 +1,6 @@
-import assertString from './util/assertString';
-import toString from './util/toString';
-import merge from './util/merge';
+import assertString from './util/assertString.js';
+import toString from './util/toString.js';
+import merge from './util/merge.js';
const defaulContainsOptions = {
ignoreCase: false,
@@ -12,7 +12,10 @@ export default function contains(str, elem, options) {
options = merge(options, defaulContainsOptions);
if (options.ignoreCase) {
- return str.toLowerCase().split(toString(elem).toLowerCase()).length > options.minOccurrences;
+ return (
+ str.toLowerCase().split(toString(elem).toLowerCase()).length >
+ options.minOccurrences
+ );
}
return str.split(toString(elem)).length > options.minOccurrences;
diff --git a/src/lib/equals.js b/src/lib/equals.js
index b0307f05a..4107c5321 100644
--- a/src/lib/equals.js
+++ b/src/lib/equals.js
@@ -1,4 +1,4 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
export default function equals(str, comparison) {
assertString(str);
diff --git a/src/lib/escape.js b/src/lib/escape.js
index 06562e239..afc0be38e 100644
--- a/src/lib/escape.js
+++ b/src/lib/escape.js
@@ -1,13 +1,14 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
export default function escape(str) {
assertString(str);
- return (str.replace(/&/g, '&')
+ return str
+ .replace(/&/g, '&')
.replace(/"/g, '"')
.replace(/'/g, ''')
.replace(//g, '>')
.replace(/\//g, '/')
.replace(/\\/g, '\')
- .replace(/`/g, '`'));
+ .replace(/`/g, '`');
}
diff --git a/src/lib/isAfter.js b/src/lib/isAfter.js
index e116e77ce..b6fcc0f76 100644
--- a/src/lib/isAfter.js
+++ b/src/lib/isAfter.js
@@ -1,9 +1,10 @@
-import toDate from './toDate';
+import toDate from './toDate.js';
export default function isAfter(date, options) {
// For backwards compatibility:
// isAfter(str [, date]), i.e. `options` could be used as argument for the legacy `date`
- const comparisonDate = options?.comparisonDate || options || Date().toString();
+ const comparisonDate =
+ options?.comparisonDate || options || Date().toString();
const comparison = toDate(comparisonDate);
const original = toDate(date);
diff --git a/src/lib/isAlpha.js b/src/lib/isAlpha.js
index e961e64eb..2eb2b20ea 100644
--- a/src/lib/isAlpha.js
+++ b/src/lib/isAlpha.js
@@ -1,5 +1,5 @@
-import assertString from './util/assertString';
-import { alpha } from './alpha';
+import assertString from './util/assertString.js';
+import { alpha } from './alpha.js';
export default function isAlpha(_str, locale = 'en-US', options = {}) {
assertString(_str);
@@ -11,7 +11,13 @@ export default function isAlpha(_str, locale = 'en-US', options = {}) {
if (ignore instanceof RegExp) {
str = str.replace(ignore, '');
} else if (typeof ignore === 'string') {
- str = str.replace(new RegExp(`[${ignore.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g, '\\$&')}]`, 'g'), ''); // escape regex for ignore
+ str = str.replace(
+ new RegExp(
+ `[${ignore.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g, '\\$&')}]`,
+ 'g'
+ ),
+ ''
+ ); // escape regex for ignore
} else {
throw new Error('ignore should be instance of a String or RegExp');
}
diff --git a/src/lib/isAlphanumeric.js b/src/lib/isAlphanumeric.js
index b259ab908..01abcb1d2 100644
--- a/src/lib/isAlphanumeric.js
+++ b/src/lib/isAlphanumeric.js
@@ -1,5 +1,5 @@
-import assertString from './util/assertString';
-import { alphanumeric } from './alpha';
+import assertString from './util/assertString.js';
+import { alphanumeric } from './alpha.js';
export default function isAlphanumeric(_str, locale = 'en-US', options = {}) {
assertString(_str);
@@ -11,7 +11,13 @@ export default function isAlphanumeric(_str, locale = 'en-US', options = {}) {
if (ignore instanceof RegExp) {
str = str.replace(ignore, '');
} else if (typeof ignore === 'string') {
- str = str.replace(new RegExp(`[${ignore.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g, '\\$&')}]`, 'g'), ''); // escape regex for ignore
+ str = str.replace(
+ new RegExp(
+ `[${ignore.replace(/[-[\]{}()*+?.,\\^$|#\\s]/g, '\\$&')}]`,
+ 'g'
+ ),
+ ''
+ ); // escape regex for ignore
} else {
throw new Error('ignore should be instance of a String or RegExp');
}
diff --git a/src/lib/isAscii.js b/src/lib/isAscii.js
index 6bce344de..038dd68ad 100644
--- a/src/lib/isAscii.js
+++ b/src/lib/isAscii.js
@@ -1,4 +1,4 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
/* eslint-disable no-control-regex */
const ascii = /^[\x00-\x7F]+$/;
diff --git a/src/lib/isBIC.js b/src/lib/isBIC.js
index b0f586728..286ac244a 100644
--- a/src/lib/isBIC.js
+++ b/src/lib/isBIC.js
@@ -1,5 +1,5 @@
-import assertString from './util/assertString';
-import { CountryCodes } from './isISO31661Alpha2';
+import assertString from './util/assertString.js';
+import { CountryCodes } from './isISO31661Alpha2.js';
// https://en.wikipedia.org/wiki/ISO_9362
const isBICReg = /^[A-Za-z]{6}[A-Za-z0-9]{2}([A-Za-z0-9]{3})?$/;
diff --git a/src/lib/isBase32.js b/src/lib/isBase32.js
index 5e2969cbc..766a3ab58 100644
--- a/src/lib/isBase32.js
+++ b/src/lib/isBase32.js
@@ -1,5 +1,5 @@
-import assertString from './util/assertString';
-import merge from './util/merge';
+import assertString from './util/assertString.js';
+import merge from './util/merge.js';
const base32 = /^[A-Z2-7]+=*$/;
const crockfordBase32 = /^[A-HJKMNP-TV-Z0-9]+$/;
diff --git a/src/lib/isBase58.js b/src/lib/isBase58.js
index 05c46dc18..4b1ffd861 100644
--- a/src/lib/isBase58.js
+++ b/src/lib/isBase58.js
@@ -1,4 +1,4 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
// Accepted chars - 123456789ABCDEFGH JKLMN PQRSTUVWXYZabcdefghijk mnopqrstuvwxyz
const base58Reg = /^[A-HJ-NP-Za-km-z1-9]*$/;
diff --git a/src/lib/isBase64.js b/src/lib/isBase64.js
index 02dead0f4..085ec3501 100644
--- a/src/lib/isBase64.js
+++ b/src/lib/isBase64.js
@@ -1,5 +1,5 @@
-import assertString from './util/assertString';
-import merge from './util/merge';
+import assertString from './util/assertString.js';
+import merge from './util/merge.js';
const notBase64 = /[^A-Z0-9+\/=]/i;
const urlSafeBase64 = /^[A-Z0-9_\-]*$/i;
@@ -22,7 +22,9 @@ export default function isBase64(str, options) {
}
const firstPaddingChar = str.indexOf('=');
- return firstPaddingChar === -1 ||
+ return (
+ firstPaddingChar === -1 ||
firstPaddingChar === len - 1 ||
- (firstPaddingChar === len - 2 && str[len - 1] === '=');
+ (firstPaddingChar === len - 2 && str[len - 1] === '=')
+ );
}
diff --git a/src/lib/isBefore.js b/src/lib/isBefore.js
index 8314f0e14..1a8213881 100644
--- a/src/lib/isBefore.js
+++ b/src/lib/isBefore.js
@@ -1,5 +1,5 @@
-import assertString from './util/assertString';
-import toDate from './toDate';
+import assertString from './util/assertString.js';
+import toDate from './toDate.js';
export default function isBefore(str, date = String(new Date())) {
assertString(str);
diff --git a/src/lib/isBoolean.js b/src/lib/isBoolean.js
index 9fddc2b48..76b13f56e 100644
--- a/src/lib/isBoolean.js
+++ b/src/lib/isBoolean.js
@@ -1,4 +1,4 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
const defaultOptions = { loose: false };
const strictBooleans = ['true', 'false', '1', '0'];
diff --git a/src/lib/isBtcAddress.js b/src/lib/isBtcAddress.js
index 08f12f4ca..84812fff0 100644
--- a/src/lib/isBtcAddress.js
+++ b/src/lib/isBtcAddress.js
@@ -1,4 +1,4 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
const bech32 = /^(bc1)[a-z0-9]{25,39}$/;
const base58 = /^(1|3)[A-HJ-NP-Za-km-z1-9]{25,39}$/;
diff --git a/src/lib/isByteLength.js b/src/lib/isByteLength.js
index 619d7f604..61b0e67d2 100644
--- a/src/lib/isByteLength.js
+++ b/src/lib/isByteLength.js
@@ -1,14 +1,15 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
/* eslint-disable prefer-rest-params */
export default function isByteLength(str, options) {
assertString(str);
let min;
let max;
- if (typeof (options) === 'object') {
+ if (typeof options === 'object') {
min = options.min || 0;
max = options.max;
- } else { // backwards compatibility: isByteLength(str, min [, max])
+ } else {
+ // backwards compatibility: isByteLength(str, min [, max])
min = arguments[1];
max = arguments[2];
}
diff --git a/src/lib/isCreditCard.js b/src/lib/isCreditCard.js
index 938679d39..27de1ba24 100644
--- a/src/lib/isCreditCard.js
+++ b/src/lib/isCreditCard.js
@@ -1,12 +1,13 @@
-import assertString from './util/assertString';
-import isLuhnValid from './isLuhnNumber';
+import assertString from './util/assertString.js';
+import isLuhnValid from './isLuhnNumber.js';
const cards = {
amex: /^3[47][0-9]{13}$/,
dinersclub: /^3(?:0[0-5]|[68][0-9])[0-9]{11}$/,
discover: /^6(?:011|5[0-9][0-9])[0-9]{12,15}$/,
jcb: /^(?:2131|1800|35\d{3})\d{11}$/,
- mastercard: /^5[1-5][0-9]{2}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}$/, // /^[25][1-7][0-9]{14}$/;
+ mastercard:
+ /^5[1-5][0-9]{2}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}$/, // /^[25][1-7][0-9]{14}$/;
unionpay: /^(6[27][0-9]{14}|^(81[0-9]{14,17}))$/,
visa: /^(?:4[0-9]{12})(?:[0-9]{3,6})?$/,
};
@@ -28,13 +29,13 @@ export default function isCreditCard(card, options = {}) {
const sanitized = card.replace(/[- ]+/g, '');
if (provider && provider.toLowerCase() in cards) {
// specific provider in the list
- if (!(cards[provider.toLowerCase()].test(sanitized))) {
+ if (!cards[provider.toLowerCase()].test(sanitized)) {
return false;
}
} else if (provider && !(provider.toLowerCase() in cards)) {
/* specific provider not in the list */
throw new Error(`${provider} is not a valid credit card provider.`);
- } else if (!allCards.some(cardProvider => cardProvider.test(sanitized))) {
+ } else if (!allCards.some((cardProvider) => cardProvider.test(sanitized))) {
// no specific provider
return false;
}
diff --git a/src/lib/isCurrency.js b/src/lib/isCurrency.js
index 54b1f7c7c..8adf832e5 100755
--- a/src/lib/isCurrency.js
+++ b/src/lib/isCurrency.js
@@ -1,20 +1,30 @@
-import merge from './util/merge';
-import assertString from './util/assertString';
+import merge from './util/merge.js';
+import assertString from './util/assertString.js';
function currencyRegex(options) {
let decimal_digits = `\\d{${options.digits_after_decimal[0]}}`;
- options.digits_after_decimal.forEach((digit, index) => { if (index !== 0) decimal_digits = `${decimal_digits}|\\d{${digit}}`; });
+ options.digits_after_decimal.forEach((digit, index) => {
+ if (index !== 0) decimal_digits = `${decimal_digits}|\\d{${digit}}`;
+ });
- const symbol =
- `(${options.symbol.replace(/\W/, m => `\\${m}`)})${(options.require_symbol ? '' : '?')}`,
+ const symbol = `(${options.symbol.replace(/\W/, (m) => `\\${m}`)})${
+ options.require_symbol ? '' : '?'
+ }`,
negative = '-?',
whole_dollar_amount_without_sep = '[1-9]\\d*',
whole_dollar_amount_with_sep = `[1-9]\\d{0,2}(\\${options.thousands_separator}\\d{3})*`,
valid_whole_dollar_amounts = [
- '0', whole_dollar_amount_without_sep, whole_dollar_amount_with_sep],
+ '0',
+ whole_dollar_amount_without_sep,
+ whole_dollar_amount_with_sep,
+ ],
whole_dollar_amount = `(${valid_whole_dollar_amounts.join('|')})?`,
- decimal_amount = `(\\${options.decimal_separator}(${decimal_digits}))${options.require_decimal ? '' : '?'}`;
- let pattern = whole_dollar_amount + (options.allow_decimal || options.require_decimal ? decimal_amount : '');
+ decimal_amount = `(\\${options.decimal_separator}(${decimal_digits}))${
+ options.require_decimal ? '' : '?'
+ }`;
+ let pattern =
+ whole_dollar_amount +
+ (options.allow_decimal || options.require_decimal ? decimal_amount : '');
// default is negative sign before symbol, but there are two other options (besides parens)
if (options.allow_negatives && !options.parens_for_negatives) {
@@ -43,7 +53,12 @@ function currencyRegex(options) {
if (options.allow_negatives) {
if (options.parens_for_negatives) {
pattern = `(\\(${pattern}\\)|${pattern})`;
- } else if (!(options.negative_sign_before_digits || options.negative_sign_after_digits)) {
+ } else if (
+ !(
+ options.negative_sign_before_digits ||
+ options.negative_sign_after_digits
+ )
+ ) {
pattern = negative + pattern;
}
}
@@ -53,7 +68,6 @@ function currencyRegex(options) {
return new RegExp(`^(?!-? )(?=.*\\d)${pattern}$`);
}
-
const default_currency_options = {
symbol: '$',
require_symbol: false,
diff --git a/src/lib/isDataURI.js b/src/lib/isDataURI.js
index 506544807..f3e6ba07c 100644
--- a/src/lib/isDataURI.js
+++ b/src/lib/isDataURI.js
@@ -1,4 +1,4 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
const validMediaType = /^[a-z]+\/[a-z0-9\-\+\._]+$/i;
@@ -23,7 +23,9 @@ export default function isDataURI(str) {
}
for (let i = 0; i < attributes.length; i++) {
if (
- !(i === attributes.length - 1 && attributes[i].toLowerCase() === 'base64') &&
+ !(
+ i === attributes.length - 1 && attributes[i].toLowerCase() === 'base64'
+ ) &&
!validAttribute.test(attributes[i])
) {
return false;
diff --git a/src/lib/isDate.js b/src/lib/isDate.js
index f0b28917a..c37630396 100644
--- a/src/lib/isDate.js
+++ b/src/lib/isDate.js
@@ -1,4 +1,4 @@
-import merge from './util/merge';
+import merge from './util/merge.js';
const default_date_options = {
format: 'YYYY/MM/DD',
@@ -7,7 +7,9 @@ const default_date_options = {
};
function isValidFormat(format) {
- return /(^(y{4}|y{2})[.\/-](m{1,2})[.\/-](d{1,2})$)|(^(m{1,2})[.\/-](d{1,2})[.\/-]((y{4}|y{2})$))|(^(d{1,2})[.\/-](m{1,2})[.\/-]((y{4}|y{2})$))/gi.test(format);
+ return /(^(y{4}|y{2})[.\/-](m{1,2})[.\/-](d{1,2})$)|(^(m{1,2})[.\/-](d{1,2})[.\/-]((y{4}|y{2})$))|(^(d{1,2})[.\/-](m{1,2})[.\/-]((y{4}|y{2})$))/gi.test(
+ format
+ );
}
function zip(date, format) {
@@ -22,17 +24,19 @@ function zip(date, format) {
}
export default function isDate(input, options) {
- if (typeof options === 'string') { // Allow backward compatbility for old format isDate(input [, format])
+ if (typeof options === 'string') {
+ // Allow backward compatbility for old format isDate(input [, format])
options = merge({ format: options }, default_date_options);
} else {
options = merge(options, default_date_options);
}
if (typeof input === 'string' && isValidFormat(options.format)) {
- const formatDelimiter = options.delimiters
- .find(delimiter => options.format.indexOf(delimiter) !== -1);
+ const formatDelimiter = options.delimiters.find(
+ (delimiter) => options.format.indexOf(delimiter) !== -1
+ );
const dateDelimiter = options.strictMode
? formatDelimiter
- : options.delimiters.find(delimiter => input.indexOf(delimiter) !== -1);
+ : options.delimiters.find((delimiter) => input.indexOf(delimiter) !== -1);
const dateAndFormat = zip(
input.split(dateDelimiter),
options.format.toLowerCase().split(formatDelimiter)
@@ -77,11 +81,17 @@ export default function isDate(input, options) {
day = `0${dateObj.d}`;
}
- return new Date(`${fullYear}-${month}-${day}T00:00:00.000Z`).getUTCDate() === +dateObj.d;
+ return (
+ new Date(`${fullYear}-${month}-${day}T00:00:00.000Z`).getUTCDate() ===
+ +dateObj.d
+ );
}
if (!options.strictMode) {
- return Object.prototype.toString.call(input) === '[object Date]' && isFinite(input);
+ return (
+ Object.prototype.toString.call(input) === '[object Date]' &&
+ isFinite(input)
+ );
}
return false;
diff --git a/src/lib/isDecimal.js b/src/lib/isDecimal.js
index 488668a52..f8fb29f73 100644
--- a/src/lib/isDecimal.js
+++ b/src/lib/isDecimal.js
@@ -1,10 +1,14 @@
-import merge from './util/merge';
-import assertString from './util/assertString';
-import includes from './util/includes';
-import { decimal } from './alpha';
+import merge from './util/merge.js';
+import assertString from './util/assertString.js';
+import includes from './util/includes.js';
+import { decimal } from './alpha.js';
function decimalRegExp(options) {
- const regExp = new RegExp(`^[-+]?([0-9]+)?(\\${decimal[options.locale]}[0-9]{${options.decimal_digits}})${options.force_decimal ? '' : '?'}$`);
+ const regExp = new RegExp(
+ `^[-+]?([0-9]+)?(\\${decimal[options.locale]}[0-9]{${
+ options.decimal_digits
+ }})${options.force_decimal ? '' : '?'}$`
+ );
return regExp;
}
@@ -20,7 +24,10 @@ export default function isDecimal(str, options) {
assertString(str);
options = merge(options, default_decimal_options);
if (options.locale in decimal) {
- return !includes(blacklist, str.replace(/ /g, '')) && decimalRegExp(options).test(str);
+ return (
+ !includes(blacklist, str.replace(/ /g, '')) &&
+ decimalRegExp(options).test(str)
+ );
}
throw new Error(`Invalid locale '${options.locale}'`);
}
diff --git a/src/lib/isDivisibleBy.js b/src/lib/isDivisibleBy.js
index 2f6c65363..b418be5d1 100644
--- a/src/lib/isDivisibleBy.js
+++ b/src/lib/isDivisibleBy.js
@@ -1,5 +1,5 @@
-import assertString from './util/assertString';
-import toFloat from './toFloat';
+import assertString from './util/assertString.js';
+import toFloat from './toFloat.js';
export default function isDivisibleBy(str, num) {
assertString(str);
diff --git a/src/lib/isEAN.js b/src/lib/isEAN.js
index 968c385dd..3e00acc45 100644
--- a/src/lib/isEAN.js
+++ b/src/lib/isEAN.js
@@ -12,7 +12,7 @@
* Reference: https://www.gtin.info/
*/
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
/**
* Define EAN Lenghts; 8 for EAN-8; 13 for EAN-13; 14 for EAN-14
@@ -23,7 +23,6 @@ const LENGTH_EAN_8 = 8;
const LENGTH_EAN_14 = 14;
const validEanRegex = /^(\d{8}|\d{13}|\d{14})$/;
-
/**
* Get position weight given:
* EAN length and digit index/position
@@ -34,10 +33,10 @@ const validEanRegex = /^(\d{8}|\d{13}|\d{14})$/;
*/
function getPositionWeightThroughLengthAndIndex(length, index) {
if (length === LENGTH_EAN_8 || length === LENGTH_EAN_14) {
- return (index % 2 === 0) ? 3 : 1;
+ return index % 2 === 0 ? 3 : 1;
}
- return (index % 2 === 0) ? 1 : 3;
+ return index % 2 === 0 ? 1 : 3;
}
/**
@@ -51,7 +50,10 @@ function calculateCheckDigit(ean) {
const checksum = ean
.slice(0, -1)
.split('')
- .map((char, index) => Number(char) * getPositionWeightThroughLengthAndIndex(ean.length, index))
+ .map(
+ (char, index) =>
+ Number(char) * getPositionWeightThroughLengthAndIndex(ean.length, index)
+ )
.reduce((acc, partialSum) => acc + partialSum, 0);
const remainder = 10 - (checksum % 10);
@@ -71,5 +73,7 @@ export default function isEAN(str) {
assertString(str);
const actualCheckDigit = Number(str.slice(-1));
- return validEanRegex.test(str) && actualCheckDigit === calculateCheckDigit(str);
+ return (
+ validEanRegex.test(str) && actualCheckDigit === calculateCheckDigit(str)
+ );
}
diff --git a/src/lib/isEmail.js b/src/lib/isEmail.js
index 12938765e..4aceb4f92 100644
--- a/src/lib/isEmail.js
+++ b/src/lib/isEmail.js
@@ -1,9 +1,9 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
-import isByteLength from './isByteLength';
-import isFQDN from './isFQDN';
-import isIP from './isIP';
-import merge from './util/merge';
+import isByteLength from './isByteLength.js';
+import isFQDN from './isFQDN.js';
+import isIP from './isIP.js';
+import merge from './util/merge.js';
const default_email_options = {
allow_display_name: false,
@@ -22,9 +22,12 @@ const default_email_options = {
const splitNameAddress = /^([^\x00-\x1F\x7F-\x9F\cX]+) 0 && !options.host_whitelist.includes(lower_domain)) {
+ if (
+ options.host_whitelist.length > 0 &&
+ !options.host_whitelist.includes(lower_domain)
+ ) {
return false;
}
let user = parts.join('@');
- if (options.domain_specific_validation && (lower_domain === 'gmail.com' || lower_domain === 'googlemail.com')) {
+ if (
+ options.domain_specific_validation &&
+ (lower_domain === 'gmail.com' || lower_domain === 'googlemail.com')
+ ) {
/*
Previously we removed dots for gmail addresses before validating.
This was removed because it allows `multiple..dots@gmail.com`
@@ -133,18 +142,20 @@ export default function isEmail(str, options) {
}
}
- if (options.ignore_max_length === false && (
- !isByteLength(user, { max: 64 }) ||
- !isByteLength(domain, { max: 254 }))
+ if (
+ options.ignore_max_length === false &&
+ (!isByteLength(user, { max: 64 }) || !isByteLength(domain, { max: 254 }))
) {
return false;
}
- if (!isFQDN(domain, {
- require_tld: options.require_tld,
- ignore_max_length: options.ignore_max_length,
- allow_underscores: options.allow_underscores,
- })) {
+ if (
+ !isFQDN(domain, {
+ require_tld: options.require_tld,
+ ignore_max_length: options.ignore_max_length,
+ allow_underscores: options.allow_underscores,
+ })
+ ) {
if (!options.allow_ip_domain) {
return false;
}
@@ -164,13 +175,14 @@ export default function isEmail(str, options) {
if (user[0] === '"') {
user = user.slice(1, user.length - 1);
- return options.allow_utf8_local_part ?
- quotedEmailUserUtf8.test(user) :
- quotedEmailUser.test(user);
+ return options.allow_utf8_local_part
+ ? quotedEmailUserUtf8.test(user)
+ : quotedEmailUser.test(user);
}
- const pattern = options.allow_utf8_local_part ?
- emailUserUtf8Part : emailUserPart;
+ const pattern = options.allow_utf8_local_part
+ ? emailUserUtf8Part
+ : emailUserPart;
const user_parts = user.split('.');
for (let i = 0; i < user_parts.length; i++) {
@@ -179,7 +191,8 @@ export default function isEmail(str, options) {
}
}
if (options.blacklisted_chars) {
- if (user.search(new RegExp(`[${options.blacklisted_chars}]+`, 'g')) !== -1) return false;
+ if (user.search(new RegExp(`[${options.blacklisted_chars}]+`, 'g')) !== -1)
+ return false;
}
return true;
diff --git a/src/lib/isEmpty.js b/src/lib/isEmpty.js
index eeb5997d0..4b569f280 100644
--- a/src/lib/isEmpty.js
+++ b/src/lib/isEmpty.js
@@ -1,5 +1,5 @@
-import assertString from './util/assertString';
-import merge from './util/merge';
+import assertString from './util/assertString.js';
+import merge from './util/merge.js';
const default_is_empty_options = {
ignore_whitespace: false,
diff --git a/src/lib/isEthereumAddress.js b/src/lib/isEthereumAddress.js
index e538760bf..fb5a8c013 100644
--- a/src/lib/isEthereumAddress.js
+++ b/src/lib/isEthereumAddress.js
@@ -1,4 +1,4 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
const eth = /^(0x)[0-9a-f]{40}$/i;
diff --git a/src/lib/isFQDN.js b/src/lib/isFQDN.js
index eb6928fda..3d61aaab2 100644
--- a/src/lib/isFQDN.js
+++ b/src/lib/isFQDN.js
@@ -1,5 +1,5 @@
-import assertString from './util/assertString';
-import merge from './util/merge';
+import assertString from './util/assertString.js';
+import merge from './util/merge.js';
const default_fqdn_options = {
require_tld: true,
@@ -33,7 +33,12 @@ export default function isFQDN(str, options) {
return false;
}
- if (!options.allow_numeric_tld && !/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(tld)) {
+ if (
+ !options.allow_numeric_tld &&
+ !/^([a-z\u00A1-\u00A8\u00AA-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]{2,}|xn[a-z0-9-]{2,})$/i.test(
+ tld
+ )
+ ) {
return false;
}
diff --git a/src/lib/isFloat.js b/src/lib/isFloat.js
index 643f9729f..658c631cf 100644
--- a/src/lib/isFloat.js
+++ b/src/lib/isFloat.js
@@ -1,19 +1,25 @@
-import assertString from './util/assertString';
-import { decimal } from './alpha';
+import assertString from './util/assertString.js';
+import { decimal } from './alpha.js';
export default function isFloat(str, options) {
assertString(str);
options = options || {};
- const float = new RegExp(`^(?:[-+])?(?:[0-9]+)?(?:\\${options.locale ? decimal[options.locale] : '.'}[0-9]*)?(?:[eE][\\+\\-]?(?:[0-9]+))?$`);
+ const float = new RegExp(
+ `^(?:[-+])?(?:[0-9]+)?(?:\\${
+ options.locale ? decimal[options.locale] : '.'
+ }[0-9]*)?(?:[eE][\\+\\-]?(?:[0-9]+))?$`
+ );
if (str === '' || str === '.' || str === ',' || str === '-' || str === '+') {
return false;
}
const value = parseFloat(str.replace(',', '.'));
- return float.test(str) &&
+ return (
+ float.test(str) &&
(!options.hasOwnProperty('min') || value >= options.min) &&
(!options.hasOwnProperty('max') || value <= options.max) &&
(!options.hasOwnProperty('lt') || value < options.lt) &&
- (!options.hasOwnProperty('gt') || value > options.gt);
+ (!options.hasOwnProperty('gt') || value > options.gt)
+ );
}
export const locales = Object.keys(decimal);
diff --git a/src/lib/isFullWidth.js b/src/lib/isFullWidth.js
index a3734d11f..2610889bb 100644
--- a/src/lib/isFullWidth.js
+++ b/src/lib/isFullWidth.js
@@ -1,6 +1,7 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
-export const fullWidth = /[^\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/;
+export const fullWidth =
+ /[^\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/;
export default function isFullWidth(str) {
assertString(str);
diff --git a/src/lib/isHSL.js b/src/lib/isHSL.js
index 05cb43962..99107059e 100644
--- a/src/lib/isHSL.js
+++ b/src/lib/isHSL.js
@@ -1,15 +1,17 @@
-import assertString from './util/assertString';
-
-
-const hslComma = /^hsla?\(((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?))(deg|grad|rad|turn)?(,(\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%){2}(,((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%?))?\)$/i;
-const hslSpace = /^hsla?\(((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?))(deg|grad|rad|turn)?(\s(\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%){2}\s?(\/\s((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%?)\s?)?\)$/i;
+import assertString from './util/assertString.js';
+const hslComma =
+ /^hsla?\(((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?))(deg|grad|rad|turn)?(,(\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%){2}(,((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%?))?\)$/i;
+const hslSpace =
+ /^hsla?\(((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?))(deg|grad|rad|turn)?(\s(\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%){2}\s?(\/\s((\+|\-)?([0-9]+(\.[0-9]+)?(e(\+|\-)?[0-9]+)?|\.[0-9]+(e(\+|\-)?[0-9]+)?)%?)\s?)?\)$/i;
export default function isHSL(str) {
assertString(str);
// Strip duplicate spaces before calling the validation regex (See #1598 for more info)
- const strippedStr = str.replace(/\s+/g, ' ').replace(/\s?(hsla?\(|\)|,)\s?/ig, '$1');
+ const strippedStr = str
+ .replace(/\s+/g, ' ')
+ .replace(/\s?(hsla?\(|\)|,)\s?/gi, '$1');
if (strippedStr.indexOf(',') !== -1) {
return hslComma.test(strippedStr);
diff --git a/src/lib/isHalfWidth.js b/src/lib/isHalfWidth.js
index b6ace42fc..55da08488 100644
--- a/src/lib/isHalfWidth.js
+++ b/src/lib/isHalfWidth.js
@@ -1,6 +1,7 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
-export const halfWidth = /[\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/;
+export const halfWidth =
+ /[\u0020-\u007E\uFF61-\uFF9F\uFFA0-\uFFDC\uFFE8-\uFFEE0-9a-zA-Z]/;
export default function isHalfWidth(str) {
assertString(str);
diff --git a/src/lib/isHash.js b/src/lib/isHash.js
index 6efe7c035..83dea6101 100644
--- a/src/lib/isHash.js
+++ b/src/lib/isHash.js
@@ -1,4 +1,4 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
const lengths = {
md5: 32,
diff --git a/src/lib/isHexColor.js b/src/lib/isHexColor.js
index 21a037504..747bd20c4 100644
--- a/src/lib/isHexColor.js
+++ b/src/lib/isHexColor.js
@@ -1,4 +1,4 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
const hexcolor = /^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;
diff --git a/src/lib/isHexadecimal.js b/src/lib/isHexadecimal.js
index 19adb077a..556aec3d7 100644
--- a/src/lib/isHexadecimal.js
+++ b/src/lib/isHexadecimal.js
@@ -1,4 +1,4 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
const hexadecimal = /^(0x|0h)?[0-9A-F]+$/i;
diff --git a/src/lib/isIBAN.js b/src/lib/isIBAN.js
index dd226b1da..1047068d8 100644
--- a/src/lib/isIBAN.js
+++ b/src/lib/isIBAN.js
@@ -1,4 +1,4 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
/**
* List of country codes with
@@ -96,8 +96,9 @@ const ibanRegexThroughCountryCode = {
*/
function hasOnlyValidCountryCodes(countryCodeArray) {
- const countryCodeArrayFilteredWithObjectIbanCode = countryCodeArray
- .filter(countryCode => !(countryCode in ibanRegexThroughCountryCode));
+ const countryCodeArrayFilteredWithObjectIbanCode = countryCodeArray.filter(
+ (countryCode) => !(countryCode in ibanRegexThroughCountryCode)
+ );
if (countryCodeArrayFilteredWithObjectIbanCode.length > 0) {
return false;
@@ -123,14 +124,16 @@ function hasValidIbanFormat(str, options) {
const strippedStr = str.replace(/[\s\-]+/gi, '').toUpperCase();
const isoCountryCode = strippedStr.slice(0, 2).toUpperCase();
- const isoCountryCodeInIbanRegexCodeObject = isoCountryCode in ibanRegexThroughCountryCode;
+ const isoCountryCodeInIbanRegexCodeObject =
+ isoCountryCode in ibanRegexThroughCountryCode;
if (options.whitelist) {
if (!hasOnlyValidCountryCodes(options.whitelist)) {
return false;
}
- const isoCountryCodeInWhiteList = options.whitelist.includes(isoCountryCode);
+ const isoCountryCodeInWhiteList =
+ options.whitelist.includes(isoCountryCode);
if (!isoCountryCodeInWhiteList) {
return false;
@@ -138,36 +141,43 @@ function hasValidIbanFormat(str, options) {
}
if (options.blacklist) {
- const isoCountryCodeInBlackList = options.blacklist.includes(isoCountryCode);
+ const isoCountryCodeInBlackList =
+ options.blacklist.includes(isoCountryCode);
if (isoCountryCodeInBlackList) {
return false;
}
}
- return (isoCountryCodeInIbanRegexCodeObject) &&
- ibanRegexThroughCountryCode[isoCountryCode].test(strippedStr);
+ return (
+ isoCountryCodeInIbanRegexCodeObject &&
+ ibanRegexThroughCountryCode[isoCountryCode].test(strippedStr)
+ );
}
/**
- * Check whether string has valid IBAN Checksum
- * by performing basic mod-97 operation and
- * the remainder should equal 1
- * -- Start by rearranging the IBAN by moving the four initial characters to the end of the string
- * -- Replace each letter in the string with two digits, A -> 10, B = 11, Z = 35
- * -- Interpret the string as a decimal integer and
- * -- compute the remainder on division by 97 (mod 97)
- * Reference: https://en.wikipedia.org/wiki/International_Bank_Account_Number
- *
- * @param {string} str
- * @return {boolean}
- */
+ * Check whether string has valid IBAN Checksum
+ * by performing basic mod-97 operation and
+ * the remainder should equal 1
+ * -- Start by rearranging the IBAN by moving the four initial characters to the end of the string
+ * -- Replace each letter in the string with two digits, A -> 10, B = 11, Z = 35
+ * -- Interpret the string as a decimal integer and
+ * -- compute the remainder on division by 97 (mod 97)
+ * Reference: https://en.wikipedia.org/wiki/International_Bank_Account_Number
+ *
+ * @param {string} str
+ * @return {boolean}
+ */
function hasValidIbanChecksum(str) {
const strippedStr = str.replace(/[^A-Z0-9]+/gi, '').toUpperCase(); // Keep only digits and A-Z latin alphabetic
const rearranged = strippedStr.slice(4) + strippedStr.slice(0, 4);
- const alphaCapsReplacedWithDigits = rearranged.replace(/[A-Z]/g, char => char.charCodeAt(0) - 55);
+ const alphaCapsReplacedWithDigits = rearranged.replace(
+ /[A-Z]/g,
+ (char) => char.charCodeAt(0) - 55
+ );
- const remainder = alphaCapsReplacedWithDigits.match(/\d{1,7}/g)
+ const remainder = alphaCapsReplacedWithDigits
+ .match(/\d{1,7}/g)
.reduce((acc, value) => Number(acc + value) % 97, '');
return remainder === 1;
diff --git a/src/lib/isIMEI.js b/src/lib/isIMEI.js
index fb97d4924..04385795a 100644
--- a/src/lib/isIMEI.js
+++ b/src/lib/isIMEI.js
@@ -1,10 +1,8 @@
-import assertString from './util/assertString';
-
+import assertString from './util/assertString.js';
let imeiRegexWithoutHypens = /^[0-9]{15}$/;
let imeiRegexWithHypens = /^\d{2}-\d{6}-\d{6}-\d{1}$/;
-
export default function isIMEI(str, options) {
assertString(str);
options = options || {};
@@ -17,7 +15,6 @@ export default function isIMEI(str, options) {
imeiRegex = imeiRegexWithHypens;
}
-
if (!imeiRegex.test(str)) {
return false;
}
@@ -42,7 +39,7 @@ export default function isIMEI(str, options) {
mul -= 1;
}
}
- const chk = ((10 - (sum % 10)) % 10);
+ const chk = (10 - (sum % 10)) % 10;
if (chk !== parseInt(str.substring(14, 15), 10)) {
return false;
}
diff --git a/src/lib/isIP.js b/src/lib/isIP.js
index 40ca19aec..15038d865 100644
--- a/src/lib/isIP.js
+++ b/src/lib/isIP.js
@@ -1,4 +1,4 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
/**
11.3. Examples
@@ -28,21 +28,24 @@ import assertString from './util/assertString';
where the interface "ne0" belongs to the 1st link, "pvc1.3" belongs
to the 5th link, and "interface10" belongs to the 10th organization.
* * */
-const IPv4SegmentFormat = '(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])';
+const IPv4SegmentFormat =
+ '(?:[0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])';
const IPv4AddressFormat = `(${IPv4SegmentFormat}[.]){3}${IPv4SegmentFormat}`;
const IPv4AddressRegExp = new RegExp(`^${IPv4AddressFormat}$`);
const IPv6SegmentFormat = '(?:[0-9a-fA-F]{1,4})';
-const IPv6AddressRegExp = new RegExp('^(' +
- `(?:${IPv6SegmentFormat}:){7}(?:${IPv6SegmentFormat}|:)|` +
- `(?:${IPv6SegmentFormat}:){6}(?:${IPv4AddressFormat}|:${IPv6SegmentFormat}|:)|` +
- `(?:${IPv6SegmentFormat}:){5}(?::${IPv4AddressFormat}|(:${IPv6SegmentFormat}){1,2}|:)|` +
- `(?:${IPv6SegmentFormat}:){4}(?:(:${IPv6SegmentFormat}){0,1}:${IPv4AddressFormat}|(:${IPv6SegmentFormat}){1,3}|:)|` +
- `(?:${IPv6SegmentFormat}:){3}(?:(:${IPv6SegmentFormat}){0,2}:${IPv4AddressFormat}|(:${IPv6SegmentFormat}){1,4}|:)|` +
- `(?:${IPv6SegmentFormat}:){2}(?:(:${IPv6SegmentFormat}){0,3}:${IPv4AddressFormat}|(:${IPv6SegmentFormat}){1,5}|:)|` +
- `(?:${IPv6SegmentFormat}:){1}(?:(:${IPv6SegmentFormat}){0,4}:${IPv4AddressFormat}|(:${IPv6SegmentFormat}){1,6}|:)|` +
- `(?::((?::${IPv6SegmentFormat}){0,5}:${IPv4AddressFormat}|(?::${IPv6SegmentFormat}){1,7}|:))` +
- ')(%[0-9a-zA-Z-.:]{1,})?$');
+const IPv6AddressRegExp = new RegExp(
+ '^(' +
+ `(?:${IPv6SegmentFormat}:){7}(?:${IPv6SegmentFormat}|:)|` +
+ `(?:${IPv6SegmentFormat}:){6}(?:${IPv4AddressFormat}|:${IPv6SegmentFormat}|:)|` +
+ `(?:${IPv6SegmentFormat}:){5}(?::${IPv4AddressFormat}|(:${IPv6SegmentFormat}){1,2}|:)|` +
+ `(?:${IPv6SegmentFormat}:){4}(?:(:${IPv6SegmentFormat}){0,1}:${IPv4AddressFormat}|(:${IPv6SegmentFormat}){1,3}|:)|` +
+ `(?:${IPv6SegmentFormat}:){3}(?:(:${IPv6SegmentFormat}){0,2}:${IPv4AddressFormat}|(:${IPv6SegmentFormat}){1,4}|:)|` +
+ `(?:${IPv6SegmentFormat}:){2}(?:(:${IPv6SegmentFormat}){0,3}:${IPv4AddressFormat}|(:${IPv6SegmentFormat}){1,5}|:)|` +
+ `(?:${IPv6SegmentFormat}:){1}(?:(:${IPv6SegmentFormat}){0,4}:${IPv4AddressFormat}|(:${IPv6SegmentFormat}){1,6}|:)|` +
+ `(?::((?::${IPv6SegmentFormat}){0,5}:${IPv4AddressFormat}|(?::${IPv6SegmentFormat}){1,7}|:))` +
+ ')(%[0-9a-zA-Z-.:]{1,})?$'
+);
export default function isIP(str, version = '') {
assertString(str);
diff --git a/src/lib/isIPRange.js b/src/lib/isIPRange.js
index 5bb6916c5..49755a5f0 100644
--- a/src/lib/isIPRange.js
+++ b/src/lib/isIPRange.js
@@ -1,5 +1,5 @@
-import assertString from './util/assertString';
-import isIP from './isIP';
+import assertString from './util/assertString.js';
+import isIP from './isIP.js';
const subnetMaybe = /^\d{1,3}$/;
const v4Subnet = 32;
diff --git a/src/lib/isISBN.js b/src/lib/isISBN.js
index 4499c59a0..dac00d5fa 100644
--- a/src/lib/isISBN.js
+++ b/src/lib/isISBN.js
@@ -1,4 +1,4 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
const possibleIsbn10 = /^(?:[0-9]{9}X|[0-9]{10})$/;
const possibleIsbn13 = /^(?:[0-9]{13})$/;
@@ -34,7 +34,7 @@ export default function isISBN(isbn, options) {
checksum += 10 * sanitizedIsbn.charAt(9);
}
- if ((checksum % 11) === 0) {
+ if (checksum % 11 === 0) {
return true;
}
} else if (version === '13') {
diff --git a/src/lib/isISIN.js b/src/lib/isISIN.js
index a6f6fa645..b2fede37b 100644
--- a/src/lib/isISIN.js
+++ b/src/lib/isISIN.js
@@ -1,4 +1,4 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
const isin = /^[A-Z]{2}[0-9A-Z]{9}[0-9]$/;
@@ -28,7 +28,7 @@ export default function isISIN(str) {
for (const digit of [lo, hi]) {
if (double) {
if (digit >= 5) {
- sum += 1 + ((digit - 5) * 2);
+ sum += 1 + (digit - 5) * 2;
} else {
sum += digit * 2;
}
@@ -41,7 +41,7 @@ export default function isISIN(str) {
const digit = str[i].charCodeAt(0) - '0'.charCodeAt(0);
if (double) {
if (digit >= 5) {
- sum += 1 + ((digit - 5) * 2);
+ sum += 1 + (digit - 5) * 2;
} else {
sum += digit * 2;
}
@@ -52,7 +52,7 @@ export default function isISIN(str) {
}
}
- const check = (Math.trunc(((sum + 9) / 10)) * 10) - sum;
+ const check = Math.trunc((sum + 9) / 10) * 10 - sum;
return +str[str.length - 1] === check;
}
diff --git a/src/lib/isISO31661Alpha2.js b/src/lib/isISO31661Alpha2.js
index e67bb1e15..05f0d3adc 100644
--- a/src/lib/isISO31661Alpha2.js
+++ b/src/lib/isISO31661Alpha2.js
@@ -1,32 +1,256 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
// from https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
const validISO31661Alpha2CountriesCodes = new Set([
- 'AD', 'AE', 'AF', 'AG', 'AI', 'AL', 'AM', 'AO', 'AQ', 'AR', 'AS', 'AT', 'AU', 'AW', 'AX', 'AZ',
- 'BA', 'BB', 'BD', 'BE', 'BF', 'BG', 'BH', 'BI', 'BJ', 'BL', 'BM', 'BN', 'BO', 'BQ', 'BR', 'BS', 'BT', 'BV', 'BW', 'BY', 'BZ',
- 'CA', 'CC', 'CD', 'CF', 'CG', 'CH', 'CI', 'CK', 'CL', 'CM', 'CN', 'CO', 'CR', 'CU', 'CV', 'CW', 'CX', 'CY', 'CZ',
- 'DE', 'DJ', 'DK', 'DM', 'DO', 'DZ',
- 'EC', 'EE', 'EG', 'EH', 'ER', 'ES', 'ET',
- 'FI', 'FJ', 'FK', 'FM', 'FO', 'FR',
- 'GA', 'GB', 'GD', 'GE', 'GF', 'GG', 'GH', 'GI', 'GL', 'GM', 'GN', 'GP', 'GQ', 'GR', 'GS', 'GT', 'GU', 'GW', 'GY',
- 'HK', 'HM', 'HN', 'HR', 'HT', 'HU',
- 'ID', 'IE', 'IL', 'IM', 'IN', 'IO', 'IQ', 'IR', 'IS', 'IT',
- 'JE', 'JM', 'JO', 'JP',
- 'KE', 'KG', 'KH', 'KI', 'KM', 'KN', 'KP', 'KR', 'KW', 'KY', 'KZ',
- 'LA', 'LB', 'LC', 'LI', 'LK', 'LR', 'LS', 'LT', 'LU', 'LV', 'LY',
- 'MA', 'MC', 'MD', 'ME', 'MF', 'MG', 'MH', 'MK', 'ML', 'MM', 'MN', 'MO', 'MP', 'MQ', 'MR', 'MS', 'MT', 'MU', 'MV', 'MW', 'MX', 'MY', 'MZ',
- 'NA', 'NC', 'NE', 'NF', 'NG', 'NI', 'NL', 'NO', 'NP', 'NR', 'NU', 'NZ',
+ 'AD',
+ 'AE',
+ 'AF',
+ 'AG',
+ 'AI',
+ 'AL',
+ 'AM',
+ 'AO',
+ 'AQ',
+ 'AR',
+ 'AS',
+ 'AT',
+ 'AU',
+ 'AW',
+ 'AX',
+ 'AZ',
+ 'BA',
+ 'BB',
+ 'BD',
+ 'BE',
+ 'BF',
+ 'BG',
+ 'BH',
+ 'BI',
+ 'BJ',
+ 'BL',
+ 'BM',
+ 'BN',
+ 'BO',
+ 'BQ',
+ 'BR',
+ 'BS',
+ 'BT',
+ 'BV',
+ 'BW',
+ 'BY',
+ 'BZ',
+ 'CA',
+ 'CC',
+ 'CD',
+ 'CF',
+ 'CG',
+ 'CH',
+ 'CI',
+ 'CK',
+ 'CL',
+ 'CM',
+ 'CN',
+ 'CO',
+ 'CR',
+ 'CU',
+ 'CV',
+ 'CW',
+ 'CX',
+ 'CY',
+ 'CZ',
+ 'DE',
+ 'DJ',
+ 'DK',
+ 'DM',
+ 'DO',
+ 'DZ',
+ 'EC',
+ 'EE',
+ 'EG',
+ 'EH',
+ 'ER',
+ 'ES',
+ 'ET',
+ 'FI',
+ 'FJ',
+ 'FK',
+ 'FM',
+ 'FO',
+ 'FR',
+ 'GA',
+ 'GB',
+ 'GD',
+ 'GE',
+ 'GF',
+ 'GG',
+ 'GH',
+ 'GI',
+ 'GL',
+ 'GM',
+ 'GN',
+ 'GP',
+ 'GQ',
+ 'GR',
+ 'GS',
+ 'GT',
+ 'GU',
+ 'GW',
+ 'GY',
+ 'HK',
+ 'HM',
+ 'HN',
+ 'HR',
+ 'HT',
+ 'HU',
+ 'ID',
+ 'IE',
+ 'IL',
+ 'IM',
+ 'IN',
+ 'IO',
+ 'IQ',
+ 'IR',
+ 'IS',
+ 'IT',
+ 'JE',
+ 'JM',
+ 'JO',
+ 'JP',
+ 'KE',
+ 'KG',
+ 'KH',
+ 'KI',
+ 'KM',
+ 'KN',
+ 'KP',
+ 'KR',
+ 'KW',
+ 'KY',
+ 'KZ',
+ 'LA',
+ 'LB',
+ 'LC',
+ 'LI',
+ 'LK',
+ 'LR',
+ 'LS',
+ 'LT',
+ 'LU',
+ 'LV',
+ 'LY',
+ 'MA',
+ 'MC',
+ 'MD',
+ 'ME',
+ 'MF',
+ 'MG',
+ 'MH',
+ 'MK',
+ 'ML',
+ 'MM',
+ 'MN',
+ 'MO',
+ 'MP',
+ 'MQ',
+ 'MR',
+ 'MS',
+ 'MT',
+ 'MU',
+ 'MV',
+ 'MW',
+ 'MX',
+ 'MY',
+ 'MZ',
+ 'NA',
+ 'NC',
+ 'NE',
+ 'NF',
+ 'NG',
+ 'NI',
+ 'NL',
+ 'NO',
+ 'NP',
+ 'NR',
+ 'NU',
+ 'NZ',
'OM',
- 'PA', 'PE', 'PF', 'PG', 'PH', 'PK', 'PL', 'PM', 'PN', 'PR', 'PS', 'PT', 'PW', 'PY',
+ 'PA',
+ 'PE',
+ 'PF',
+ 'PG',
+ 'PH',
+ 'PK',
+ 'PL',
+ 'PM',
+ 'PN',
+ 'PR',
+ 'PS',
+ 'PT',
+ 'PW',
+ 'PY',
'QA',
- 'RE', 'RO', 'RS', 'RU', 'RW',
- 'SA', 'SB', 'SC', 'SD', 'SE', 'SG', 'SH', 'SI', 'SJ', 'SK', 'SL', 'SM', 'SN', 'SO', 'SR', 'SS', 'ST', 'SV', 'SX', 'SY', 'SZ',
- 'TC', 'TD', 'TF', 'TG', 'TH', 'TJ', 'TK', 'TL', 'TM', 'TN', 'TO', 'TR', 'TT', 'TV', 'TW', 'TZ',
- 'UA', 'UG', 'UM', 'US', 'UY', 'UZ',
- 'VA', 'VC', 'VE', 'VG', 'VI', 'VN', 'VU',
- 'WF', 'WS',
- 'YE', 'YT',
- 'ZA', 'ZM', 'ZW',
+ 'RE',
+ 'RO',
+ 'RS',
+ 'RU',
+ 'RW',
+ 'SA',
+ 'SB',
+ 'SC',
+ 'SD',
+ 'SE',
+ 'SG',
+ 'SH',
+ 'SI',
+ 'SJ',
+ 'SK',
+ 'SL',
+ 'SM',
+ 'SN',
+ 'SO',
+ 'SR',
+ 'SS',
+ 'ST',
+ 'SV',
+ 'SX',
+ 'SY',
+ 'SZ',
+ 'TC',
+ 'TD',
+ 'TF',
+ 'TG',
+ 'TH',
+ 'TJ',
+ 'TK',
+ 'TL',
+ 'TM',
+ 'TN',
+ 'TO',
+ 'TR',
+ 'TT',
+ 'TV',
+ 'TW',
+ 'TZ',
+ 'UA',
+ 'UG',
+ 'UM',
+ 'US',
+ 'UY',
+ 'UZ',
+ 'VA',
+ 'VC',
+ 'VE',
+ 'VG',
+ 'VI',
+ 'VN',
+ 'VU',
+ 'WF',
+ 'WS',
+ 'YE',
+ 'YT',
+ 'ZA',
+ 'ZM',
+ 'ZW',
]);
export default function isISO31661Alpha2(str) {
diff --git a/src/lib/isISO31661Alpha3.js b/src/lib/isISO31661Alpha3.js
index 34e552cdd..36bc8d282 100644
--- a/src/lib/isISO31661Alpha3.js
+++ b/src/lib/isISO31661Alpha3.js
@@ -1,23 +1,256 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
// from https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3
const validISO31661Alpha3CountriesCodes = new Set([
- 'AFG', 'ALA', 'ALB', 'DZA', 'ASM', 'AND', 'AGO', 'AIA', 'ATA', 'ATG', 'ARG', 'ARM', 'ABW', 'AUS', 'AUT', 'AZE',
- 'BHS', 'BHR', 'BGD', 'BRB', 'BLR', 'BEL', 'BLZ', 'BEN', 'BMU', 'BTN', 'BOL', 'BES', 'BIH', 'BWA', 'BVT', 'BRA',
- 'IOT', 'BRN', 'BGR', 'BFA', 'BDI', 'KHM', 'CMR', 'CAN', 'CPV', 'CYM', 'CAF', 'TCD', 'CHL', 'CHN', 'CXR', 'CCK',
- 'COL', 'COM', 'COG', 'COD', 'COK', 'CRI', 'CIV', 'HRV', 'CUB', 'CUW', 'CYP', 'CZE', 'DNK', 'DJI', 'DMA', 'DOM',
- 'ECU', 'EGY', 'SLV', 'GNQ', 'ERI', 'EST', 'ETH', 'FLK', 'FRO', 'FJI', 'FIN', 'FRA', 'GUF', 'PYF', 'ATF', 'GAB',
- 'GMB', 'GEO', 'DEU', 'GHA', 'GIB', 'GRC', 'GRL', 'GRD', 'GLP', 'GUM', 'GTM', 'GGY', 'GIN', 'GNB', 'GUY', 'HTI',
- 'HMD', 'VAT', 'HND', 'HKG', 'HUN', 'ISL', 'IND', 'IDN', 'IRN', 'IRQ', 'IRL', 'IMN', 'ISR', 'ITA', 'JAM', 'JPN',
- 'JEY', 'JOR', 'KAZ', 'KEN', 'KIR', 'PRK', 'KOR', 'KWT', 'KGZ', 'LAO', 'LVA', 'LBN', 'LSO', 'LBR', 'LBY', 'LIE',
- 'LTU', 'LUX', 'MAC', 'MKD', 'MDG', 'MWI', 'MYS', 'MDV', 'MLI', 'MLT', 'MHL', 'MTQ', 'MRT', 'MUS', 'MYT', 'MEX',
- 'FSM', 'MDA', 'MCO', 'MNG', 'MNE', 'MSR', 'MAR', 'MOZ', 'MMR', 'NAM', 'NRU', 'NPL', 'NLD', 'NCL', 'NZL', 'NIC',
- 'NER', 'NGA', 'NIU', 'NFK', 'MNP', 'NOR', 'OMN', 'PAK', 'PLW', 'PSE', 'PAN', 'PNG', 'PRY', 'PER', 'PHL', 'PCN',
- 'POL', 'PRT', 'PRI', 'QAT', 'REU', 'ROU', 'RUS', 'RWA', 'BLM', 'SHN', 'KNA', 'LCA', 'MAF', 'SPM', 'VCT', 'WSM',
- 'SMR', 'STP', 'SAU', 'SEN', 'SRB', 'SYC', 'SLE', 'SGP', 'SXM', 'SVK', 'SVN', 'SLB', 'SOM', 'ZAF', 'SGS', 'SSD',
- 'ESP', 'LKA', 'SDN', 'SUR', 'SJM', 'SWZ', 'SWE', 'CHE', 'SYR', 'TWN', 'TJK', 'TZA', 'THA', 'TLS', 'TGO', 'TKL',
- 'TON', 'TTO', 'TUN', 'TUR', 'TKM', 'TCA', 'TUV', 'UGA', 'UKR', 'ARE', 'GBR', 'USA', 'UMI', 'URY', 'UZB', 'VUT',
- 'VEN', 'VNM', 'VGB', 'VIR', 'WLF', 'ESH', 'YEM', 'ZMB', 'ZWE',
+ 'AFG',
+ 'ALA',
+ 'ALB',
+ 'DZA',
+ 'ASM',
+ 'AND',
+ 'AGO',
+ 'AIA',
+ 'ATA',
+ 'ATG',
+ 'ARG',
+ 'ARM',
+ 'ABW',
+ 'AUS',
+ 'AUT',
+ 'AZE',
+ 'BHS',
+ 'BHR',
+ 'BGD',
+ 'BRB',
+ 'BLR',
+ 'BEL',
+ 'BLZ',
+ 'BEN',
+ 'BMU',
+ 'BTN',
+ 'BOL',
+ 'BES',
+ 'BIH',
+ 'BWA',
+ 'BVT',
+ 'BRA',
+ 'IOT',
+ 'BRN',
+ 'BGR',
+ 'BFA',
+ 'BDI',
+ 'KHM',
+ 'CMR',
+ 'CAN',
+ 'CPV',
+ 'CYM',
+ 'CAF',
+ 'TCD',
+ 'CHL',
+ 'CHN',
+ 'CXR',
+ 'CCK',
+ 'COL',
+ 'COM',
+ 'COG',
+ 'COD',
+ 'COK',
+ 'CRI',
+ 'CIV',
+ 'HRV',
+ 'CUB',
+ 'CUW',
+ 'CYP',
+ 'CZE',
+ 'DNK',
+ 'DJI',
+ 'DMA',
+ 'DOM',
+ 'ECU',
+ 'EGY',
+ 'SLV',
+ 'GNQ',
+ 'ERI',
+ 'EST',
+ 'ETH',
+ 'FLK',
+ 'FRO',
+ 'FJI',
+ 'FIN',
+ 'FRA',
+ 'GUF',
+ 'PYF',
+ 'ATF',
+ 'GAB',
+ 'GMB',
+ 'GEO',
+ 'DEU',
+ 'GHA',
+ 'GIB',
+ 'GRC',
+ 'GRL',
+ 'GRD',
+ 'GLP',
+ 'GUM',
+ 'GTM',
+ 'GGY',
+ 'GIN',
+ 'GNB',
+ 'GUY',
+ 'HTI',
+ 'HMD',
+ 'VAT',
+ 'HND',
+ 'HKG',
+ 'HUN',
+ 'ISL',
+ 'IND',
+ 'IDN',
+ 'IRN',
+ 'IRQ',
+ 'IRL',
+ 'IMN',
+ 'ISR',
+ 'ITA',
+ 'JAM',
+ 'JPN',
+ 'JEY',
+ 'JOR',
+ 'KAZ',
+ 'KEN',
+ 'KIR',
+ 'PRK',
+ 'KOR',
+ 'KWT',
+ 'KGZ',
+ 'LAO',
+ 'LVA',
+ 'LBN',
+ 'LSO',
+ 'LBR',
+ 'LBY',
+ 'LIE',
+ 'LTU',
+ 'LUX',
+ 'MAC',
+ 'MKD',
+ 'MDG',
+ 'MWI',
+ 'MYS',
+ 'MDV',
+ 'MLI',
+ 'MLT',
+ 'MHL',
+ 'MTQ',
+ 'MRT',
+ 'MUS',
+ 'MYT',
+ 'MEX',
+ 'FSM',
+ 'MDA',
+ 'MCO',
+ 'MNG',
+ 'MNE',
+ 'MSR',
+ 'MAR',
+ 'MOZ',
+ 'MMR',
+ 'NAM',
+ 'NRU',
+ 'NPL',
+ 'NLD',
+ 'NCL',
+ 'NZL',
+ 'NIC',
+ 'NER',
+ 'NGA',
+ 'NIU',
+ 'NFK',
+ 'MNP',
+ 'NOR',
+ 'OMN',
+ 'PAK',
+ 'PLW',
+ 'PSE',
+ 'PAN',
+ 'PNG',
+ 'PRY',
+ 'PER',
+ 'PHL',
+ 'PCN',
+ 'POL',
+ 'PRT',
+ 'PRI',
+ 'QAT',
+ 'REU',
+ 'ROU',
+ 'RUS',
+ 'RWA',
+ 'BLM',
+ 'SHN',
+ 'KNA',
+ 'LCA',
+ 'MAF',
+ 'SPM',
+ 'VCT',
+ 'WSM',
+ 'SMR',
+ 'STP',
+ 'SAU',
+ 'SEN',
+ 'SRB',
+ 'SYC',
+ 'SLE',
+ 'SGP',
+ 'SXM',
+ 'SVK',
+ 'SVN',
+ 'SLB',
+ 'SOM',
+ 'ZAF',
+ 'SGS',
+ 'SSD',
+ 'ESP',
+ 'LKA',
+ 'SDN',
+ 'SUR',
+ 'SJM',
+ 'SWZ',
+ 'SWE',
+ 'CHE',
+ 'SYR',
+ 'TWN',
+ 'TJK',
+ 'TZA',
+ 'THA',
+ 'TLS',
+ 'TGO',
+ 'TKL',
+ 'TON',
+ 'TTO',
+ 'TUN',
+ 'TUR',
+ 'TKM',
+ 'TCA',
+ 'TUV',
+ 'UGA',
+ 'UKR',
+ 'ARE',
+ 'GBR',
+ 'USA',
+ 'UMI',
+ 'URY',
+ 'UZB',
+ 'VUT',
+ 'VEN',
+ 'VNM',
+ 'VGB',
+ 'VIR',
+ 'WLF',
+ 'ESH',
+ 'YEM',
+ 'ZMB',
+ 'ZWE',
]);
export default function isISO31661Alpha3(str) {
diff --git a/src/lib/isISO4217.js b/src/lib/isISO4217.js
index 0738614c9..3bc581dfe 100644
--- a/src/lib/isISO4217.js
+++ b/src/lib/isISO4217.js
@@ -1,33 +1,186 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
// from https://en.wikipedia.org/wiki/ISO_4217
const validISO4217CurrencyCodes = new Set([
- 'AED', 'AFN', 'ALL', 'AMD', 'ANG', 'AOA', 'ARS', 'AUD', 'AWG', 'AZN',
- 'BAM', 'BBD', 'BDT', 'BGN', 'BHD', 'BIF', 'BMD', 'BND', 'BOB', 'BOV', 'BRL', 'BSD', 'BTN', 'BWP', 'BYN', 'BZD',
- 'CAD', 'CDF', 'CHE', 'CHF', 'CHW', 'CLF', 'CLP', 'CNY', 'COP', 'COU', 'CRC', 'CUC', 'CUP', 'CVE', 'CZK',
- 'DJF', 'DKK', 'DOP', 'DZD',
- 'EGP', 'ERN', 'ETB', 'EUR',
- 'FJD', 'FKP',
- 'GBP', 'GEL', 'GHS', 'GIP', 'GMD', 'GNF', 'GTQ', 'GYD',
- 'HKD', 'HNL', 'HRK', 'HTG', 'HUF',
- 'IDR', 'ILS', 'INR', 'IQD', 'IRR', 'ISK',
- 'JMD', 'JOD', 'JPY',
- 'KES', 'KGS', 'KHR', 'KMF', 'KPW', 'KRW', 'KWD', 'KYD', 'KZT',
- 'LAK', 'LBP', 'LKR', 'LRD', 'LSL', 'LYD',
- 'MAD', 'MDL', 'MGA', 'MKD', 'MMK', 'MNT', 'MOP', 'MRU', 'MUR', 'MVR', 'MWK', 'MXN', 'MXV', 'MYR', 'MZN',
- 'NAD', 'NGN', 'NIO', 'NOK', 'NPR', 'NZD',
+ 'AED',
+ 'AFN',
+ 'ALL',
+ 'AMD',
+ 'ANG',
+ 'AOA',
+ 'ARS',
+ 'AUD',
+ 'AWG',
+ 'AZN',
+ 'BAM',
+ 'BBD',
+ 'BDT',
+ 'BGN',
+ 'BHD',
+ 'BIF',
+ 'BMD',
+ 'BND',
+ 'BOB',
+ 'BOV',
+ 'BRL',
+ 'BSD',
+ 'BTN',
+ 'BWP',
+ 'BYN',
+ 'BZD',
+ 'CAD',
+ 'CDF',
+ 'CHE',
+ 'CHF',
+ 'CHW',
+ 'CLF',
+ 'CLP',
+ 'CNY',
+ 'COP',
+ 'COU',
+ 'CRC',
+ 'CUC',
+ 'CUP',
+ 'CVE',
+ 'CZK',
+ 'DJF',
+ 'DKK',
+ 'DOP',
+ 'DZD',
+ 'EGP',
+ 'ERN',
+ 'ETB',
+ 'EUR',
+ 'FJD',
+ 'FKP',
+ 'GBP',
+ 'GEL',
+ 'GHS',
+ 'GIP',
+ 'GMD',
+ 'GNF',
+ 'GTQ',
+ 'GYD',
+ 'HKD',
+ 'HNL',
+ 'HRK',
+ 'HTG',
+ 'HUF',
+ 'IDR',
+ 'ILS',
+ 'INR',
+ 'IQD',
+ 'IRR',
+ 'ISK',
+ 'JMD',
+ 'JOD',
+ 'JPY',
+ 'KES',
+ 'KGS',
+ 'KHR',
+ 'KMF',
+ 'KPW',
+ 'KRW',
+ 'KWD',
+ 'KYD',
+ 'KZT',
+ 'LAK',
+ 'LBP',
+ 'LKR',
+ 'LRD',
+ 'LSL',
+ 'LYD',
+ 'MAD',
+ 'MDL',
+ 'MGA',
+ 'MKD',
+ 'MMK',
+ 'MNT',
+ 'MOP',
+ 'MRU',
+ 'MUR',
+ 'MVR',
+ 'MWK',
+ 'MXN',
+ 'MXV',
+ 'MYR',
+ 'MZN',
+ 'NAD',
+ 'NGN',
+ 'NIO',
+ 'NOK',
+ 'NPR',
+ 'NZD',
'OMR',
- 'PAB', 'PEN', 'PGK', 'PHP', 'PKR', 'PLN', 'PYG',
+ 'PAB',
+ 'PEN',
+ 'PGK',
+ 'PHP',
+ 'PKR',
+ 'PLN',
+ 'PYG',
'QAR',
- 'RON', 'RSD', 'RUB', 'RWF',
- 'SAR', 'SBD', 'SCR', 'SDG', 'SEK', 'SGD', 'SHP', 'SLL', 'SOS', 'SRD', 'SSP', 'STN', 'SVC', 'SYP', 'SZL',
- 'THB', 'TJS', 'TMT', 'TND', 'TOP', 'TRY', 'TTD', 'TWD', 'TZS',
- 'UAH', 'UGX', 'USD', 'USN', 'UYI', 'UYU', 'UYW', 'UZS',
- 'VES', 'VND', 'VUV',
+ 'RON',
+ 'RSD',
+ 'RUB',
+ 'RWF',
+ 'SAR',
+ 'SBD',
+ 'SCR',
+ 'SDG',
+ 'SEK',
+ 'SGD',
+ 'SHP',
+ 'SLL',
+ 'SOS',
+ 'SRD',
+ 'SSP',
+ 'STN',
+ 'SVC',
+ 'SYP',
+ 'SZL',
+ 'THB',
+ 'TJS',
+ 'TMT',
+ 'TND',
+ 'TOP',
+ 'TRY',
+ 'TTD',
+ 'TWD',
+ 'TZS',
+ 'UAH',
+ 'UGX',
+ 'USD',
+ 'USN',
+ 'UYI',
+ 'UYU',
+ 'UYW',
+ 'UZS',
+ 'VES',
+ 'VND',
+ 'VUV',
'WST',
- 'XAF', 'XAG', 'XAU', 'XBA', 'XBB', 'XBC', 'XBD', 'XCD', 'XDR', 'XOF', 'XPD', 'XPF', 'XPT', 'XSU', 'XTS', 'XUA', 'XXX',
+ 'XAF',
+ 'XAG',
+ 'XAU',
+ 'XBA',
+ 'XBB',
+ 'XBC',
+ 'XBD',
+ 'XCD',
+ 'XDR',
+ 'XOF',
+ 'XPD',
+ 'XPF',
+ 'XPT',
+ 'XSU',
+ 'XTS',
+ 'XUA',
+ 'XXX',
'YER',
- 'ZAR', 'ZMW', 'ZWL',
+ 'ZAR',
+ 'ZMW',
+ 'ZWL',
]);
export default function isISO4217(str) {
diff --git a/src/lib/isISO6346.js b/src/lib/isISO6346.js
index 0cb657e7c..9779a288c 100644
--- a/src/lib/isISO6346.js
+++ b/src/lib/isISO6346.js
@@ -1,4 +1,4 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
// https://en.wikipedia.org/wiki/ISO_6346
// according to ISO6346 standard, checksum digit is mandatory for freight container but recommended
@@ -20,11 +20,13 @@ export function isISO6346(str) {
let convertedCode;
const letterCode = str.charCodeAt(i) - 55;
if (letterCode < 11) convertedCode = letterCode;
- else if (letterCode >= 11 && letterCode <= 20) convertedCode = 12 + (letterCode % 11);
- else if (letterCode >= 21 && letterCode <= 30) convertedCode = 23 + (letterCode % 21);
+ else if (letterCode >= 11 && letterCode <= 20)
+ convertedCode = 12 + (letterCode % 11);
+ else if (letterCode >= 21 && letterCode <= 30)
+ convertedCode = 23 + (letterCode % 21);
else convertedCode = 34 + (letterCode % 31);
- sum += convertedCode * (2 ** i);
- } else sum += str[i] * (2 ** i);
+ sum += convertedCode * 2 ** i;
+ } else sum += str[i] * 2 ** i;
}
const checkSumDigit = sum % 11;
diff --git a/src/lib/isISO6391.js b/src/lib/isISO6391.js
index eaa01c5b4..29bfe782e 100644
--- a/src/lib/isISO6391.js
+++ b/src/lib/isISO6391.js
@@ -1,32 +1,191 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
const isISO6391Set = new Set([
- 'aa', 'ab', 'ae', 'af', 'ak', 'am', 'an', 'ar', 'as', 'av', 'ay', 'az', 'az',
- 'ba', 'be', 'bg', 'bh', 'bi', 'bm', 'bn', 'bo', 'br', 'bs',
- 'ca', 'ce', 'ch', 'co', 'cr', 'cs', 'cu', 'cv', 'cy',
- 'da', 'de', 'dv', 'dz',
- 'ee', 'el', 'en', 'eo', 'es', 'et', 'eu',
- 'fa', 'ff', 'fi', 'fj', 'fo', 'fr', 'fy',
- 'ga', 'gd', 'gl', 'gn', 'gu', 'gv',
- 'ha', 'he', 'hi', 'ho', 'hr', 'ht', 'hu', 'hy', 'hz',
- 'ia', 'id', 'ie', 'ig', 'ii', 'ik', 'io', 'is', 'it', 'iu',
- 'ja', 'jv',
- 'ka', 'kg', 'ki', 'kj', 'kk', 'kl', 'km', 'kn', 'ko', 'kr', 'ks', 'ku', 'kv', 'kw', 'ky',
- 'la', 'lb', 'lg', 'li', 'ln', 'lo', 'lt', 'lu', 'lv',
- 'mg', 'mh', 'mi', 'mk', 'ml', 'mn', 'mr', 'ms', 'mt', 'my',
- 'na', 'nb', 'nd', 'ne', 'ng', 'nl', 'nn', 'no', 'nr', 'nv', 'ny',
- 'oc', 'oj', 'om', 'or', 'os',
- 'pa', 'pi', 'pl', 'ps', 'pt',
+ 'aa',
+ 'ab',
+ 'ae',
+ 'af',
+ 'ak',
+ 'am',
+ 'an',
+ 'ar',
+ 'as',
+ 'av',
+ 'ay',
+ 'az',
+ 'az',
+ 'ba',
+ 'be',
+ 'bg',
+ 'bh',
+ 'bi',
+ 'bm',
+ 'bn',
+ 'bo',
+ 'br',
+ 'bs',
+ 'ca',
+ 'ce',
+ 'ch',
+ 'co',
+ 'cr',
+ 'cs',
+ 'cu',
+ 'cv',
+ 'cy',
+ 'da',
+ 'de',
+ 'dv',
+ 'dz',
+ 'ee',
+ 'el',
+ 'en',
+ 'eo',
+ 'es',
+ 'et',
+ 'eu',
+ 'fa',
+ 'ff',
+ 'fi',
+ 'fj',
+ 'fo',
+ 'fr',
+ 'fy',
+ 'ga',
+ 'gd',
+ 'gl',
+ 'gn',
+ 'gu',
+ 'gv',
+ 'ha',
+ 'he',
+ 'hi',
+ 'ho',
+ 'hr',
+ 'ht',
+ 'hu',
+ 'hy',
+ 'hz',
+ 'ia',
+ 'id',
+ 'ie',
+ 'ig',
+ 'ii',
+ 'ik',
+ 'io',
+ 'is',
+ 'it',
+ 'iu',
+ 'ja',
+ 'jv',
+ 'ka',
+ 'kg',
+ 'ki',
+ 'kj',
+ 'kk',
+ 'kl',
+ 'km',
+ 'kn',
+ 'ko',
+ 'kr',
+ 'ks',
+ 'ku',
+ 'kv',
+ 'kw',
+ 'ky',
+ 'la',
+ 'lb',
+ 'lg',
+ 'li',
+ 'ln',
+ 'lo',
+ 'lt',
+ 'lu',
+ 'lv',
+ 'mg',
+ 'mh',
+ 'mi',
+ 'mk',
+ 'ml',
+ 'mn',
+ 'mr',
+ 'ms',
+ 'mt',
+ 'my',
+ 'na',
+ 'nb',
+ 'nd',
+ 'ne',
+ 'ng',
+ 'nl',
+ 'nn',
+ 'no',
+ 'nr',
+ 'nv',
+ 'ny',
+ 'oc',
+ 'oj',
+ 'om',
+ 'or',
+ 'os',
+ 'pa',
+ 'pi',
+ 'pl',
+ 'ps',
+ 'pt',
'qu',
- 'rm', 'rn', 'ro', 'ru', 'rw',
- 'sa', 'sc', 'sd', 'se', 'sg', 'si', 'sk', 'sl', 'sm', 'sn', 'so', 'sq', 'sr', 'ss', 'st', 'su', 'sv', 'sw',
- 'ta', 'te', 'tg', 'th', 'ti', 'tk', 'tl', 'tn', 'to', 'tr', 'ts', 'tt', 'tw', 'ty',
- 'ug', 'uk', 'ur', 'uz',
- 've', 'vi', 'vo',
- 'wa', 'wo',
+ 'rm',
+ 'rn',
+ 'ro',
+ 'ru',
+ 'rw',
+ 'sa',
+ 'sc',
+ 'sd',
+ 'se',
+ 'sg',
+ 'si',
+ 'sk',
+ 'sl',
+ 'sm',
+ 'sn',
+ 'so',
+ 'sq',
+ 'sr',
+ 'ss',
+ 'st',
+ 'su',
+ 'sv',
+ 'sw',
+ 'ta',
+ 'te',
+ 'tg',
+ 'th',
+ 'ti',
+ 'tk',
+ 'tl',
+ 'tn',
+ 'to',
+ 'tr',
+ 'ts',
+ 'tt',
+ 'tw',
+ 'ty',
+ 'ug',
+ 'uk',
+ 'ur',
+ 'uz',
+ 've',
+ 'vi',
+ 'vo',
+ 'wa',
+ 'wo',
'xh',
- 'yi', 'yo',
- 'za', 'zh', 'zu',
+ 'yi',
+ 'yo',
+ 'za',
+ 'zh',
+ 'zu',
]);
export default function isISO6391(str) {
diff --git a/src/lib/isISO8601.js b/src/lib/isISO8601.js
index 1f797347d..5d1d3d79e 100644
--- a/src/lib/isISO8601.js
+++ b/src/lib/isISO8601.js
@@ -1,10 +1,12 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
/* eslint-disable max-len */
// from http://goo.gl/0ejHHW
-const iso8601 = /^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/;
+const iso8601 =
+ /^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T\s]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/;
// same as above, except with a strict 'T' separator between date and time
-const iso8601StrictSeparator = /^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/;
+const iso8601StrictSeparator =
+ /^([\+-]?\d{4}(?!\d{2}\b))((-?)((0[1-9]|1[0-2])(\3([12]\d|0[1-9]|3[01]))?|W([0-4]\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\d|[12]\d{2}|3([0-5]\d|6[1-6])))([T]((([01]\d|2[0-3])((:?)[0-5]\d)?|24:?00)([\.,]\d+(?!:))?)?(\17[0-5]\d([\.,]\d+)?)?([zZ]|([\+-])([01]\d|2[0-3]):?([0-5]\d)?)?)?)?$/;
/* eslint-enable max-len */
const isValidDate = (str) => {
// str must have passed the ISO8601 check
@@ -16,7 +18,8 @@ const isValidDate = (str) => {
const oYear = Number(ordinalMatch[1]);
const oDay = Number(ordinalMatch[2]);
// if is leap year
- if ((oYear % 4 === 0 && oYear % 100 !== 0) || oYear % 400 === 0) return oDay <= 366;
+ if ((oYear % 4 === 0 && oYear % 100 !== 0) || oYear % 400 === 0)
+ return oDay <= 366;
return oDay <= 365;
}
const match = str.match(/(\d{4})-?(\d{0,2})-?(\d*)/).map(Number);
@@ -29,16 +32,20 @@ const isValidDate = (str) => {
// create a date object and compare
const d = new Date(`${year}-${monthString || '01'}-${dayString || '01'}`);
if (month && day) {
- return d.getUTCFullYear() === year
- && (d.getUTCMonth() + 1) === month
- && d.getUTCDate() === day;
+ return (
+ d.getUTCFullYear() === year &&
+ d.getUTCMonth() + 1 === month &&
+ d.getUTCDate() === day
+ );
}
return true;
};
export default function isISO8601(str, options = {}) {
assertString(str);
- const check = options.strictSeparator ? iso8601StrictSeparator.test(str) : iso8601.test(str);
+ const check = options.strictSeparator
+ ? iso8601StrictSeparator.test(str)
+ : iso8601.test(str);
if (check && options.strict) return isValidDate(str);
return check;
}
diff --git a/src/lib/isISRC.js b/src/lib/isISRC.js
index 052f7657a..88eb49965 100644
--- a/src/lib/isISRC.js
+++ b/src/lib/isISRC.js
@@ -1,4 +1,4 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
// see http://isrc.ifpi.org/en/isrc-standard/code-syntax
const isrc = /^[A-Z]{2}[0-9A-Z]{3}\d{2}\d{5}$/;
diff --git a/src/lib/isISSN.js b/src/lib/isISSN.js
index 42b9ad7eb..6557a1b99 100644
--- a/src/lib/isISSN.js
+++ b/src/lib/isISSN.js
@@ -1,4 +1,4 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
const issn = '^\\d{4}-?\\d{3}[\\dX]$';
@@ -6,7 +6,9 @@ export default function isISSN(str, options = {}) {
assertString(str);
let testIssn = issn;
testIssn = options.require_hyphen ? testIssn.replace('?', '') : testIssn;
- testIssn = options.case_sensitive ? new RegExp(testIssn) : new RegExp(testIssn, 'i');
+ testIssn = options.case_sensitive
+ ? new RegExp(testIssn)
+ : new RegExp(testIssn, 'i');
if (!testIssn.test(str)) {
return false;
}
diff --git a/src/lib/isIdentityCard.js b/src/lib/isIdentityCard.js
index 4734b7bd9..0f555dc85 100644
--- a/src/lib/isIdentityCard.js
+++ b/src/lib/isIdentityCard.js
@@ -1,5 +1,6 @@
-import assertString from './util/assertString';
-import isInt from './isInt';
+/* eslint-disable max-len */
+import assertString from './util/assertString.js';
+import isInt from './isInt.js';
const validators = {
PL: (str) => {
@@ -19,10 +20,16 @@ const validators = {
11: 0,
};
- if (str != null && str.length === 11 && isInt(str, { allow_leading_zeroes: true })) {
+ if (
+ str != null &&
+ str.length === 11 &&
+ isInt(str, { allow_leading_zeroes: true })
+ ) {
const digits = str.split('').slice(0, -1);
- const sum = digits.reduce((acc, digit, index) =>
- acc + (Number(digit) * weightOfDigits[index + 1]), 0);
+ const sum = digits.reduce(
+ (acc, digit, index) => acc + Number(digit) * weightOfDigits[index + 1],
+ 0
+ );
const modulo = sum % 10;
const lastDigit = Number(str.charAt(str.length - 1));
@@ -46,8 +53,29 @@ const validators = {
};
const controlDigits = [
- 'T', 'R', 'W', 'A', 'G', 'M', 'Y', 'F', 'P', 'D', 'X', 'B',
- 'N', 'J', 'Z', 'S', 'Q', 'V', 'H', 'L', 'C', 'K', 'E',
+ 'T',
+ 'R',
+ 'W',
+ 'A',
+ 'G',
+ 'M',
+ 'Y',
+ 'F',
+ 'P',
+ 'D',
+ 'X',
+ 'B',
+ 'N',
+ 'J',
+ 'Z',
+ 'S',
+ 'Q',
+ 'V',
+ 'H',
+ 'L',
+ 'C',
+ 'K',
+ 'E',
];
// sanitize user input
@@ -59,7 +87,9 @@ const validators = {
}
// validate the control digit
- const number = sanitized.slice(0, -1).replace(/[X,Y,Z]/g, char => charsValue[char]);
+ const number = sanitized
+ .slice(0, -1)
+ .replace(/[X,Y,Z]/g, (char) => charsValue[char]);
return sanitized.endsWith(controlDigits[number % 23]);
},
@@ -77,7 +107,8 @@ const validators = {
const checkDigits = '0123456789ABCDEFHJKLMNPRSTUVWXY';
- const idAsNumber = (parseInt(str.slice(0, 6), 10) * 1000) + parseInt(str.slice(7, 10), 10);
+ const idAsNumber =
+ parseInt(str.slice(0, 6), 10) * 1000 + parseInt(str.slice(7, 10), 10);
const remainder = idAsNumber % 31;
const checkDigit = checkDigits[remainder];
@@ -120,17 +151,21 @@ const validators = {
return false;
}
let c = 0;
- let invertedArray = sanitized.replace(/\s/g, '').split('').map(Number).reverse();
+ let invertedArray = sanitized
+ .replace(/\s/g, '')
+ .split('')
+ .map(Number)
+ .reverse();
invertedArray.forEach((val, i) => {
- c = d[c][p[(i % 8)][val]];
+ c = d[c][p[i % 8][val]];
});
return c === 0;
},
IR: (str) => {
if (!str.match(/^\d{10}$/)) return false;
- str = (`0000${str}`).slice(str.length - 6);
+ str = `0000${str}`.slice(str.length - 6);
if (parseInt(str.slice(3, 9), 10) === 0) return false;
@@ -160,12 +195,33 @@ const validators = {
// https://no.wikipedia.org/wiki/F%C3%B8dselsnummer
const f = sanitized.split('').map(Number);
- let k1 = (11 - (((3 * f[0]) + (7 * f[1]) + (6 * f[2])
- + (1 * f[3]) + (8 * f[4]) + (9 * f[5]) + (4 * f[6])
- + (5 * f[7]) + (2 * f[8])) % 11)) % 11;
- let k2 = (11 - (((5 * f[0]) + (4 * f[1]) + (3 * f[2])
- + (2 * f[3]) + (7 * f[4]) + (6 * f[5]) + (5 * f[6])
- + (4 * f[7]) + (3 * f[8]) + (2 * k1)) % 11)) % 11;
+ let k1 =
+ (11 -
+ ((3 * f[0] +
+ 7 * f[1] +
+ 6 * f[2] +
+ 1 * f[3] +
+ 8 * f[4] +
+ 9 * f[5] +
+ 4 * f[6] +
+ 5 * f[7] +
+ 2 * f[8]) %
+ 11)) %
+ 11;
+ let k2 =
+ (11 -
+ ((5 * f[0] +
+ 4 * f[1] +
+ 3 * f[2] +
+ 2 * f[3] +
+ 7 * f[4] +
+ 6 * f[5] +
+ 5 * f[6] +
+ 4 * f[7] +
+ 3 * f[8] +
+ 2 * k1) %
+ 11)) %
+ 11;
if (k1 !== f[9] || k2 !== f[10]) return false;
return true;
@@ -185,7 +241,7 @@ const validators = {
const new_nic = /^[1-9]\d{11}$/i;
if (str.length === 10 && old_nic.test(str)) return true;
- else if (str.length === 12 && new_nic.test(str)) return true;
+ if (str.length === 12 && new_nic.test(str)) return true;
return false;
},
'he-IL': (str) => {
@@ -273,11 +329,30 @@ const validators = {
'91', // 国外
];
- const powers = ['7', '9', '10', '5', '8', '4', '2', '1', '6', '3', '7', '9', '10', '5', '8', '4', '2'];
+ const powers = [
+ '7',
+ '9',
+ '10',
+ '5',
+ '8',
+ '4',
+ '2',
+ '1',
+ '6',
+ '3',
+ '7',
+ '9',
+ '10',
+ '5',
+ '8',
+ '4',
+ '2',
+ ];
const parityBit = ['1', '0', 'X', '9', '8', '7', '6', '5', '4', '3', '2'];
- const checkAddressCode = addressCode => provincesAndCities.includes(addressCode);
+ const checkAddressCode = (addressCode) =>
+ provincesAndCities.includes(addressCode);
const checkBirthDayCode = (birDayCode) => {
const yyyy = parseInt(birDayCode.substring(0, 4), 10);
@@ -287,7 +362,12 @@ const validators = {
if (xdata > new Date()) {
return false;
// eslint-disable-next-line max-len
- } else if ((xdata.getFullYear() === yyyy) && (xdata.getMonth() === mm - 1) && (xdata.getDate() === dd)) {
+ }
+ if (
+ xdata.getFullYear() === yyyy &&
+ xdata.getMonth() === mm - 1 &&
+ xdata.getDate() === dd
+ ) {
return true;
}
return false;
@@ -305,11 +385,14 @@ const validators = {
return parityBit[mod];
};
- const checkParityBit = idCardNo => getParityBit(idCardNo) === idCardNo.charAt(17).toUpperCase();
-
+ const checkParityBit = (idCardNo) =>
+ getParityBit(idCardNo) === idCardNo.charAt(17).toUpperCase();
const check15IdCardNo = (idCardNo) => {
- let check = /^[1-9]\d{7}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\d{3}$/.test(idCardNo);
+ let check =
+ /^[1-9]\d{7}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\d{3}$/.test(
+ idCardNo
+ );
if (!check) return false;
let addressCode = idCardNo.substring(0, 2);
check = checkAddressCode(addressCode);
@@ -321,7 +404,10 @@ const validators = {
};
const check18IdCardNo = (idCardNo) => {
- let check = /^[1-9]\d{5}[1-9]\d{3}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\d{3}(\d|x|X)$/.test(idCardNo);
+ let check =
+ /^[1-9]\d{5}[1-9]\d{3}((0[1-9])|(1[0-2]))((0[1-9])|([1-2][0-9])|(3[0-1]))\d{3}(\d|x|X)$/.test(
+ idCardNo
+ );
if (!check) return false;
let addressCode = idCardNo.substring(0, 2);
check = checkAddressCode(addressCode);
@@ -348,7 +434,8 @@ const validators = {
// HKID number starts with 1 or 2 letters, followed by 6 digits,
// then a checksum contained in square / round brackets or nothing
- const regexHKID = /^[A-Z]{1,2}[0-9]{6}((\([0-9A]\))|(\[[0-9A]\])|([0-9A]))$/;
+ const regexHKID =
+ /^[A-Z]{1,2}[0-9]{6}((\([0-9A]\))|(\[[0-9A]\])|([0-9A]))$/;
const regexIsDigit = /^[0-9]$/;
// convert the user input to all uppercase and apply regex
@@ -360,9 +447,10 @@ const validators = {
let checkSumVal = 0;
for (let i = 0; i <= 7; i++) {
let convertedChar;
- if (!regexIsDigit.test(str[i])) convertedChar = (str[i].charCodeAt(0) - 55) % 11;
+ if (!regexIsDigit.test(str[i]))
+ convertedChar = (str[i].charCodeAt(0) - 55) % 11;
else convertedChar = str[i];
- checkSumVal += (convertedChar * (9 - i));
+ checkSumVal += convertedChar * (9 - i);
}
checkSumVal %= 11;
@@ -411,14 +499,14 @@ const validators = {
if (index === 0) {
const code = ALPHABET_CODES[number];
- return ((code % 10) * 9) + Math.floor(code / 10);
+ return (code % 10) * 9 + Math.floor(code / 10);
}
if (index === 9) {
- return ((10 - (sum % 10)) - Number(number)) % 10 === 0;
+ return (10 - (sum % 10) - Number(number)) % 10 === 0;
}
- return sum + (Number(number) * (9 - index));
+ return sum + Number(number) * (9 - index);
}, 0);
},
};
@@ -427,7 +515,8 @@ export default function isIdentityCard(str, locale) {
assertString(str);
if (locale in validators) {
return validators[locale](str);
- } else if (locale === 'any') {
+ }
+ if (locale === 'any') {
for (const key in validators) {
// https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md#ignoring-code-for-coverage-purposes
// istanbul ignore else
diff --git a/src/lib/isIn.js b/src/lib/isIn.js
index e7f15804f..1a206c54a 100644
--- a/src/lib/isIn.js
+++ b/src/lib/isIn.js
@@ -1,5 +1,5 @@
-import assertString from './util/assertString';
-import toString from './util/toString';
+import assertString from './util/assertString.js';
+import toString from './util/toString.js';
export default function isIn(str, options) {
assertString(str);
@@ -14,9 +14,11 @@ export default function isIn(str, options) {
}
}
return array.indexOf(str) >= 0;
- } else if (typeof options === 'object') {
+ }
+ if (typeof options === 'object') {
return options.hasOwnProperty(str);
- } else if (options && typeof options.indexOf === 'function') {
+ }
+ if (options && typeof options.indexOf === 'function') {
return options.indexOf(str) >= 0;
}
return false;
diff --git a/src/lib/isInt.js b/src/lib/isInt.js
index 8047a6969..e79b5dbfc 100644
--- a/src/lib/isInt.js
+++ b/src/lib/isInt.js
@@ -1,4 +1,4 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
const int = /^(?:[-+]?(?:0|[1-9][0-9]*))$/;
const intLeadingZeroes = /^[-+]?[0-9]+$/;
@@ -9,16 +9,23 @@ export default function isInt(str, options) {
// Get the regex to use for testing, based on whether
// leading zeroes are allowed or not.
- let regex = (
- options.hasOwnProperty('allow_leading_zeroes') && !options.allow_leading_zeroes ?
- int : intLeadingZeroes
- );
+ let regex =
+ options.hasOwnProperty('allow_leading_zeroes') &&
+ !options.allow_leading_zeroes
+ ? int
+ : intLeadingZeroes;
// Check min/max/lt/gt
- let minCheckPassed = (!options.hasOwnProperty('min') || str >= options.min);
- let maxCheckPassed = (!options.hasOwnProperty('max') || str <= options.max);
- let ltCheckPassed = (!options.hasOwnProperty('lt') || str < options.lt);
- let gtCheckPassed = (!options.hasOwnProperty('gt') || str > options.gt);
+ let minCheckPassed = !options.hasOwnProperty('min') || str >= options.min;
+ let maxCheckPassed = !options.hasOwnProperty('max') || str <= options.max;
+ let ltCheckPassed = !options.hasOwnProperty('lt') || str < options.lt;
+ let gtCheckPassed = !options.hasOwnProperty('gt') || str > options.gt;
- return regex.test(str) && minCheckPassed && maxCheckPassed && ltCheckPassed && gtCheckPassed;
+ return (
+ regex.test(str) &&
+ minCheckPassed &&
+ maxCheckPassed &&
+ ltCheckPassed &&
+ gtCheckPassed
+ );
}
diff --git a/src/lib/isJSON.js b/src/lib/isJSON.js
index d3731e337..d4612f333 100644
--- a/src/lib/isJSON.js
+++ b/src/lib/isJSON.js
@@ -1,5 +1,5 @@
-import assertString from './util/assertString';
-import merge from './util/merge';
+import assertString from './util/assertString.js';
+import merge from './util/merge.js';
const default_json_options = {
allow_primitives: false,
@@ -16,6 +16,8 @@ export default function isJSON(str, options) {
const obj = JSON.parse(str);
return primitives.includes(obj) || (!!obj && typeof obj === 'object');
- } catch (e) { /* ignore */ }
+ } catch (e) {
+ /* ignore */
+ }
return false;
}
diff --git a/src/lib/isJWT.js b/src/lib/isJWT.js
index 1d0ade5ee..b8f9a11a7 100644
--- a/src/lib/isJWT.js
+++ b/src/lib/isJWT.js
@@ -1,5 +1,5 @@
-import assertString from './util/assertString';
-import isBase64 from './isBase64';
+import assertString from './util/assertString.js';
+import isBase64 from './isBase64.js';
export default function isJWT(str) {
assertString(str);
@@ -11,5 +11,8 @@ export default function isJWT(str) {
return false;
}
- return dotSplit.reduce((acc, currElem) => acc && isBase64(currElem, { urlSafe: true }), true);
+ return dotSplit.reduce(
+ (acc, currElem) => acc && isBase64(currElem, { urlSafe: true }),
+ true
+ );
}
diff --git a/src/lib/isLatLong.js b/src/lib/isLatLong.js
index 5c53c23aa..fe3591e0d 100644
--- a/src/lib/isLatLong.js
+++ b/src/lib/isLatLong.js
@@ -1,11 +1,13 @@
-import assertString from './util/assertString';
-import merge from './util/merge';
+import assertString from './util/assertString.js';
+import merge from './util/merge.js';
const lat = /^\(?[+-]?(90(\.0+)?|[1-8]?\d(\.\d+)?)$/;
const long = /^\s?[+-]?(180(\.0+)?|1[0-7]\d(\.\d+)?|\d{1,2}(\.\d+)?)\)?$/;
-const latDMS = /^(([1-8]?\d)\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|90\D+0\D+0)\D+[NSns]?$/i;
-const longDMS = /^\s*([1-7]?\d{1,2}\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|180\D+0\D+0)\D+[EWew]?$/i;
+const latDMS =
+ /^(([1-8]?\d)\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|90\D+0\D+0)\D+[NSns]?$/i;
+const longDMS =
+ /^\s*([1-7]?\d{1,2}\D+([1-5]?\d|60)\D+([1-5]?\d|60)(\.\d+)?|180\D+0\D+0)\D+[EWew]?$/i;
const defaultLatLongOptions = {
checkDMS: false,
@@ -17,8 +19,11 @@ export default function isLatLong(str, options) {
if (!str.includes(',')) return false;
const pair = str.split(',');
- if ((pair[0].startsWith('(') && !pair[1].endsWith(')'))
- || (pair[1].endsWith(')') && !pair[0].startsWith('('))) return false;
+ if (
+ (pair[0].startsWith('(') && !pair[1].endsWith(')')) ||
+ (pair[1].endsWith(')') && !pair[0].startsWith('('))
+ )
+ return false;
if (options.checkDMS) {
return latDMS.test(pair[0]) && longDMS.test(pair[1]);
diff --git a/src/lib/isLength.js b/src/lib/isLength.js
index 4ef8b83eb..67cc45430 100644
--- a/src/lib/isLength.js
+++ b/src/lib/isLength.js
@@ -1,14 +1,15 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
/* eslint-disable prefer-rest-params */
export default function isLength(str, options) {
assertString(str);
let min;
let max;
- if (typeof (options) === 'object') {
+ if (typeof options === 'object') {
min = options.min || 0;
max = options.max;
- } else { // backwards compatibility: isLength(str, min [, max])
+ } else {
+ // backwards compatibility: isLength(str, min [, max])
min = arguments[1] || 0;
max = arguments[2];
}
diff --git a/src/lib/isLicensePlate.js b/src/lib/isLicensePlate.js
index 48f8ebe99..03e26b837 100644
--- a/src/lib/isLicensePlate.js
+++ b/src/lib/isLicensePlate.js
@@ -1,38 +1,54 @@
-import assertString from './util/assertString';
-
-const validators = {
- 'cs-CZ': str =>
- /^(([ABCDEFHIJKLMNPRSTUVXYZ]|[0-9])-?){5,8}$/.test(str),
- 'de-DE': str =>
- /^((A|AA|AB|AC|AE|AH|AK|AM|AN|AÖ|AP|AS|AT|AU|AW|AZ|B|BA|BB|BC|BE|BF|BH|BI|BK|BL|BM|BN|BO|BÖ|BS|BT|BZ|C|CA|CB|CE|CO|CR|CW|D|DA|DD|DE|DH|DI|DL|DM|DN|DO|DU|DW|DZ|E|EA|EB|ED|EE|EF|EG|EH|EI|EL|EM|EN|ER|ES|EU|EW|F|FB|FD|FF|FG|FI|FL|FN|FO|FR|FS|FT|FÜ|FW|FZ|G|GA|GC|GD|GE|GF|GG|GI|GK|GL|GM|GN|GÖ|GP|GR|GS|GT|GÜ|GV|GW|GZ|H|HA|HB|HC|HD|HE|HF|HG|HH|HI|HK|HL|HM|HN|HO|HP|HR|HS|HU|HV|HX|HY|HZ|IK|IL|IN|IZ|J|JE|JL|K|KA|KB|KC|KE|KF|KG|KH|KI|KK|KL|KM|KN|KO|KR|KS|KT|KU|KW|KY|L|LA|LB|LC|LD|LF|LG|LH|LI|LL|LM|LN|LÖ|LP|LR|LU|M|MA|MB|MC|MD|ME|MG|MH|MI|MK|ML|MM|MN|MO|MQ|MR|MS|MÜ|MW|MY|MZ|N|NB|ND|NE|NF|NH|NI|NK|NM|NÖ|NP|NR|NT|NU|NW|NY|NZ|OA|OB|OC|OD|OE|OF|OG|OH|OK|OL|OP|OS|OZ|P|PA|PB|PE|PF|PI|PL|PM|PN|PR|PS|PW|PZ|R|RA|RC|RD|RE|RG|RH|RI|RL|RM|RN|RO|RP|RS|RT|RU|RV|RW|RZ|S|SB|SC|SE|SG|SI|SK|SL|SM|SN|SO|SP|SR|ST|SU|SW|SY|SZ|TE|TF|TG|TO|TP|TR|TS|TT|TÜ|ÜB|UE|UH|UL|UM|UN|V|VB|VG|VK|VR|VS|W|WA|WB|WE|WF|WI|WK|WL|WM|WN|WO|WR|WS|WT|WÜ|WW|WZ|Z|ZE|ZI|ZP|ZR|ZW|ZZ)[- ]?[A-Z]{1,2}[- ]?\d{1,4}|(ABG|ABI|AIB|AIC|ALF|ALZ|ANA|ANG|ANK|APD|ARN|ART|ASL|ASZ|AUR|AZE|BAD|BAR|BBG|BCH|BED|BER|BGD|BGL|BID|BIN|BIR|BIT|BIW|BKS|BLB|BLK|BNA|BOG|BOH|BOR|BOT|BRA|BRB|BRG|BRK|BRL|BRV|BSB|BSK|BTF|BÜD|BUL|BÜR|BÜS|BÜZ|CAS|CHA|CLP|CLZ|COC|COE|CUX|DAH|DAN|DAU|DBR|DEG|DEL|DGF|DIL|DIN|DIZ|DKB|DLG|DON|DUD|DÜW|EBE|EBN|EBS|ECK|EIC|EIL|EIN|EIS|EMD|EMS|ERB|ERH|ERK|ERZ|ESB|ESW|FDB|FDS|FEU|FFB|FKB|FLÖ|FOR|FRG|FRI|FRW|FTL|FÜS|GAN|GAP|GDB|GEL|GEO|GER|GHA|GHC|GLA|GMN|GNT|GOA|GOH|GRA|GRH|GRI|GRM|GRZ|GTH|GUB|GUN|GVM|HAB|HAL|HAM|HAS|HBN|HBS|HCH|HDH|HDL|HEB|HEF|HEI|HER|HET|HGN|HGW|HHM|HIG|HIP|HMÜ|HOG|HOH|HOL|HOM|HOR|HÖS|HOT|HRO|HSK|HST|HVL|HWI|IGB|ILL|JÜL|KEH|KEL|KEM|KIB|KLE|KLZ|KÖN|KÖT|KÖZ|KRU|KÜN|KUS|KYF|LAN|LAU|LBS|LBZ|LDK|LDS|LEO|LER|LEV|LIB|LIF|LIP|LÖB|LOS|LRO|LSZ|LÜN|LUP|LWL|MAB|MAI|MAK|MAL|MED|MEG|MEI|MEK|MEL|MER|MET|MGH|MGN|MHL|MIL|MKK|MOD|MOL|MON|MOS|MSE|MSH|MSP|MST|MTK|MTL|MÜB|MÜR|MYK|MZG|NAB|NAI|NAU|NDH|NEA|NEB|NEC|NEN|NES|NEW|NMB|NMS|NOH|NOL|NOM|NOR|NVP|NWM|OAL|OBB|OBG|OCH|OHA|ÖHR|OHV|OHZ|OPR|OSL|OVI|OVL|OVP|PAF|PAN|PAR|PCH|PEG|PIR|PLÖ|PRÜ|QFT|QLB|RDG|REG|REH|REI|RID|RIE|ROD|ROF|ROK|ROL|ROS|ROT|ROW|RSL|RÜD|RÜG|SAB|SAD|SAN|SAW|SBG|SBK|SCZ|SDH|SDL|SDT|SEB|SEE|SEF|SEL|SFB|SFT|SGH|SHA|SHG|SHK|SHL|SIG|SIM|SLE|SLF|SLK|SLN|SLS|SLÜ|SLZ|SMÜ|SOB|SOG|SOK|SÖM|SON|SPB|SPN|SRB|SRO|STA|STB|STD|STE|STL|SUL|SÜW|SWA|SZB|TBB|TDO|TET|TIR|TÖL|TUT|UEM|UER|UFF|USI|VAI|VEC|VER|VIB|VIE|VIT|VOH|WAF|WAK|WAN|WAR|WAT|WBS|WDA|WEL|WEN|WER|WES|WHV|WIL|WIS|WIT|WIZ|WLG|WMS|WND|WOB|WOH|WOL|WOR|WOS|WRN|WSF|WST|WSW|WTL|WTM|WUG|WÜM|WUN|WUR|WZL|ZEL|ZIG)[- ]?(([A-Z][- ]?\d{1,4})|([A-Z]{2}[- ]?\d{1,3})))[- ]?(E|H)?$/.test(str),
- 'de-LI': str => /^FL[- ]?\d{1,5}[UZ]?$/.test(str),
- 'en-IN': str => /^[A-Z]{2}[ -]?[0-9]{1,2}(?:[ -]?[A-Z])(?:[ -]?[A-Z]*)?[ -]?[0-9]{4}$/.test(str),
- 'es-AR': str => /^(([A-Z]{2} ?[0-9]{3} ?[A-Z]{2})|([A-Z]{3} ?[0-9]{3}))$/.test(str),
- 'fi-FI': str => /^(?=.{4,7})(([A-Z]{1,3}|[0-9]{1,3})[\s-]?([A-Z]{1,3}|[0-9]{1,5}))$/.test(str),
- 'hu-HU': str => /^((((?!AAA)(([A-NPRSTVZWXY]{1})([A-PR-Z]{1})([A-HJ-NPR-Z]))|(A[ABC]I)|A[ABC]O|A[A-W]Q|BPI|BPO|UCO|UDO|XAO)-(?!000)\d{3})|(M\d{6})|((CK|DT|CD|HC|H[ABEFIKLMNPRSTVX]|MA|OT|R[A-Z]) \d{2}-\d{2})|(CD \d{3}-\d{3})|(C-(C|X) \d{4})|(X-(A|B|C) \d{4})|(([EPVZ]-\d{5}))|(S A[A-Z]{2} \d{2})|(SP \d{2}-\d{2}))$/.test(str),
- 'pt-BR': str =>
- /^[A-Z]{3}[ -]?[0-9][A-Z][0-9]{2}|[A-Z]{3}[ -]?[0-9]{4}$/.test(str),
- 'pt-PT': str =>
- /^([A-Z]{2}|[0-9]{2})[ -·]?([A-Z]{2}|[0-9]{2})[ -·]?([A-Z]{2}|[0-9]{2})$/.test(str),
- 'sq-AL': str =>
- /^[A-Z]{2}[- ]?((\d{3}[- ]?(([A-Z]{2})|T))|(R[- ]?\d{3}))$/.test(str),
- 'sv-SE': str =>
- /^[A-HJ-PR-UW-Z]{3} ?[\d]{2}[A-HJ-PR-UW-Z1-9]$|(^[A-ZÅÄÖ ]{2,7}$)/.test(str.trim()),
-};
-
-export default function isLicensePlate(str, locale) {
- assertString(str);
- if (locale in validators) {
- return validators[locale](str);
- } else if (locale === 'any') {
- for (const key in validators) {
- /* eslint guard-for-in: 0 */
- const validator = validators[key];
- if (validator(str)) {
- return true;
- }
- }
- return false;
- }
- throw new Error(`Invalid locale '${locale}'`);
-}
+import assertString from './util/assertString.js';
+
+const validators = {
+ 'cs-CZ': (str) => /^(([ABCDEFHIJKLMNPRSTUVXYZ]|[0-9])-?){5,8}$/.test(str),
+ 'de-DE': (str) =>
+ /^((A|AA|AB|AC|AE|AH|AK|AM|AN|AÖ|AP|AS|AT|AU|AW|AZ|B|BA|BB|BC|BE|BF|BH|BI|BK|BL|BM|BN|BO|BÖ|BS|BT|BZ|C|CA|CB|CE|CO|CR|CW|D|DA|DD|DE|DH|DI|DL|DM|DN|DO|DU|DW|DZ|E|EA|EB|ED|EE|EF|EG|EH|EI|EL|EM|EN|ER|ES|EU|EW|F|FB|FD|FF|FG|FI|FL|FN|FO|FR|FS|FT|FÜ|FW|FZ|G|GA|GC|GD|GE|GF|GG|GI|GK|GL|GM|GN|GÖ|GP|GR|GS|GT|GÜ|GV|GW|GZ|H|HA|HB|HC|HD|HE|HF|HG|HH|HI|HK|HL|HM|HN|HO|HP|HR|HS|HU|HV|HX|HY|HZ|IK|IL|IN|IZ|J|JE|JL|K|KA|KB|KC|KE|KF|KG|KH|KI|KK|KL|KM|KN|KO|KR|KS|KT|KU|KW|KY|L|LA|LB|LC|LD|LF|LG|LH|LI|LL|LM|LN|LÖ|LP|LR|LU|M|MA|MB|MC|MD|ME|MG|MH|MI|MK|ML|MM|MN|MO|MQ|MR|MS|MÜ|MW|MY|MZ|N|NB|ND|NE|NF|NH|NI|NK|NM|NÖ|NP|NR|NT|NU|NW|NY|NZ|OA|OB|OC|OD|OE|OF|OG|OH|OK|OL|OP|OS|OZ|P|PA|PB|PE|PF|PI|PL|PM|PN|PR|PS|PW|PZ|R|RA|RC|RD|RE|RG|RH|RI|RL|RM|RN|RO|RP|RS|RT|RU|RV|RW|RZ|S|SB|SC|SE|SG|SI|SK|SL|SM|SN|SO|SP|SR|ST|SU|SW|SY|SZ|TE|TF|TG|TO|TP|TR|TS|TT|TÜ|ÜB|UE|UH|UL|UM|UN|V|VB|VG|VK|VR|VS|W|WA|WB|WE|WF|WI|WK|WL|WM|WN|WO|WR|WS|WT|WÜ|WW|WZ|Z|ZE|ZI|ZP|ZR|ZW|ZZ)[- ]?[A-Z]{1,2}[- ]?\d{1,4}|(ABG|ABI|AIB|AIC|ALF|ALZ|ANA|ANG|ANK|APD|ARN|ART|ASL|ASZ|AUR|AZE|BAD|BAR|BBG|BCH|BED|BER|BGD|BGL|BID|BIN|BIR|BIT|BIW|BKS|BLB|BLK|BNA|BOG|BOH|BOR|BOT|BRA|BRB|BRG|BRK|BRL|BRV|BSB|BSK|BTF|BÜD|BUL|BÜR|BÜS|BÜZ|CAS|CHA|CLP|CLZ|COC|COE|CUX|DAH|DAN|DAU|DBR|DEG|DEL|DGF|DIL|DIN|DIZ|DKB|DLG|DON|DUD|DÜW|EBE|EBN|EBS|ECK|EIC|EIL|EIN|EIS|EMD|EMS|ERB|ERH|ERK|ERZ|ESB|ESW|FDB|FDS|FEU|FFB|FKB|FLÖ|FOR|FRG|FRI|FRW|FTL|FÜS|GAN|GAP|GDB|GEL|GEO|GER|GHA|GHC|GLA|GMN|GNT|GOA|GOH|GRA|GRH|GRI|GRM|GRZ|GTH|GUB|GUN|GVM|HAB|HAL|HAM|HAS|HBN|HBS|HCH|HDH|HDL|HEB|HEF|HEI|HER|HET|HGN|HGW|HHM|HIG|HIP|HMÜ|HOG|HOH|HOL|HOM|HOR|HÖS|HOT|HRO|HSK|HST|HVL|HWI|IGB|ILL|JÜL|KEH|KEL|KEM|KIB|KLE|KLZ|KÖN|KÖT|KÖZ|KRU|KÜN|KUS|KYF|LAN|LAU|LBS|LBZ|LDK|LDS|LEO|LER|LEV|LIB|LIF|LIP|LÖB|LOS|LRO|LSZ|LÜN|LUP|LWL|MAB|MAI|MAK|MAL|MED|MEG|MEI|MEK|MEL|MER|MET|MGH|MGN|MHL|MIL|MKK|MOD|MOL|MON|MOS|MSE|MSH|MSP|MST|MTK|MTL|MÜB|MÜR|MYK|MZG|NAB|NAI|NAU|NDH|NEA|NEB|NEC|NEN|NES|NEW|NMB|NMS|NOH|NOL|NOM|NOR|NVP|NWM|OAL|OBB|OBG|OCH|OHA|ÖHR|OHV|OHZ|OPR|OSL|OVI|OVL|OVP|PAF|PAN|PAR|PCH|PEG|PIR|PLÖ|PRÜ|QFT|QLB|RDG|REG|REH|REI|RID|RIE|ROD|ROF|ROK|ROL|ROS|ROT|ROW|RSL|RÜD|RÜG|SAB|SAD|SAN|SAW|SBG|SBK|SCZ|SDH|SDL|SDT|SEB|SEE|SEF|SEL|SFB|SFT|SGH|SHA|SHG|SHK|SHL|SIG|SIM|SLE|SLF|SLK|SLN|SLS|SLÜ|SLZ|SMÜ|SOB|SOG|SOK|SÖM|SON|SPB|SPN|SRB|SRO|STA|STB|STD|STE|STL|SUL|SÜW|SWA|SZB|TBB|TDO|TET|TIR|TÖL|TUT|UEM|UER|UFF|USI|VAI|VEC|VER|VIB|VIE|VIT|VOH|WAF|WAK|WAN|WAR|WAT|WBS|WDA|WEL|WEN|WER|WES|WHV|WIL|WIS|WIT|WIZ|WLG|WMS|WND|WOB|WOH|WOL|WOR|WOS|WRN|WSF|WST|WSW|WTL|WTM|WUG|WÜM|WUN|WUR|WZL|ZEL|ZIG)[- ]?(([A-Z][- ]?\d{1,4})|([A-Z]{2}[- ]?\d{1,3})))[- ]?(E|H)?$/.test(
+ str
+ ),
+ 'de-LI': (str) => /^FL[- ]?\d{1,5}[UZ]?$/.test(str),
+ 'en-IN': (str) =>
+ /^[A-Z]{2}[ -]?[0-9]{1,2}(?:[ -]?[A-Z])(?:[ -]?[A-Z]*)?[ -]?[0-9]{4}$/.test(
+ str
+ ),
+ 'es-AR': (str) =>
+ /^(([A-Z]{2} ?[0-9]{3} ?[A-Z]{2})|([A-Z]{3} ?[0-9]{3}))$/.test(str),
+ 'fi-FI': (str) =>
+ /^(?=.{4,7})(([A-Z]{1,3}|[0-9]{1,3})[\s-]?([A-Z]{1,3}|[0-9]{1,5}))$/.test(
+ str
+ ),
+ 'hu-HU': (str) =>
+ /^((((?!AAA)(([A-NPRSTVZWXY]{1})([A-PR-Z]{1})([A-HJ-NPR-Z]))|(A[ABC]I)|A[ABC]O|A[A-W]Q|BPI|BPO|UCO|UDO|XAO)-(?!000)\d{3})|(M\d{6})|((CK|DT|CD|HC|H[ABEFIKLMNPRSTVX]|MA|OT|R[A-Z]) \d{2}-\d{2})|(CD \d{3}-\d{3})|(C-(C|X) \d{4})|(X-(A|B|C) \d{4})|(([EPVZ]-\d{5}))|(S A[A-Z]{2} \d{2})|(SP \d{2}-\d{2}))$/.test(
+ str
+ ),
+ 'pt-BR': (str) =>
+ /^[A-Z]{3}[ -]?[0-9][A-Z][0-9]{2}|[A-Z]{3}[ -]?[0-9]{4}$/.test(str),
+ 'pt-PT': (str) =>
+ /^([A-Z]{2}|[0-9]{2})[ -·]?([A-Z]{2}|[0-9]{2})[ -·]?([A-Z]{2}|[0-9]{2})$/.test(
+ str
+ ),
+ 'sq-AL': (str) =>
+ /^[A-Z]{2}[- ]?((\d{3}[- ]?(([A-Z]{2})|T))|(R[- ]?\d{3}))$/.test(str),
+ 'sv-SE': (str) =>
+ /^[A-HJ-PR-UW-Z]{3} ?[\d]{2}[A-HJ-PR-UW-Z1-9]$|(^[A-ZÅÄÖ ]{2,7}$)/.test(
+ str.trim()
+ ),
+};
+
+export default function isLicensePlate(str, locale) {
+ assertString(str);
+ if (locale in validators) {
+ return validators[locale](str);
+ }
+ if (locale === 'any') {
+ for (const key in validators) {
+ /* eslint guard-for-in: 0 */
+ const validator = validators[key];
+ if (validator(str)) {
+ return true;
+ }
+ }
+ return false;
+ }
+ throw new Error(`Invalid locale '${locale}'`);
+}
diff --git a/src/lib/isLocale.js b/src/lib/isLocale.js
index ec84c8fce..169b88d09 100644
--- a/src/lib/isLocale.js
+++ b/src/lib/isLocale.js
@@ -1,4 +1,4 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
/*
= 3ALPHA ; selected ISO 639 codes
@@ -57,17 +57,19 @@ const privateuse = '(x(-[A-Za-z0-9]{1,8})+)';
// otherwise be considered 'well-formed'. These tags are all valid, but
// most are deprecated in favor of more modern subtags or subtag combination
-const irregular = '((en-GB-oed)|(i-ami)|(i-bnn)|(i-default)|(i-enochian)|' +
- '(i-hak)|(i-klingon)|(i-lux)|(i-mingo)|(i-navajo)|(i-pwn)|(i-tao)|' +
- '(i-tay)|(i-tsu)|(sgn-BE-FR)|(sgn-BE-NL)|(sgn-CH-DE))';
+const irregular =
+ '((en-GB-oed)|(i-ami)|(i-bnn)|(i-default)|(i-enochian)|' +
+ '(i-hak)|(i-klingon)|(i-lux)|(i-mingo)|(i-navajo)|(i-pwn)|(i-tao)|' +
+ '(i-tay)|(i-tsu)|(sgn-BE-FR)|(sgn-BE-NL)|(sgn-CH-DE))';
// regular tags match the 'langtag' production, but their subtags are not
// extended language or variant subtags: their meaning is defined by
// their registration and all of these are deprecated in favor of a more
// modern subtag or sequence of subtags
-const regular = '((art-lojban)|(cel-gaulish)|(no-bok)|(no-nyn)|(zh-guoyu)|' +
- '(zh-hakka)|(zh-min)|(zh-min-nan)|(zh-xiang))';
+const regular =
+ '((art-lojban)|(cel-gaulish)|(no-bok)|(no-nyn)|(zh-guoyu)|' +
+ '(zh-hakka)|(zh-min)|(zh-min-nan)|(zh-xiang))';
/*
= irregular ; non-redundant tags registered
@@ -103,7 +105,9 @@ const langtag = `${language}(${delimiter}${script})?(${delimiter}${region})?(${d
Tags for Identifying Languages
https://www.rfc-editor.org/rfc/rfc5646.html
*/
-const languageTagRegex = new RegExp(`(^${privateuse}$)|(^${grandfathered}$)|(^${langtag}$)`);
+const languageTagRegex = new RegExp(
+ `(^${privateuse}$)|(^${grandfathered}$)|(^${langtag}$)`
+);
export default function isLocale(str) {
assertString(str);
diff --git a/src/lib/isLowercase.js b/src/lib/isLowercase.js
index 803d478b8..2ebf9bc93 100644
--- a/src/lib/isLowercase.js
+++ b/src/lib/isLowercase.js
@@ -1,4 +1,4 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
export default function isLowercase(str) {
assertString(str);
diff --git a/src/lib/isLuhnNumber.js b/src/lib/isLuhnNumber.js
index 95a066115..deaa40da1 100644
--- a/src/lib/isLuhnNumber.js
+++ b/src/lib/isLuhnNumber.js
@@ -1,4 +1,4 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
export default function isLuhnNumber(str) {
assertString(str);
@@ -8,12 +8,12 @@ export default function isLuhnNumber(str) {
let tmpNum;
let shouldDouble;
for (let i = sanitized.length - 1; i >= 0; i--) {
- digit = sanitized.substring(i, (i + 1));
+ digit = sanitized.substring(i, i + 1);
tmpNum = parseInt(digit, 10);
if (shouldDouble) {
tmpNum *= 2;
if (tmpNum >= 10) {
- sum += ((tmpNum % 10) + 1);
+ sum += (tmpNum % 10) + 1;
} else {
sum += tmpNum;
}
@@ -22,5 +22,5 @@ export default function isLuhnNumber(str) {
}
shouldDouble = !shouldDouble;
}
- return !!((sum % 10) === 0 ? sanitized : false);
+ return !!(sum % 10 === 0 ? sanitized : false);
}
diff --git a/src/lib/isMACAddress.js b/src/lib/isMACAddress.js
index d87cd4aa7..6227368c2 100644
--- a/src/lib/isMACAddress.js
+++ b/src/lib/isMACAddress.js
@@ -1,9 +1,11 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
-const macAddress48 = /^(?:[0-9a-fA-F]{2}([-:\s]))([0-9a-fA-F]{2}\1){4}([0-9a-fA-F]{2})$/;
+const macAddress48 =
+ /^(?:[0-9a-fA-F]{2}([-:\s]))([0-9a-fA-F]{2}\1){4}([0-9a-fA-F]{2})$/;
const macAddress48NoSeparators = /^([0-9a-fA-F]){12}$/;
const macAddress48WithDots = /^([0-9a-fA-F]{4}\.){2}([0-9a-fA-F]{4})$/;
-const macAddress64 = /^(?:[0-9a-fA-F]{2}([-:\s]))([0-9a-fA-F]{2}\1){6}([0-9a-fA-F]{2})$/;
+const macAddress64 =
+ /^(?:[0-9a-fA-F]{2}([-:\s]))([0-9a-fA-F]{2}\1){6}([0-9a-fA-F]{2})$/;
const macAddress64NoSeparators = /^([0-9a-fA-F]){16}$/;
const macAddress64WithDots = /^([0-9a-fA-F]{4}\.){3}([0-9a-fA-F]{4})$/;
@@ -14,7 +16,7 @@ export default function isMACAddress(str, options) {
}
/**
* @deprecated `no_colons` TODO: remove it in the next major
- */
+ */
if (options?.no_colons || options?.no_separators) {
if (options.eui === '48') {
return macAddress48NoSeparators.test(str);
@@ -22,7 +24,9 @@ export default function isMACAddress(str, options) {
if (options.eui === '64') {
return macAddress64NoSeparators.test(str);
}
- return macAddress48NoSeparators.test(str) || macAddress64NoSeparators.test(str);
+ return (
+ macAddress48NoSeparators.test(str) || macAddress64NoSeparators.test(str)
+ );
}
if (options?.eui === '48') {
return macAddress48.test(str) || macAddress48WithDots.test(str);
diff --git a/src/lib/isMD5.js b/src/lib/isMD5.js
index 2feac5611..32424d0c6 100644
--- a/src/lib/isMD5.js
+++ b/src/lib/isMD5.js
@@ -1,4 +1,4 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
const md5 = /^[a-f0-9]{32}$/;
diff --git a/src/lib/isMagnetURI.js b/src/lib/isMagnetURI.js
index e00ee3c32..479b14c32 100644
--- a/src/lib/isMagnetURI.js
+++ b/src/lib/isMagnetURI.js
@@ -1,6 +1,7 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
-const magnetURIComponent = /(?:^magnet:\?|[^?&]&)xt(?:\.1)?=urn:(?:(?:aich|bitprint|btih|ed2k|ed2khash|kzhash|md5|sha1|tree:tiger):[a-z0-9]{32}(?:[a-z0-9]{8})?|btmh:1220[a-z0-9]{64})(?:$|&)/i;
+const magnetURIComponent =
+ /(?:^magnet:\?|[^?&]&)xt(?:\.1)?=urn:(?:(?:aich|bitprint|btih|ed2k|ed2khash|kzhash|md5|sha1|tree:tiger):[a-z0-9]{32}(?:[a-z0-9]{8})?|btmh:1220[a-z0-9]{64})(?:$|&)/i;
export default function isMagnetURI(url) {
assertString(url);
diff --git a/src/lib/isMailtoURI.js b/src/lib/isMailtoURI.js
index 0dd95b6a9..5b07f5d65 100644
--- a/src/lib/isMailtoURI.js
+++ b/src/lib/isMailtoURI.js
@@ -1,6 +1,6 @@
-import trim from './trim';
-import isEmail from './isEmail';
-import assertString from './util/assertString';
+import trim from './trim.js';
+import isEmail from './isEmail.js';
+import assertString from './util/assertString.js';
function parseMailtoQueryString(queryString) {
const allowedParams = new Set(['subject', 'body', 'cc', 'bcc']),
@@ -53,15 +53,13 @@ export default function isMailtoURI(url, options) {
return false;
}
- return `${to},${query.cc},${query.bcc}`
- .split(',')
- .every((email) => {
- email = trim(email, ' ');
+ return `${to},${query.cc},${query.bcc}`.split(',').every((email) => {
+ email = trim(email, ' ');
- if (email) {
- return isEmail(email, options);
- }
+ if (email) {
+ return isEmail(email, options);
+ }
- return true;
- });
+ return true;
+ });
}
diff --git a/src/lib/isMimeType.js b/src/lib/isMimeType.js
index 4081117af..1d915209a 100644
--- a/src/lib/isMimeType.js
+++ b/src/lib/isMimeType.js
@@ -1,4 +1,4 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
/*
Checks if the provided string matches to a correct Media type format (MIME type)
@@ -26,15 +26,22 @@ import assertString from './util/assertString';
// NB :
// Subtype length must not exceed 100 characters.
// This rule does not comply to the RFC specs (what is the max length ?).
-const mimeTypeSimple = /^(application|audio|font|image|message|model|multipart|text|video)\/[a-zA-Z0-9\.\-\+_]{1,100}$/i; // eslint-disable-line max-len
+const mimeTypeSimple =
+ /^(application|audio|font|image|message|model|multipart|text|video)\/[a-zA-Z0-9\.\-\+_]{1,100}$/i; // eslint-disable-line max-len
// Handle "charset" in "text/*"
-const mimeTypeText = /^text\/[a-zA-Z0-9\.\-\+]{1,100};\s?charset=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?$/i; // eslint-disable-line max-len
+const mimeTypeText =
+ /^text\/[a-zA-Z0-9\.\-\+]{1,100};\s?charset=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?$/i; // eslint-disable-line max-len
// Handle "boundary" in "multipart/*"
-const mimeTypeMultipart = /^multipart\/[a-zA-Z0-9\.\-\+]{1,100}(;\s?(boundary|charset)=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?){0,2}$/i; // eslint-disable-line max-len
+const mimeTypeMultipart =
+ /^multipart\/[a-zA-Z0-9\.\-\+]{1,100}(;\s?(boundary|charset)=("[a-zA-Z0-9\.\-\+\s]{0,70}"|[a-zA-Z0-9\.\-\+]{0,70})(\s?\([a-zA-Z0-9\.\-\+\s]{1,20}\))?){0,2}$/i; // eslint-disable-line max-len
export default function isMimeType(str) {
assertString(str);
- return mimeTypeSimple.test(str) || mimeTypeText.test(str) || mimeTypeMultipart.test(str);
+ return (
+ mimeTypeSimple.test(str) ||
+ mimeTypeText.test(str) ||
+ mimeTypeMultipart.test(str)
+ );
}
diff --git a/src/lib/isMobilePhone.js b/src/lib/isMobilePhone.js
index 7c9b420e9..8ba40291b 100644
--- a/src/lib/isMobilePhone.js
+++ b/src/lib/isMobilePhone.js
@@ -1,4 +1,4 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
/* eslint-disable max-len */
const phones = {
@@ -34,7 +34,8 @@ const phones = {
'dv-MV': /^(\+?960)?(7[2-9]|9[1-9])\d{5}$/,
'el-GR': /^(\+?30|0)?6(8[5-9]|9(?![26])[0-9])\d{7}$/,
'el-CY': /^(\+?357?)?(9(9|6)\d{6})$/,
- 'en-AI': /^(\+?1|0)264(?:2(35|92)|4(?:6[1-2]|76|97)|5(?:3[6-9]|8[1-4])|7(?:2(4|9)|72))\d{4}$/,
+ 'en-AI':
+ /^(\+?1|0)264(?:2(35|92)|4(?:6[1-2]|76|97)|5(?:3[6-9]|8[1-4])|7(?:2(4|9)|72))\d{4}$/,
'en-AU': /^(\+?61|0)4\d{8}$/,
'en-AG': /^(?:\+1|1)268(?:464|7(?:1[3-9]|[28]\d|3[0246]|64|7[0-689]))\d{4}$/,
'en-BM': /^(\+?1)?441(((3|7)\d{6}$)|(5[0-3][0-9]\d{4}$)|(59\d{5}$))/,
@@ -56,7 +57,8 @@ const phones = {
'en-LS': /^(\+?266)(22|28|57|58|59|27|52)\d{6}$/,
'en-MT': /^(\+?356|0)?(99|79|77|21|27|22|25)[0-9]{6}$/,
'en-MU': /^(\+?230|0)?\d{8}$/,
- 'en-MW': /^(\+?265|0)(((77|88|31|99|98|21)\d{7})|(((111)|1)\d{6})|(32000\d{4}))$/,
+ 'en-MW':
+ /^(\+?265|0)(((77|88|31|99|98|21)\d{7})|(((111)|1)\d{6})|(32000\d{4}))$/,
'en-NA': /^(\+?264|0)(6|8)\d{7}$/,
'en-NG': /^(\+?234|0)?[789]\d{9}$/,
'en-NZ': /^(\+?64|0)[28]\d{7,9}$/,
@@ -68,7 +70,8 @@ const phones = {
'en-SL': /^(\+?232|0)\d{8}$/,
'en-TZ': /^(\+?255|0)?[67]\d{8}$/,
'en-UG': /^(\+?256|0)?[7]\d{8}$/,
- 'en-US': /^((\+1|1)?( |-)?)?(\([2-9][0-9]{2}\)|[2-9][0-9]{2})( |-)?([2-9][0-9]{2}( |-)?[0-9]{4})$/,
+ 'en-US':
+ /^((\+1|1)?( |-)?)?(\([2-9][0-9]{2}\)|[2-9][0-9]{2})( |-)?([2-9][0-9]{2}( |-)?[0-9]{4})$/,
'en-ZA': /^(\+?27|0)\d{9}$/,
'en-ZM': /^(\+?26)?09[567]\d{7}$/,
'en-ZW': /^(\+263)[0-9]{9}$/,
@@ -109,7 +112,8 @@ const phones = {
'fr-WF': /^(\+681)?\d{6}$/,
'he-IL': /^(\+972|0)([23489]|5[012345689]|77)[1-9]\d{6}$/,
'hu-HU': /^(\+?36|06)(20|30|31|50|70)\d{7}$/,
- 'id-ID': /^(\+?62|0)8(1[123456789]|2[1238]|3[1238]|5[12356789]|7[78]|9[56789]|8[123456789])([\s?|\d]{5,11})$/,
+ 'id-ID':
+ /^(\+?62|0)8(1[123456789]|2[1238]|3[1238]|5[12356789]|7[78]|9[56789]|8[123456789])([\s?|\d]{5,11})$/,
'ir-IR': /^(\+98|0)?9\d{9}$/,
'it-IT': /^(\+?39)?\s?3\d{2} ?\d{6,7}$/,
'it-SM': /^((\+378)|(0549)|(\+390549)|(\+3780549))?6\d{5,9}$/,
@@ -133,14 +137,16 @@ const phones = {
'nl-AW': /^(\+)?297(56|59|64|73|74|99)\d{5}$/,
'nn-NO': /^(\+?47)?[49]\d{7}$/,
'pl-PL': /^(\+?48)? ?([5-8]\d|45) ?\d{3} ?\d{2} ?\d{2}$/,
- 'pt-BR': /^((\+?55\ ?[1-9]{2}\ ?)|(\+?55\ ?\([1-9]{2}\)\ ?)|(0[1-9]{2}\ ?)|(\([1-9]{2}\)\ ?)|([1-9]{2}\ ?))((\d{4}\-?\d{4})|(9[1-9]{1}\d{3}\-?\d{4}))$/,
+ 'pt-BR':
+ /^((\+?55\ ?[1-9]{2}\ ?)|(\+?55\ ?\([1-9]{2}\)\ ?)|(0[1-9]{2}\ ?)|(\([1-9]{2}\)\ ?)|([1-9]{2}\ ?))((\d{4}\-?\d{4})|(9[1-9]{1}\d{3}\-?\d{4}))$/,
'pt-PT': /^(\+?351)?9[1236]\d{7}$/,
'pt-AO': /^(\+244)\d{9}$/,
'ro-MD': /^(\+?373|0)((6(0|1|2|6|7|8|9))|(7(6|7|8|9)))\d{6}$/,
'ro-RO': /^(\+?40|0)\s?7\d{2}(\/|\s|\.|-)?\d{3}(\s|\.|-)?\d{3}$/,
'ru-RU': /^(\+?7|8)?9\d{9}$/,
'si-LK': /^(?:0|94|\+94)?(7(0|1|2|4|5|6|7|8)( |-)?)\d{7}$/,
- 'sl-SI': /^(\+386\s?|0)(\d{1}\s?\d{3}\s?\d{2}\s?\d{2}|\d{2}\s?\d{3}\s?\d{3})$/,
+ 'sl-SI':
+ /^(\+386\s?|0)(\d{1}\s?\d{3}\s?\d{2}\s?\d{2}|\d{2}\s?\d{3}\s?\d{3})$/,
'sk-SK': /^(\+?421)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,
'so-SO': /^(\+?252|0)((6[0-9])\d{7}|(7[1-9])\d{7})$/,
'sq-AL': /^(\+355|0)6[789]\d{6}$/,
@@ -152,7 +158,8 @@ const phones = {
'tk-TM': /^(\+993|993|8)\d{8}$/,
'uk-UA': /^(\+?38|8)?0\d{9}$/,
'uz-UZ': /^(\+?998)?(6[125-79]|7[1-69]|88|9\d)\d{7}$/,
- 'vi-VN': /^((\+?84)|0)((3([2-9]))|(5([25689]))|(7([0|6-9]))|(8([1-9]))|(9([0-9])))([0-9]{7})$/,
+ 'vi-VN':
+ /^((\+?84)|0)((3([2-9]))|(5([25689]))|(7([0|6-9]))|(8([1-9]))|(9([0-9])))([0-9]{7})$/,
'zh-CN': /^((\+|00)86)?(1[3-9]|9[28])\d{9}$/,
'zh-TW': /^(\+?886\-?|0)?9\d{8}$/,
'dz-BT': /^(\+?975|0)?(17|16|77|02)\d{6}$/,
@@ -189,10 +196,12 @@ export default function isMobilePhone(str, locale, options) {
}
return false;
});
- } else if (locale in phones) {
+ }
+ if (locale in phones) {
return phones[locale].test(str);
// alias falsey locale as 'any'
- } else if (!locale || locale === 'any') {
+ }
+ if (!locale || locale === 'any') {
for (const key in phones) {
// istanbul ignore else
if (phones.hasOwnProperty(key)) {
diff --git a/src/lib/isMongoId.js b/src/lib/isMongoId.js
index b1a3baa8b..fe84b288e 100644
--- a/src/lib/isMongoId.js
+++ b/src/lib/isMongoId.js
@@ -1,6 +1,6 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
-import isHexadecimal from './isHexadecimal';
+import isHexadecimal from './isHexadecimal.js';
export default function isMongoId(str) {
assertString(str);
diff --git a/src/lib/isMultibyte.js b/src/lib/isMultibyte.js
index 5354cdfda..dcd8527d3 100644
--- a/src/lib/isMultibyte.js
+++ b/src/lib/isMultibyte.js
@@ -1,4 +1,4 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
/* eslint-disable no-control-regex */
const multibyte = /[^\x00-\x7F]/;
diff --git a/src/lib/isNumeric.js b/src/lib/isNumeric.js
index 4cc7ea5b3..f6ded2b92 100644
--- a/src/lib/isNumeric.js
+++ b/src/lib/isNumeric.js
@@ -1,5 +1,5 @@
-import assertString from './util/assertString';
-import { decimal } from './alpha';
+import assertString from './util/assertString.js';
+import { decimal } from './alpha.js';
const numericNoSymbols = /^[0-9]+$/;
@@ -8,5 +8,9 @@ export default function isNumeric(str, options) {
if (options && options.no_symbols) {
return numericNoSymbols.test(str);
}
- return (new RegExp(`^[+-]?([0-9]*[${(options || {}).locale ? decimal[options.locale] : '.'}])?[0-9]+$`)).test(str);
+ return new RegExp(
+ `^[+-]?([0-9]*[${
+ (options || {}).locale ? decimal[options.locale] : '.'
+ }])?[0-9]+$`
+ ).test(str);
}
diff --git a/src/lib/isOctal.js b/src/lib/isOctal.js
index 205b98ab6..09de2ec2d 100644
--- a/src/lib/isOctal.js
+++ b/src/lib/isOctal.js
@@ -1,4 +1,4 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
const octal = /^(0o)?[0-7]+$/i;
diff --git a/src/lib/isPassportNumber.js b/src/lib/isPassportNumber.js
index 4763d6566..63aeaab6f 100644
--- a/src/lib/isPassportNumber.js
+++ b/src/lib/isPassportNumber.js
@@ -1,4 +1,4 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
/**
* Reference:
@@ -82,6 +82,8 @@ export default function isPassportNumber(str, countryCode) {
/** Remove All Whitespaces, Convert to UPPERCASE */
const normalizedStr = str.replace(/\s/g, '').toUpperCase();
- return (countryCode.toUpperCase() in passportRegexByCountryCode) &&
- passportRegexByCountryCode[countryCode].test(normalizedStr);
+ return (
+ countryCode.toUpperCase() in passportRegexByCountryCode &&
+ passportRegexByCountryCode[countryCode].test(normalizedStr)
+ );
}
diff --git a/src/lib/isPort.js b/src/lib/isPort.js
index 0b316b78c..61702d1c2 100644
--- a/src/lib/isPort.js
+++ b/src/lib/isPort.js
@@ -1,4 +1,4 @@
-import isInt from './isInt';
+import isInt from './isInt.js';
export default function isPort(str) {
return isInt(str, { min: 0, max: 65535 });
diff --git a/src/lib/isPostalCode.js b/src/lib/isPostalCode.js
index e6213914f..24aed2cdd 100644
--- a/src/lib/isPostalCode.js
+++ b/src/lib/isPostalCode.js
@@ -1,4 +1,4 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
// common patterns
const threeDigit = /^\d{3}$/;
@@ -81,7 +81,8 @@ export default function isPostalCode(str, locale) {
assertString(str);
if (locale in patterns) {
return patterns[locale].test(str);
- } else if (locale === 'any') {
+ }
+ if (locale === 'any') {
for (const key in patterns) {
// https://github.com/gotwarlost/istanbul/blob/master/ignoring-code-for-coverage.md#ignoring-code-for-coverage-purposes
// istanbul ignore else
diff --git a/src/lib/isRFC3339.js b/src/lib/isRFC3339.js
index 48b025e0f..37e16b717 100644
--- a/src/lib/isRFC3339.js
+++ b/src/lib/isRFC3339.js
@@ -1,4 +1,4 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
/* Based on https://tools.ietf.org/html/rfc3339#section-5.6 */
@@ -14,9 +14,13 @@ const timeSecFrac = /(\.[0-9]+)?/;
const timeNumOffset = new RegExp(`[-+]${timeHour.source}:${timeMinute.source}`);
const timeOffset = new RegExp(`([zZ]|${timeNumOffset.source})`);
-const partialTime = new RegExp(`${timeHour.source}:${timeMinute.source}:${timeSecond.source}${timeSecFrac.source}`);
+const partialTime = new RegExp(
+ `${timeHour.source}:${timeMinute.source}:${timeSecond.source}${timeSecFrac.source}`
+);
-const fullDate = new RegExp(`${dateFullYear.source}-${dateMonth.source}-${dateMDay.source}`);
+const fullDate = new RegExp(
+ `${dateFullYear.source}-${dateMonth.source}-${dateMDay.source}`
+);
const fullTime = new RegExp(`${partialTime.source}${timeOffset.source}`);
const rfc3339 = new RegExp(`^${fullDate.source}[ tT]${fullTime.source}$`);
diff --git a/src/lib/isRgbColor.js b/src/lib/isRgbColor.js
index 9458522ab..21cdded6c 100644
--- a/src/lib/isRgbColor.js
+++ b/src/lib/isRgbColor.js
@@ -1,9 +1,13 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
-const rgbColor = /^rgb\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){2}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\)$/;
-const rgbaColor = /^rgba\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){3}(0?\.\d|1(\.0)?|0(\.0)?)\)$/;
-const rgbColorPercent = /^rgb\((([0-9]%|[1-9][0-9]%|100%),){2}([0-9]%|[1-9][0-9]%|100%)\)$/;
-const rgbaColorPercent = /^rgba\((([0-9]%|[1-9][0-9]%|100%),){3}(0?\.\d|1(\.0)?|0(\.0)?)\)$/;
+const rgbColor =
+ /^rgb\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){2}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\)$/;
+const rgbaColor =
+ /^rgba\((([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5]),){3}(0?\.\d|1(\.0)?|0(\.0)?)\)$/;
+const rgbColorPercent =
+ /^rgb\((([0-9]%|[1-9][0-9]%|100%),){2}([0-9]%|[1-9][0-9]%|100%)\)$/;
+const rgbaColorPercent =
+ /^rgba\((([0-9]%|[1-9][0-9]%|100%),){3}(0?\.\d|1(\.0)?|0(\.0)?)\)$/;
export default function isRgbColor(str, includePercentValues = true) {
assertString(str);
@@ -12,8 +16,10 @@ export default function isRgbColor(str, includePercentValues = true) {
return rgbColor.test(str) || rgbaColor.test(str);
}
- return rgbColor.test(str) ||
+ return (
+ rgbColor.test(str) ||
rgbaColor.test(str) ||
rgbColorPercent.test(str) ||
- rgbaColorPercent.test(str);
+ rgbaColorPercent.test(str)
+ );
}
diff --git a/src/lib/isSemVer.js b/src/lib/isSemVer.js
index 172d36496..9bb3e13af 100644
--- a/src/lib/isSemVer.js
+++ b/src/lib/isSemVer.js
@@ -1,5 +1,5 @@
-import assertString from './util/assertString';
-import multilineRegexp from './util/multilineRegex';
+import assertString from './util/assertString.js';
+import multilineRegexp from './util/multilineRegex.js';
/**
* Regular Expression to match
@@ -7,11 +7,14 @@ import multilineRegexp from './util/multilineRegex';
* built from multi-line, multi-parts regexp
* Reference: https://semver.org/
*/
-const semanticVersioningRegex = multilineRegexp([
- '^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)',
- '(?:-((?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*))*))',
- '?(?:\\+([0-9a-z-]+(?:\\.[0-9a-z-]+)*))?$',
-], 'i');
+const semanticVersioningRegex = multilineRegexp(
+ [
+ '^(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)',
+ '(?:-((?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-z-][0-9a-z-]*))*))',
+ '?(?:\\+([0-9a-z-]+(?:\\.[0-9a-z-]+)*))?$',
+ ],
+ 'i'
+);
export default function isSemVer(str) {
assertString(str);
diff --git a/src/lib/isSlug.js b/src/lib/isSlug.js
index 28b872a92..88e9786a1 100644
--- a/src/lib/isSlug.js
+++ b/src/lib/isSlug.js
@@ -1,8 +1,8 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
let charsetRegex = /^[^\s-_](?!.*?[-_]{2,})[a-z0-9-\\][^\s]*[^-_\s]$/;
export default function isSlug(str) {
assertString(str);
- return (charsetRegex.test(str));
+ return charsetRegex.test(str);
}
diff --git a/src/lib/isStrongPassword.js b/src/lib/isStrongPassword.js
index 5db901fa3..31c54dd52 100644
--- a/src/lib/isStrongPassword.js
+++ b/src/lib/isStrongPassword.js
@@ -1,5 +1,5 @@
-import merge from './util/merge';
-import assertString from './util/assertString';
+import merge from './util/merge.js';
+import assertString from './util/assertString.js';
const upperCaseRegex = /^[A-Z]$/;
const lowerCaseRegex = /^[a-z]$/;
@@ -23,7 +23,7 @@ const defaultOptions = {
/* Counts number of occurrences of each char in a string
* could be moved to util/ ?
-*/
+ */
function countChars(str) {
let result = {};
Array.from(str).forEach((char) => {
@@ -66,7 +66,8 @@ function analyzePassword(password) {
function scorePassword(analysis, scoringOptions) {
let points = 0;
points += analysis.uniqueChars * scoringOptions.pointsPerUnique;
- points += (analysis.length - analysis.uniqueChars) * scoringOptions.pointsPerRepeat;
+ points +=
+ (analysis.length - analysis.uniqueChars) * scoringOptions.pointsPerRepeat;
if (analysis.lowercaseCount > 0) {
points += scoringOptions.pointsForContainingLower;
}
@@ -89,9 +90,11 @@ export default function isStrongPassword(str, options = null) {
if (options.returnScore) {
return scorePassword(analysis, options);
}
- return analysis.length >= options.minLength
- && analysis.lowercaseCount >= options.minLowercase
- && analysis.uppercaseCount >= options.minUppercase
- && analysis.numberCount >= options.minNumbers
- && analysis.symbolCount >= options.minSymbols;
+ return (
+ analysis.length >= options.minLength &&
+ analysis.lowercaseCount >= options.minLowercase &&
+ analysis.uppercaseCount >= options.minUppercase &&
+ analysis.numberCount >= options.minNumbers &&
+ analysis.symbolCount >= options.minSymbols
+ );
}
diff --git a/src/lib/isSurrogatePair.js b/src/lib/isSurrogatePair.js
index 0d04c2dcc..533b140c1 100644
--- a/src/lib/isSurrogatePair.js
+++ b/src/lib/isSurrogatePair.js
@@ -1,4 +1,4 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
const surrogatePair = /[\uD800-\uDBFF][\uDC00-\uDFFF]/;
diff --git a/src/lib/isTaxID.js b/src/lib/isTaxID.js
index b82156ed1..4b7846563 100644
--- a/src/lib/isTaxID.js
+++ b/src/lib/isTaxID.js
@@ -1,6 +1,6 @@
-import assertString from './util/assertString';
-import * as algorithms from './util/algorithms';
-import isDate from './isDate';
+import assertString from './util/assertString.js';
+import * as algorithms from './util/algorithms.js';
+import isDate from './isDate.js';
/**
* TIN Validation
@@ -43,12 +43,16 @@ function bgBgCheck(tin) {
} else {
century_year = `19${century_year}`;
}
- if (month < 10) { month = `0${month}`; }
+ if (month < 10) {
+ month = `0${month}`;
+ }
const date = `${century_year}/${month}/${tin.slice(4, 6)}`;
- if (!isDate(date, 'YYYY/MM/DD')) { return false; }
+ if (!isDate(date, 'YYYY/MM/DD')) {
+ return false;
+ }
// split digits into an array for further processing
- const digits = tin.split('').map(a => parseInt(a, 10));
+ const digits = tin.split('').map((a) => parseInt(a, 10));
// Calculate checksum by multiplying digits with fixed values
const multip_lookup = [2, 4, 8, 5, 10, 9, 7, 3, 6];
@@ -77,17 +81,17 @@ function isCanadianSIN(input) {
const digitsArray = input.split('');
const even = digitsArray
.filter((_, idx) => idx % 2)
- .map(i => Number(i) * 2)
+ .map((i) => Number(i) * 2)
.join('')
.split('');
const total = digitsArray
.filter((_, idx) => !(idx % 2))
.concat(even)
- .map(i => Number(i))
+ .map((i) => Number(i))
.reduce((acc, cur) => acc + cur);
- return (total % 10 === 0);
+ return total % 10 === 0;
}
/*
@@ -110,7 +114,9 @@ function csCzCheck(tin) {
full_year = `19${full_year}`;
}
} else {
- if (tin.slice(6) === '000') { return false; } // Three-zero serial not assigned before 1954
+ if (tin.slice(6) === '000') {
+ return false;
+ } // Three-zero serial not assigned before 1954
if (full_year < 54) {
full_year = `19${full_year}`;
} else {
@@ -129,14 +135,20 @@ function csCzCheck(tin) {
}
if (month > 20) {
// Month-plus-twenty was only introduced in 2004
- if (parseInt(full_year, 10) < 2004) { return false; }
+ if (parseInt(full_year, 10) < 2004) {
+ return false;
+ }
month -= 20;
}
- if (month < 10) { month = `0${month}`; }
+ if (month < 10) {
+ month = `0${month}`;
+ }
// Check date validity
const date = `${full_year}/${month}/${tin.slice(4, 6)}`;
- if (!isDate(date, 'YYYY/MM/DD')) { return false; }
+ if (!isDate(date, 'YYYY/MM/DD')) {
+ return false;
+ }
// Verify divisibility by 11
if (tin.length === 10) {
@@ -145,7 +157,9 @@ function csCzCheck(tin) {
// check (last) digit equals 0 and modulo of first 9 digits equals 10
const checkdigit = parseInt(tin.slice(0, 9), 10) % 11;
if (parseInt(full_year, 10) < 1986 && checkdigit === 10) {
- if (parseInt(tin.slice(9), 10) !== 0) { return false; }
+ if (parseInt(tin.slice(9), 10) !== 0) {
+ return false;
+ }
} else {
return false;
}
@@ -171,7 +185,7 @@ function deAtCheck(tin) {
*/
function deDeCheck(tin) {
// Split digits into an array for further processing
- const digits = tin.split('').map(a => parseInt(a, 10));
+ const digits = tin.split('').map((a) => parseInt(a, 10));
// Fill array with strings of number positions
let occurences = [];
@@ -185,12 +199,14 @@ function deDeCheck(tin) {
}
// Remove digits with one occurence and test for only one duplicate/triplicate
- occurences = occurences.filter(a => a.length > 1);
- if (occurences.length !== 2 && occurences.length !== 3) { return false; }
+ occurences = occurences.filter((a) => a.length > 1);
+ if (occurences.length !== 2 && occurences.length !== 3) {
+ return false;
+ }
// In case of triplicate value only two digits are allowed next to each other
if (occurences[0].length === 3) {
- const trip_locations = occurences[0].split('').map(a => parseInt(a, 10));
+ const trip_locations = occurences[0].split('').map((a) => parseInt(a, 10));
let recurrent = 0; // Amount of neighbour occurences
for (let i = 0; i < trip_locations.length - 1; i++) {
if (trip_locations[i] + 1 === trip_locations[i + 1]) {
@@ -247,10 +263,12 @@ function dkDkCheck(tin) {
}
// Check date validity
const date = `${year}/${tin.slice(2, 4)}/${tin.slice(0, 2)}`;
- if (!isDate(date, 'YYYY/MM/DD')) { return false; }
+ if (!isDate(date, 'YYYY/MM/DD')) {
+ return false;
+ }
// Split digits into an array for further processing
- const digits = tin.split('').map(a => parseInt(a, 10));
+ const digits = tin.split('').map((a) => parseInt(a, 10));
let checksum = 0;
let weight = 4;
// Multiply by weight and add to checksum
@@ -262,7 +280,9 @@ function dkDkCheck(tin) {
}
}
checksum %= 11;
- if (checksum === 1) { return false; }
+ if (checksum === 1) {
+ return false;
+ }
return checksum === 0 ? digits[9] === 0 : digits[9] === 11 - checksum;
}
@@ -273,7 +293,10 @@ function dkDkCheck(tin) {
*/
function elCyCheck(tin) {
// split digits into an array for further processing
- const digits = tin.slice(0, 8).split('').map(a => parseInt(a, 10));
+ const digits = tin
+ .slice(0, 8)
+ .split('')
+ .map((a) => parseInt(a, 10));
let checksum = 0;
// add digits in even places
@@ -286,7 +309,7 @@ function elCyCheck(tin) {
if (digits[i] < 2) {
checksum += 1 - digits[i];
} else {
- checksum += (2 * (digits[i] - 2)) + 5;
+ checksum += 2 * (digits[i] - 2) + 5;
if (digits[i] > 4) {
checksum += 2;
}
@@ -304,13 +327,13 @@ function elCyCheck(tin) {
*/
function elGrCheck(tin) {
// split digits into an array for further processing
- const digits = tin.split('').map(a => parseInt(a, 10));
+ const digits = tin.split('').map((a) => parseInt(a, 10));
let checksum = 0;
for (let i = 0; i < 8; i++) {
- checksum += digits[i] * (2 ** (8 - i));
+ checksum += digits[i] * 2 ** (8 - i);
}
- return ((checksum % 11) % 10) === digits[8];
+ return (checksum % 11) % 10 === digits[8];
}
/*
@@ -325,7 +348,13 @@ function elGrCheck(tin) {
* Verify TIN validity by calculating check (second to last) character
*/
function enIeCheck(tin) {
- let checksum = algorithms.reverseMultiplyAndSum(tin.split('').slice(0, 7).map(a => parseInt(a, 10)), 8);
+ let checksum = algorithms.reverseMultiplyAndSum(
+ tin
+ .split('')
+ .slice(0, 7)
+ .map((a) => parseInt(a, 10)),
+ 8
+ );
if (tin.length === 9 && tin[8] !== 'W') {
checksum += (tin[8].charCodeAt(0) - 64) * 9;
}
@@ -342,14 +371,72 @@ const enUsCampusPrefix = {
andover: ['10', '12'],
atlanta: ['60', '67'],
austin: ['50', '53'],
- brookhaven: ['01', '02', '03', '04', '05', '06', '11', '13', '14', '16', '21', '22', '23', '25', '34', '51', '52', '54', '55', '56', '57', '58', '59', '65'],
+ brookhaven: [
+ '01',
+ '02',
+ '03',
+ '04',
+ '05',
+ '06',
+ '11',
+ '13',
+ '14',
+ '16',
+ '21',
+ '22',
+ '23',
+ '25',
+ '34',
+ '51',
+ '52',
+ '54',
+ '55',
+ '56',
+ '57',
+ '58',
+ '59',
+ '65',
+ ],
cincinnati: ['30', '32', '35', '36', '37', '38', '61'],
fresno: ['15', '24'],
internet: ['20', '26', '27', '45', '46', '47'],
kansas: ['40', '44'],
memphis: ['94', '95'],
ogden: ['80', '90'],
- philadelphia: ['33', '39', '41', '42', '43', '46', '48', '62', '63', '64', '66', '68', '71', '72', '73', '74', '75', '76', '77', '81', '82', '83', '84', '85', '86', '87', '88', '91', '92', '93', '98', '99'],
+ philadelphia: [
+ '33',
+ '39',
+ '41',
+ '42',
+ '43',
+ '46',
+ '48',
+ '62',
+ '63',
+ '64',
+ '66',
+ '68',
+ '71',
+ '72',
+ '73',
+ '74',
+ '75',
+ '76',
+ '77',
+ '81',
+ '82',
+ '83',
+ '84',
+ '85',
+ '86',
+ '87',
+ '88',
+ '91',
+ '92',
+ '93',
+ '98',
+ '99',
+ ],
sba: ['31'],
};
@@ -423,7 +510,7 @@ function esEsCheck(tin) {
default:
}
chars.splice(0, 1, lead_replace);
- // Fill with zeros if smaller than proper
+ // Fill with zeros if smaller than proper
} else {
while (chars.length < 9) {
chars.unshift(0);
@@ -431,9 +518,33 @@ function esEsCheck(tin) {
}
// Calculate checksum and check according to lookup
- const lookup = ['T', 'R', 'W', 'A', 'G', 'M', 'Y', 'F', 'P', 'D', 'X', 'B', 'N', 'J', 'Z', 'S', 'Q', 'V', 'H', 'L', 'C', 'K', 'E'];
+ const lookup = [
+ 'T',
+ 'R',
+ 'W',
+ 'A',
+ 'G',
+ 'M',
+ 'Y',
+ 'F',
+ 'P',
+ 'D',
+ 'X',
+ 'B',
+ 'N',
+ 'J',
+ 'Z',
+ 'S',
+ 'Q',
+ 'V',
+ 'H',
+ 'L',
+ 'C',
+ 'K',
+ 'E',
+ ];
chars = chars.join('');
- let checksum = (parseInt(chars.slice(0, 8), 10) % 23);
+ let checksum = parseInt(chars.slice(0, 8), 10) % 23;
return chars[8] === lookup[checksum];
}
@@ -463,10 +574,12 @@ function etEeCheck(tin) {
}
// Check date validity
const date = `${full_year}/${tin.slice(3, 5)}/${tin.slice(5, 7)}`;
- if (!isDate(date, 'YYYY/MM/DD')) { return false; }
+ if (!isDate(date, 'YYYY/MM/DD')) {
+ return false;
+ }
// Split digits into an array for further processing
- const digits = tin.split('').map(a => parseInt(a, 10));
+ const digits = tin.split('').map((a) => parseInt(a, 10));
let checksum = 0;
let weight = 1;
// Multiply by weight and add to checksum
@@ -488,7 +601,9 @@ function etEeCheck(tin) {
weight = 1;
}
}
- if (checksum % 11 === 10) { return digits[10] === 0; }
+ if (checksum % 11 === 10) {
+ return digits[10] === 0;
+ }
}
return checksum % 11 === digits[10];
@@ -517,14 +632,40 @@ function fiFiCheck(tin) {
}
// Check date validity
const date = `${full_year}/${tin.slice(2, 4)}/${tin.slice(0, 2)}`;
- if (!isDate(date, 'YYYY/MM/DD')) { return false; }
+ if (!isDate(date, 'YYYY/MM/DD')) {
+ return false;
+ }
// Calculate check character
- let checksum = parseInt((tin.slice(0, 6) + tin.slice(7, 10)), 10) % 31;
- if (checksum < 10) { return checksum === parseInt(tin.slice(10), 10); }
+ let checksum = parseInt(tin.slice(0, 6) + tin.slice(7, 10), 10) % 31;
+ if (checksum < 10) {
+ return checksum === parseInt(tin.slice(10), 10);
+ }
checksum -= 10;
- const letters_lookup = ['A', 'B', 'C', 'D', 'E', 'F', 'H', 'J', 'K', 'L', 'M', 'N', 'P', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y'];
+ const letters_lookup = [
+ 'A',
+ 'B',
+ 'C',
+ 'D',
+ 'E',
+ 'F',
+ 'H',
+ 'J',
+ 'K',
+ 'L',
+ 'M',
+ 'N',
+ 'P',
+ 'R',
+ 'S',
+ 'T',
+ 'U',
+ 'V',
+ 'W',
+ 'X',
+ 'Y',
+ ];
return letters_lookup[checksum] === tin.slice(10);
}
@@ -538,7 +679,9 @@ function frBeCheck(tin) {
if (tin.slice(2, 4) !== '00' || tin.slice(4, 6) !== '00') {
// Extract date from first six digits of TIN
const date = `${tin.slice(0, 2)}/${tin.slice(2, 4)}/${tin.slice(4, 6)}`;
- if (!isDate(date, 'YY/MM/DD')) { return false; }
+ if (!isDate(date, 'YY/MM/DD')) {
+ return false;
+ }
}
let checksum = 97 - (parseInt(tin.slice(0, 9), 10) % 97);
@@ -572,10 +715,14 @@ function frFrCheck(tin) {
function frLuCheck(tin) {
// Extract date and check validity
const date = `${tin.slice(0, 4)}/${tin.slice(4, 6)}/${tin.slice(6, 8)}`;
- if (!isDate(date, 'YYYY/MM/DD')) { return false; }
+ if (!isDate(date, 'YYYY/MM/DD')) {
+ return false;
+ }
// Run Luhn check
- if (!algorithms.luhnCheck(tin.slice(0, 12))) { return false; }
+ if (!algorithms.luhnCheck(tin.slice(0, 12))) {
+ return false;
+ }
// Remove Luhn check digit and run Verhoeff check
return algorithms.verhoeffCheck(`${tin.slice(0, 11)}${tin[12]}`);
}
@@ -596,7 +743,7 @@ function hrHrCheck(tin) {
*/
function huHuCheck(tin) {
// split digits into an array for further processing
- const digits = tin.split('').map(a => parseInt(a, 10));
+ const digits = tin.split('').map((a) => parseInt(a, 10));
let checksum = 8;
for (let i = 1; i < 9; i++) {
@@ -631,14 +778,18 @@ function itItNameCheck(name) {
for (let i = 0; i < 3; i++) {
if (!vowelflag && /[AEIOU]/.test(name[i])) {
vowelflag = true;
- } else if (!xflag && vowelflag && (name[i] === 'X')) {
+ } else if (!xflag && vowelflag && name[i] === 'X') {
xflag = true;
} else if (i > 0) {
if (vowelflag && !xflag) {
- if (!/[AEIOU]/.test(name[i])) { return false; }
+ if (!/[AEIOU]/.test(name[i])) {
+ return false;
+ }
}
if (xflag) {
- if (!/X/.test(name[i])) { return false; }
+ if (!/X/.test(name[i])) {
+ return false;
+ }
}
}
}
@@ -658,8 +809,12 @@ function itItCheck(tin) {
const chars = tin.toUpperCase().split('');
// Check first and last name validity calling itItNameCheck()
- if (!itItNameCheck(chars.slice(0, 3))) { return false; }
- if (!itItNameCheck(chars.slice(3, 6))) { return false; }
+ if (!itItNameCheck(chars.slice(0, 3))) {
+ return false;
+ }
+ if (!itItNameCheck(chars.slice(3, 6))) {
+ return false;
+ }
// Convert letters in number spaces back to numbers if any
const number_locations = [6, 7, 9, 10, 12, 13, 14];
@@ -699,11 +854,17 @@ function itItCheck(tin) {
let month = month_replace[chars[8]];
let day = parseInt(chars[9] + chars[10], 10);
- if (day > 40) { day -= 40; }
- if (day < 10) { day = `0${day}`; }
+ if (day > 40) {
+ day -= 40;
+ }
+ if (day < 10) {
+ day = `0${day}`;
+ }
const date = `${chars[6]}${chars[7]}/${month}/${day}`;
- if (!isDate(date, 'YY/MM/DD')) { return false; }
+ if (!isDate(date, 'YY/MM/DD')) {
+ return false;
+ }
// Calculate check character by adding up even and odd characters as numbers
let checksum = 0;
@@ -715,7 +876,8 @@ function itItCheck(tin) {
checksum += char_to_int;
}
- const odd_convert = { // Maps of characters at odd places
+ const odd_convert = {
+ // Maps of characters at odd places
A: 1,
B: 0,
C: 5,
@@ -751,7 +913,7 @@ function itItCheck(tin) {
char_to_int = odd_convert[chars[i]];
} else {
let multiplier = parseInt(chars[i], 10);
- char_to_int = (2 * multiplier) + 1;
+ char_to_int = 2 * multiplier + 1;
if (multiplier > 4) {
char_to_int += 2;
}
@@ -759,7 +921,9 @@ function itItCheck(tin) {
checksum += char_to_int;
}
- if (String.fromCharCode(65 + (checksum % 26)) !== chars[15]) { return false; }
+ if (String.fromCharCode(65 + (checksum % 26)) !== chars[15]) {
+ return false;
+ }
return true;
}
@@ -775,9 +939,11 @@ function lvLvCheck(tin) {
tin = tin.replace(/\W/, '');
// Extract date from TIN
const day = tin.slice(0, 2);
- if (day !== '32') { // No date/checksum check if new format
+ if (day !== '32') {
+ // No date/checksum check if new format
const month = tin.slice(2, 4);
- if (month !== '00') { // No date check if unknown month
+ if (month !== '00') {
+ // No date check if unknown month
let full_year = tin.slice(4, 6);
switch (tin[6]) {
case '0':
@@ -792,7 +958,9 @@ function lvLvCheck(tin) {
}
// Check date validity
const date = `${full_year}/${tin.slice(2, 4)}/${day}`;
- if (!isDate(date, 'YYYY/MM/DD')) { return false; }
+ if (!isDate(date, 'YYYY/MM/DD')) {
+ return false;
+ }
}
// Calculate check digit
@@ -801,7 +969,7 @@ function lvLvCheck(tin) {
for (let i = 0; i < tin.length - 1; i++) {
checksum -= parseInt(tin[i], 10) * multip_lookup[i];
}
- return (parseInt(tin[10], 10) === checksum % 11);
+ return parseInt(tin[10], 10) === checksum % 11;
}
return true;
}
@@ -812,7 +980,8 @@ function lvLvCheck(tin) {
* Verify Identity Card Number structure (no other tests found)
*/
function mtMtCheck(tin) {
- if (tin.length !== 9) { // No tests for UTR
+ if (tin.length !== 9) {
+ // No tests for UTR
let chars = tin.toUpperCase().split('');
// Fill with zeros if smaller than proper
while (chars.length < 8) {
@@ -822,13 +991,19 @@ function mtMtCheck(tin) {
switch (tin[7]) {
case 'A':
case 'P':
- if (parseInt(chars[6], 10) === 0) { return false; }
+ if (parseInt(chars[6], 10) === 0) {
+ return false;
+ }
break;
default: {
const first_part = parseInt(chars.join('').slice(0, 5), 10);
- if (first_part > 32000) { return false; }
+ if (first_part > 32000) {
+ return false;
+ }
const second_part = parseInt(chars.join('').slice(5, 7), 10);
- if (first_part === second_part) { return false; }
+ if (first_part === second_part) {
+ return false;
+ }
}
}
}
@@ -842,7 +1017,17 @@ function mtMtCheck(tin) {
* Verify TIN validity by calculating check (last) digit (variant of MOD 11)
*/
function nlNlCheck(tin) {
- return algorithms.reverseMultiplyAndSum(tin.split('').slice(0, 8).map(a => parseInt(a, 10)), 9) % 11 === parseInt(tin[8], 10);
+ return (
+ algorithms.reverseMultiplyAndSum(
+ tin
+ .split('')
+ .slice(0, 8)
+ .map((a) => parseInt(a, 10)),
+ 9
+ ) %
+ 11 ===
+ parseInt(tin[8], 10)
+ );
}
/*
@@ -861,8 +1046,10 @@ function plPlCheck(tin) {
checksum += parseInt(tin[i], 10) * lookup[i];
}
checksum %= 11;
- if (checksum === 10) { return false; }
- return (checksum === parseInt(tin[9], 10));
+ if (checksum === 10) {
+ return false;
+ }
+ return checksum === parseInt(tin[9], 10);
}
// PESEL
@@ -885,10 +1072,14 @@ function plPlCheck(tin) {
full_year = `19${full_year}`;
}
// Add leading zero to month if needed
- if (month < 10) { month = `0${month}`; }
+ if (month < 10) {
+ month = `0${month}`;
+ }
// Check date validity
const date = `${full_year}/${month}/${tin.slice(4, 6)}`;
- if (!isDate(date, 'YYYY/MM/DD')) { return false; }
+ if (!isDate(date, 'YYYY/MM/DD')) {
+ return false;
+ }
// Calculate last digit by mulitplying with odd one-digit numbers except 5
let checksum = 0;
@@ -907,11 +1098,11 @@ function plPlCheck(tin) {
}
/*
-* pt-BR validation function
-* (Cadastro de Pessoas Físicas (CPF, persons)
-* Cadastro Nacional de Pessoas Jurídicas (CNPJ, entities)
-* Both inputs will be validated
-*/
+ * pt-BR validation function
+ * (Cadastro de Pessoas Físicas (CPF, persons)
+ * Cadastro Nacional de Pessoas Jurídicas (CNPJ, entities)
+ * Both inputs will be validated
+ */
function ptBrCheck(tin) {
if (tin.length === 11) {
@@ -919,7 +1110,8 @@ function ptBrCheck(tin) {
let remainder;
sum = 0;
- if ( // Reject known invalid CPFs
+ if (
+ // Reject known invalid CPFs
tin === '11111111111' ||
tin === '22222222222' ||
tin === '33333333333' ||
@@ -930,15 +1122,18 @@ function ptBrCheck(tin) {
tin === '88888888888' ||
tin === '99999999999' ||
tin === '00000000000'
- ) return false;
+ )
+ return false;
- for (let i = 1; i <= 9; i++) sum += parseInt(tin.substring(i - 1, i), 10) * (11 - i);
+ for (let i = 1; i <= 9; i++)
+ sum += parseInt(tin.substring(i - 1, i), 10) * (11 - i);
remainder = (sum * 10) % 11;
if (remainder === 10) remainder = 0;
if (remainder !== parseInt(tin.substring(9, 10), 10)) return false;
sum = 0;
- for (let i = 1; i <= 10; i++) sum += parseInt(tin.substring(i - 1, i), 10) * (12 - i);
+ for (let i = 1; i <= 10; i++)
+ sum += parseInt(tin.substring(i - 1, i), 10) * (12 - i);
remainder = (sum * 10) % 11;
if (remainder === 10) remainder = 0;
if (remainder !== parseInt(tin.substring(10, 11), 10)) return false;
@@ -946,7 +1141,8 @@ function ptBrCheck(tin) {
return true;
}
- if ( // Reject know invalid CNPJs
+ if (
+ // Reject know invalid CNPJs
tin === '00000000000000' ||
tin === '11111111111111' ||
tin === '22222222222222' ||
@@ -956,7 +1152,10 @@ function ptBrCheck(tin) {
tin === '66666666666666' ||
tin === '77777777777777' ||
tin === '88888888888888' ||
- tin === '99999999999999') { return false; }
+ tin === '99999999999999'
+ ) {
+ return false;
+ }
let length = tin.length - 2;
let identifiers = tin.substring(0, length);
@@ -967,10 +1166,14 @@ function ptBrCheck(tin) {
for (let i = length; i >= 1; i--) {
sum += identifiers.charAt(length - i) * pos;
pos -= 1;
- if (pos < 2) { pos = 9; }
+ if (pos < 2) {
+ pos = 9;
+ }
}
let result = sum % 11 < 2 ? 0 : 11 - (sum % 11);
- if (result !== parseInt(verificators.charAt(0), 10)) { return false; }
+ if (result !== parseInt(verificators.charAt(0), 10)) {
+ return false;
+ }
length += 1;
identifiers = tin.substring(0, length);
@@ -979,10 +1182,14 @@ function ptBrCheck(tin) {
for (let i = length; i >= 1; i--) {
sum += identifiers.charAt(length - i) * pos;
pos -= 1;
- if (pos < 2) { pos = 9; }
+ if (pos < 2) {
+ pos = 9;
+ }
}
result = sum % 11 < 2 ? 0 : 11 - (sum % 11);
- if (result !== parseInt(verificators.charAt(1), 10)) { return false; }
+ if (result !== parseInt(verificators.charAt(1), 10)) {
+ return false;
+ }
return true;
}
@@ -993,8 +1200,19 @@ function ptBrCheck(tin) {
* Verify TIN validity by calculating check (last) digit (variant of MOD 11)
*/
function ptPtCheck(tin) {
- let checksum = 11 - (algorithms.reverseMultiplyAndSum(tin.split('').slice(0, 8).map(a => parseInt(a, 10)), 9) % 11);
- if (checksum > 9) { return parseInt(tin[8], 10) === 0; }
+ let checksum =
+ 11 -
+ (algorithms.reverseMultiplyAndSum(
+ tin
+ .split('')
+ .slice(0, 8)
+ .map((a) => parseInt(a, 10)),
+ 9
+ ) %
+ 11);
+ if (checksum > 9) {
+ return parseInt(tin[8], 10) === 0;
+ }
return checksum === parseInt(tin[8], 10);
}
@@ -1007,7 +1225,8 @@ function ptPtCheck(tin) {
* `https://en.wikipedia.org/wiki/National_identification_number#Romania`
*/
function roRoCheck(tin) {
- if (tin.slice(0, 4) !== '9000') { // No test found for this format
+ if (tin.slice(0, 4) !== '9000') {
+ // No test found for this format
// Extract full year using century digit if possible
let full_year = tin.slice(1, 3);
switch (tin[0]) {
@@ -1029,17 +1248,23 @@ function roRoCheck(tin) {
// Check date validity
const date = `${full_year}/${tin.slice(3, 5)}/${tin.slice(5, 7)}`;
if (date.length === 8) {
- if (!isDate(date, 'YY/MM/DD')) { return false; }
- } else if (!isDate(date, 'YYYY/MM/DD')) { return false; }
+ if (!isDate(date, 'YY/MM/DD')) {
+ return false;
+ }
+ } else if (!isDate(date, 'YYYY/MM/DD')) {
+ return false;
+ }
// Calculate check digit
- const digits = tin.split('').map(a => parseInt(a, 10));
+ const digits = tin.split('').map((a) => parseInt(a, 10));
const multipliers = [2, 7, 9, 1, 4, 6, 3, 5, 8, 2, 7, 9];
let checksum = 0;
for (let i = 0; i < multipliers.length; i++) {
checksum += digits[i] * multipliers[i];
}
- if (checksum % 11 === 10) { return digits[12] === 1; }
+ if (checksum % 11 === 10) {
+ return digits[12] === 1;
+ }
return digits[12] === checksum % 11;
}
return true;
@@ -1055,11 +1280,15 @@ function roRoCheck(tin) {
function skSkCheck(tin) {
if (tin.length === 9) {
tin = tin.replace(/\W/, '');
- if (tin.slice(6) === '000') { return false; } // Three-zero serial not assigned before 1954
+ if (tin.slice(6) === '000') {
+ return false;
+ } // Three-zero serial not assigned before 1954
// Extract full year from TIN length
let full_year = parseInt(tin.slice(0, 2), 10);
- if (full_year > 53) { return false; }
+ if (full_year > 53) {
+ return false;
+ }
if (full_year < 10) {
full_year = `190${full_year}`;
} else {
@@ -1071,11 +1300,15 @@ function skSkCheck(tin) {
if (month > 50) {
month -= 50;
}
- if (month < 10) { month = `0${month}`; }
+ if (month < 10) {
+ month = `0${month}`;
+ }
// Check date validity
const date = `${full_year}/${month}/${tin.slice(4, 6)}`;
- if (!isDate(date, 'YYYY/MM/DD')) { return false; }
+ if (!isDate(date, 'YYYY/MM/DD')) {
+ return false;
+ }
}
return true;
}
@@ -1086,8 +1319,19 @@ function skSkCheck(tin) {
* Verify TIN validity by calculating check (last) digit (variant of MOD 11)
*/
function slSiCheck(tin) {
- let checksum = 11 - (algorithms.reverseMultiplyAndSum(tin.split('').slice(0, 7).map(a => parseInt(a, 10)), 8) % 11);
- if (checksum === 10) { return parseInt(tin[7], 10) === 0; }
+ let checksum =
+ 11 -
+ (algorithms.reverseMultiplyAndSum(
+ tin
+ .split('')
+ .slice(0, 7)
+ .map((a) => parseInt(a, 10)),
+ 8
+ ) %
+ 11);
+ if (checksum === 10) {
+ return parseInt(tin[7], 10) === 0;
+ }
return checksum === parseInt(tin[7], 10);
}
@@ -1125,18 +1369,28 @@ function svSeCheck(tin) {
}
} else {
full_year = `${current_century - 1}${full_year}`;
- if (current_year - parseInt(full_year, 10) < 100) { return false; }
+ if (current_year - parseInt(full_year, 10) < 100) {
+ return false;
+ }
}
}
}
// Normalize day and check date validity
- if (day > 60) { day -= 60; }
- if (day < 10) { day = `0${day}`; }
+ if (day > 60) {
+ day -= 60;
+ }
+ if (day < 10) {
+ day = `0${day}`;
+ }
const date = `${full_year}/${month}/${day}`;
if (date.length === 8) {
- if (!isDate(date, 'YY/MM/DD')) { return false; }
- } else if (!isDate(date, 'YYYY/MM/DD')) { return false; }
+ if (!isDate(date, 'YY/MM/DD')) {
+ return false;
+ }
+ } else if (!isDate(date, 'YYYY/MM/DD')) {
+ return false;
+ }
return algorithms.luhnCheck(tin.replace(/\W/, ''));
}
@@ -1158,7 +1412,8 @@ const taxIdFormat = {
'el-CY': /^[09]\d{7}[A-Z]$/,
'el-GR': /^([0-4]|[7-9])\d{8}$/,
'en-CA': /^\d{9}$/,
- 'en-GB': /^\d{10}$|^(?!GB|NK|TN|ZZ)(?![DFIQUV])[A-Z](?![DFIQUVO])[A-Z]\d{6}[ABCD ]$/i,
+ 'en-GB':
+ /^\d{10}$|^(?!GB|NK|TN|ZZ)(?![DFIQUV])[A-Z](?![DFIQUVO])[A-Z]\d{6}[ABCD ]$/i,
'en-IE': /^\d{7}[A-W][A-IW]{0,1}$/i,
'en-US': /^\d{2}[- ]{0,1}\d{7}$/,
'es-AR': /(20|23|24|27|30|33|34)[0-9]{8}[0-9]/,
@@ -1170,7 +1425,8 @@ const taxIdFormat = {
'fr-LU': /^\d{13}$/,
'hr-HR': /^\d{11}$/,
'hu-HU': /^8\d{9}$/,
- 'it-IT': /^[A-Z]{6}[L-NP-V0-9]{2}[A-EHLMPRST][L-NP-V0-9]{2}[A-ILMZ][L-NP-V0-9]{3}[A-Z]$/i,
+ 'it-IT':
+ /^[A-Z]{6}[L-NP-V0-9]{2}[A-EHLMPRST][L-NP-V0-9]{2}[A-ILMZ][L-NP-V0-9]{3}[A-Z]$/i,
'lv-LV': /^\d{6}-{0,1}\d{5}$/, // Conforms both to DG TAXUD spec and original research
'mt-MT': /^\d{3,7}[APMGLHBZ]$|^([1-8])\1\d{7}$/i,
'nl-NL': /^\d{9}$/,
diff --git a/src/lib/isTime.js b/src/lib/isTime.js
index 076bbfa34..9ad235bfa 100644
--- a/src/lib/isTime.js
+++ b/src/lib/isTime.js
@@ -1,4 +1,4 @@
-import merge from './util/merge';
+import merge from './util/merge.js';
const default_time_options = {
hourFormat: 'hour24',
diff --git a/src/lib/isURL.js b/src/lib/isURL.js
index 3d2b1df3e..05a50c542 100644
--- a/src/lib/isURL.js
+++ b/src/lib/isURL.js
@@ -1,8 +1,8 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
-import isFQDN from './isFQDN';
-import isIP from './isIP';
-import merge from './util/merge';
+import isFQDN from './isFQDN.js';
+import isIP from './isIP.js';
+import merge from './util/merge.js';
/*
options for isURL method
@@ -17,7 +17,6 @@ validate_length - if set as false isURL will skip string length validation (IE m
*/
-
const default_url_options = {
protocols: ['http', 'https', 'ftp'],
require_tld: true,
@@ -67,7 +66,10 @@ export default function isURL(url, options) {
return false;
}
- if (!options.allow_query_components && (url.includes('?') || url.includes('&'))) {
+ if (
+ !options.allow_query_components &&
+ (url.includes('?') || url.includes('&'))
+ ) {
return false;
}
@@ -82,7 +84,10 @@ export default function isURL(url, options) {
split = url.split('://');
if (split.length > 1) {
protocol = split.shift().toLowerCase();
- if (options.require_valid_protocol && options.protocols.indexOf(protocol) === -1) {
+ if (
+ options.require_valid_protocol &&
+ options.protocols.indexOf(protocol) === -1
+ ) {
return false;
}
} else if (options.require_protocol) {
diff --git a/src/lib/isUUID.js b/src/lib/isUUID.js
index c026ca78c..d8c0d6931 100644
--- a/src/lib/isUUID.js
+++ b/src/lib/isUUID.js
@@ -1,4 +1,4 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
const uuid = {
1: /^[0-9A-F]{8}-[0-9A-F]{4}-1[0-9A-F]{3}-[0-9A-F]{4}-[0-9A-F]{12}$/i,
diff --git a/src/lib/isUppercase.js b/src/lib/isUppercase.js
index 48ac5d30d..11e6d9331 100644
--- a/src/lib/isUppercase.js
+++ b/src/lib/isUppercase.js
@@ -1,4 +1,4 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
export default function isUppercase(str) {
assertString(str);
diff --git a/src/lib/isVAT.js b/src/lib/isVAT.js
index ece7d8560..825a58d18 100644
--- a/src/lib/isVAT.js
+++ b/src/lib/isVAT.js
@@ -1,124 +1,152 @@
-import assertString from './util/assertString';
-import * as algorithms from './util/algorithms';
-
-const CH = (str) => {
- // @see {@link https://www.ech.ch/de/ech/ech-0097/5.2.0}
- const hasValidCheckNumber = (digits) => {
- const lastDigit = digits.pop(); // used as check number
- const weights = [5, 4, 3, 2, 7, 6, 5, 4];
- const calculatedCheckNumber = (11 - (digits.reduce((acc, el, idx) =>
- acc + (el * weights[idx]), 0) % 11)) % 11;
-
- return lastDigit === calculatedCheckNumber;
- };
-
- // @see {@link https://www.estv.admin.ch/estv/de/home/mehrwertsteuer/uid/mwst-uid-nummer.html}
- return /^(CHE[- ]?)?(\d{9}|(\d{3}\.\d{3}\.\d{3})|(\d{3} \d{3} \d{3})) ?(TVA|MWST|IVA)?$/.test(str) && hasValidCheckNumber((str.match(/\d/g).map(el => +el)));
-};
-
-const PT = (str) => {
- const match = str.match(/^(PT)?(\d{9})$/);
- if (!match) {
- return false;
- }
-
- const tin = match[2];
-
- const checksum = 11 - (algorithms.reverseMultiplyAndSum(tin.split('').slice(0, 8).map(a => parseInt(a, 10)), 9) % 11);
- if (checksum > 9) {
- return parseInt(tin[8], 10) === 0;
- }
- return checksum === parseInt(tin[8], 10);
-};
-
-export const vatMatchers = {
- /**
- * European Union VAT identification numbers
- */
- AT: str => /^(AT)?U\d{8}$/.test(str),
- BE: str => /^(BE)?\d{10}$/.test(str),
- BG: str => /^(BG)?\d{9,10}$/.test(str),
- HR: str => /^(HR)?\d{11}$/.test(str),
- CY: str => /^(CY)?\w{9}$/.test(str),
- CZ: str => /^(CZ)?\d{8,10}$/.test(str),
- DK: str => /^(DK)?\d{8}$/.test(str),
- EE: str => /^(EE)?\d{9}$/.test(str),
- FI: str => /^(FI)?\d{8}$/.test(str),
- FR: str => /^(FR)?\w{2}\d{9}$/.test(str),
- DE: str => /^(DE)?\d{9}$/.test(str),
- EL: str => /^(EL)?\d{9}$/.test(str),
- HU: str => /^(HU)?\d{8}$/.test(str),
- IE: str => /^(IE)?\d{7}\w{1}(W)?$/.test(str),
- IT: str => /^(IT)?\d{11}$/.test(str),
- LV: str => /^(LV)?\d{11}$/.test(str),
- LT: str => /^(LT)?\d{9,12}$/.test(str),
- LU: str => /^(LU)?\d{8}$/.test(str),
- MT: str => /^(MT)?\d{8}$/.test(str),
- NL: str => /^(NL)?\d{9}B\d{2}$/.test(str),
- PL: str => /^(PL)?(\d{10}|(\d{3}-\d{3}-\d{2}-\d{2})|(\d{3}-\d{2}-\d{2}-\d{3}))$/.test(str),
- PT,
- RO: str => /^(RO)?\d{2,10}$/.test(str),
- SK: str => /^(SK)?\d{10}$/.test(str),
- SI: str => /^(SI)?\d{8}$/.test(str),
- ES: str => /^(ES)?\w\d{7}[A-Z]$/.test(str),
- SE: str => /^(SE)?\d{12}$/.test(str),
-
- /**
- * VAT numbers of non-EU countries
- */
- AL: str => /^(AL)?\w{9}[A-Z]$/.test(str),
- MK: str => /^(MK)?\d{13}$/.test(str),
- AU: str => /^(AU)?\d{11}$/.test(str),
- BY: str => /^(УНП )?\d{9}$/.test(str),
- CA: str => /^(CA)?\d{9}$/.test(str),
- IS: str => /^(IS)?\d{5,6}$/.test(str),
- IN: str => /^(IN)?\d{15}$/.test(str),
- ID: str => /^(ID)?(\d{15}|(\d{2}.\d{3}.\d{3}.\d{1}-\d{3}.\d{3}))$/.test(str),
- IL: str => /^(IL)?\d{9}$/.test(str),
- KZ: str => /^(KZ)?\d{9}$/.test(str),
- NZ: str => /^(NZ)?\d{9}$/.test(str),
- NG: str => /^(NG)?(\d{12}|(\d{8}-\d{4}))$/.test(str),
- NO: str => /^(NO)?\d{9}MVA$/.test(str),
- PH: str => /^(PH)?(\d{12}|\d{3} \d{3} \d{3} \d{3})$/.test(str),
- RU: str => /^(RU)?(\d{10}|\d{12})$/.test(str),
- SM: str => /^(SM)?\d{5}$/.test(str),
- SA: str => /^(SA)?\d{15}$/.test(str),
- RS: str => /^(RS)?\d{9}$/.test(str),
- CH,
- TR: str => /^(TR)?\d{10}$/.test(str),
- UA: str => /^(UA)?\d{12}$/.test(str),
- GB: str => /^GB((\d{3} \d{4} ([0-8][0-9]|9[0-6]))|(\d{9} \d{3})|(((GD[0-4])|(HA[5-9]))[0-9]{2}))$/.test(str),
- UZ: str => /^(UZ)?\d{9}$/.test(str),
-
- /**
- * VAT numbers of Latin American countries
- */
- AR: str => /^(AR)?\d{11}$/.test(str),
- BO: str => /^(BO)?\d{7}$/.test(str),
- BR: str => /^(BR)?((\d{2}.\d{3}.\d{3}\/\d{4}-\d{2})|(\d{3}.\d{3}.\d{3}-\d{2}))$/.test(str),
- CL: str => /^(CL)?\d{8}-\d{1}$/.test(str),
- CO: str => /^(CO)?\d{10}$/.test(str),
- CR: str => /^(CR)?\d{9,12}$/.test(str),
- EC: str => /^(EC)?\d{13}$/.test(str),
- SV: str => /^(SV)?\d{4}-\d{6}-\d{3}-\d{1}$/.test(str),
- GT: str => /^(GT)?\d{7}-\d{1}$/.test(str),
- HN: str => /^(HN)?$/.test(str),
- MX: str => /^(MX)?\w{3,4}\d{6}\w{3}$/.test(str),
- NI: str => /^(NI)?\d{3}-\d{6}-\d{4}\w{1}$/.test(str),
- PA: str => /^(PA)?$/.test(str),
- PY: str => /^(PY)?\d{6,8}-\d{1}$/.test(str),
- PE: str => /^(PE)?\d{11}$/.test(str),
- DO: str => /^(DO)?(\d{11}|(\d{3}-\d{7}-\d{1})|[1,4,5]{1}\d{8}|([1,4,5]{1})-\d{2}-\d{5}-\d{1})$/.test(str),
- UY: str => /^(UY)?\d{12}$/.test(str),
- VE: str => /^(VE)?[J,G,V,E]{1}-(\d{9}|(\d{8}-\d{1}))$/.test(str),
-};
-
-export default function isVAT(str, countryCode) {
- assertString(str);
- assertString(countryCode);
-
- if (countryCode in vatMatchers) {
- return vatMatchers[countryCode](str);
- }
- throw new Error(`Invalid country code: '${countryCode}'`);
-}
+import assertString from './util/assertString.js';
+import * as algorithms from './util/algorithms.js';
+
+const CH = (str) => {
+ // @see {@link https://www.ech.ch/de/ech/ech-0097/5.2.0}
+ const hasValidCheckNumber = (digits) => {
+ const lastDigit = digits.pop(); // used as check number
+ const weights = [5, 4, 3, 2, 7, 6, 5, 4];
+ const calculatedCheckNumber =
+ (11 -
+ (digits.reduce((acc, el, idx) => acc + el * weights[idx], 0) % 11)) %
+ 11;
+
+ return lastDigit === calculatedCheckNumber;
+ };
+
+ // @see {@link https://www.estv.admin.ch/estv/de/home/mehrwertsteuer/uid/mwst-uid-nummer.html}
+ return (
+ /^(CHE[- ]?)?(\d{9}|(\d{3}\.\d{3}\.\d{3})|(\d{3} \d{3} \d{3})) ?(TVA|MWST|IVA)?$/.test(
+ str
+ ) && hasValidCheckNumber(str.match(/\d/g).map((el) => +el))
+ );
+};
+
+const PT = (str) => {
+ const match = str.match(/^(PT)?(\d{9})$/);
+ if (!match) {
+ return false;
+ }
+
+ const tin = match[2];
+
+ const checksum =
+ 11 -
+ (algorithms.reverseMultiplyAndSum(
+ tin
+ .split('')
+ .slice(0, 8)
+ .map((a) => parseInt(a, 10)),
+ 9
+ ) %
+ 11);
+ if (checksum > 9) {
+ return parseInt(tin[8], 10) === 0;
+ }
+ return checksum === parseInt(tin[8], 10);
+};
+
+export const vatMatchers = {
+ /**
+ * European Union VAT identification numbers
+ */
+ AT: (str) => /^(AT)?U\d{8}$/.test(str),
+ BE: (str) => /^(BE)?\d{10}$/.test(str),
+ BG: (str) => /^(BG)?\d{9,10}$/.test(str),
+ HR: (str) => /^(HR)?\d{11}$/.test(str),
+ CY: (str) => /^(CY)?\w{9}$/.test(str),
+ CZ: (str) => /^(CZ)?\d{8,10}$/.test(str),
+ DK: (str) => /^(DK)?\d{8}$/.test(str),
+ EE: (str) => /^(EE)?\d{9}$/.test(str),
+ FI: (str) => /^(FI)?\d{8}$/.test(str),
+ FR: (str) => /^(FR)?\w{2}\d{9}$/.test(str),
+ DE: (str) => /^(DE)?\d{9}$/.test(str),
+ EL: (str) => /^(EL)?\d{9}$/.test(str),
+ HU: (str) => /^(HU)?\d{8}$/.test(str),
+ IE: (str) => /^(IE)?\d{7}\w{1}(W)?$/.test(str),
+ IT: (str) => /^(IT)?\d{11}$/.test(str),
+ LV: (str) => /^(LV)?\d{11}$/.test(str),
+ LT: (str) => /^(LT)?\d{9,12}$/.test(str),
+ LU: (str) => /^(LU)?\d{8}$/.test(str),
+ MT: (str) => /^(MT)?\d{8}$/.test(str),
+ NL: (str) => /^(NL)?\d{9}B\d{2}$/.test(str),
+ PL: (str) =>
+ /^(PL)?(\d{10}|(\d{3}-\d{3}-\d{2}-\d{2})|(\d{3}-\d{2}-\d{2}-\d{3}))$/.test(
+ str
+ ),
+ PT,
+ RO: (str) => /^(RO)?\d{2,10}$/.test(str),
+ SK: (str) => /^(SK)?\d{10}$/.test(str),
+ SI: (str) => /^(SI)?\d{8}$/.test(str),
+ ES: (str) => /^(ES)?\w\d{7}[A-Z]$/.test(str),
+ SE: (str) => /^(SE)?\d{12}$/.test(str),
+
+ /**
+ * VAT numbers of non-EU countries
+ */
+ AL: (str) => /^(AL)?\w{9}[A-Z]$/.test(str),
+ MK: (str) => /^(MK)?\d{13}$/.test(str),
+ AU: (str) => /^(AU)?\d{11}$/.test(str),
+ BY: (str) => /^(УНП )?\d{9}$/.test(str),
+ CA: (str) => /^(CA)?\d{9}$/.test(str),
+ IS: (str) => /^(IS)?\d{5,6}$/.test(str),
+ IN: (str) => /^(IN)?\d{15}$/.test(str),
+ ID: (str) =>
+ /^(ID)?(\d{15}|(\d{2}.\d{3}.\d{3}.\d{1}-\d{3}.\d{3}))$/.test(str),
+ IL: (str) => /^(IL)?\d{9}$/.test(str),
+ KZ: (str) => /^(KZ)?\d{9}$/.test(str),
+ NZ: (str) => /^(NZ)?\d{9}$/.test(str),
+ NG: (str) => /^(NG)?(\d{12}|(\d{8}-\d{4}))$/.test(str),
+ NO: (str) => /^(NO)?\d{9}MVA$/.test(str),
+ PH: (str) => /^(PH)?(\d{12}|\d{3} \d{3} \d{3} \d{3})$/.test(str),
+ RU: (str) => /^(RU)?(\d{10}|\d{12})$/.test(str),
+ SM: (str) => /^(SM)?\d{5}$/.test(str),
+ SA: (str) => /^(SA)?\d{15}$/.test(str),
+ RS: (str) => /^(RS)?\d{9}$/.test(str),
+ CH,
+ TR: (str) => /^(TR)?\d{10}$/.test(str),
+ UA: (str) => /^(UA)?\d{12}$/.test(str),
+ GB: (str) =>
+ /^GB((\d{3} \d{4} ([0-8][0-9]|9[0-6]))|(\d{9} \d{3})|(((GD[0-4])|(HA[5-9]))[0-9]{2}))$/.test(
+ str
+ ),
+ UZ: (str) => /^(UZ)?\d{9}$/.test(str),
+
+ /**
+ * VAT numbers of Latin American countries
+ */
+ AR: (str) => /^(AR)?\d{11}$/.test(str),
+ BO: (str) => /^(BO)?\d{7}$/.test(str),
+ BR: (str) =>
+ /^(BR)?((\d{2}.\d{3}.\d{3}\/\d{4}-\d{2})|(\d{3}.\d{3}.\d{3}-\d{2}))$/.test(
+ str
+ ),
+ CL: (str) => /^(CL)?\d{8}-\d{1}$/.test(str),
+ CO: (str) => /^(CO)?\d{10}$/.test(str),
+ CR: (str) => /^(CR)?\d{9,12}$/.test(str),
+ EC: (str) => /^(EC)?\d{13}$/.test(str),
+ SV: (str) => /^(SV)?\d{4}-\d{6}-\d{3}-\d{1}$/.test(str),
+ GT: (str) => /^(GT)?\d{7}-\d{1}$/.test(str),
+ HN: (str) => /^(HN)?$/.test(str),
+ MX: (str) => /^(MX)?\w{3,4}\d{6}\w{3}$/.test(str),
+ NI: (str) => /^(NI)?\d{3}-\d{6}-\d{4}\w{1}$/.test(str),
+ PA: (str) => /^(PA)?$/.test(str),
+ PY: (str) => /^(PY)?\d{6,8}-\d{1}$/.test(str),
+ PE: (str) => /^(PE)?\d{11}$/.test(str),
+ DO: (str) =>
+ /^(DO)?(\d{11}|(\d{3}-\d{7}-\d{1})|[1,4,5]{1}\d{8}|([1,4,5]{1})-\d{2}-\d{5}-\d{1})$/.test(
+ str
+ ),
+ UY: (str) => /^(UY)?\d{12}$/.test(str),
+ VE: (str) => /^(VE)?[J,G,V,E]{1}-(\d{9}|(\d{8}-\d{1}))$/.test(str),
+};
+
+export default function isVAT(str, countryCode) {
+ assertString(str);
+ assertString(countryCode);
+
+ if (countryCode in vatMatchers) {
+ return vatMatchers[countryCode](str);
+ }
+ throw new Error(`Invalid country code: '${countryCode}'`);
+}
diff --git a/src/lib/isVariableWidth.js b/src/lib/isVariableWidth.js
index 50901d8f2..9ddd3013e 100644
--- a/src/lib/isVariableWidth.js
+++ b/src/lib/isVariableWidth.js
@@ -1,7 +1,7 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
-import { fullWidth } from './isFullWidth';
-import { halfWidth } from './isHalfWidth';
+import { fullWidth } from './isFullWidth.js';
+import { halfWidth } from './isHalfWidth.js';
export default function isVariableWidth(str) {
assertString(str);
diff --git a/src/lib/isWhitelisted.js b/src/lib/isWhitelisted.js
index 909c323da..98a1a5031 100644
--- a/src/lib/isWhitelisted.js
+++ b/src/lib/isWhitelisted.js
@@ -1,4 +1,4 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
export default function isWhitelisted(str, chars) {
assertString(str);
diff --git a/src/lib/ltrim.js b/src/lib/ltrim.js
index 372d2df8e..e13391002 100644
--- a/src/lib/ltrim.js
+++ b/src/lib/ltrim.js
@@ -1,8 +1,10 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
export default function ltrim(str, chars) {
assertString(str);
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Escaping
- const pattern = chars ? new RegExp(`^[${chars.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}]+`, 'g') : /^\s+/g;
+ const pattern = chars
+ ? new RegExp(`^[${chars.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}]+`, 'g')
+ : /^\s+/g;
return str.replace(pattern, '');
}
diff --git a/src/lib/matches.js b/src/lib/matches.js
index 9e23c2e46..486ed930a 100644
--- a/src/lib/matches.js
+++ b/src/lib/matches.js
@@ -1,4 +1,4 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
export default function matches(str, pattern, modifiers) {
assertString(str);
diff --git a/src/lib/normalizeEmail.js b/src/lib/normalizeEmail.js
index a163bed88..129162582 100644
--- a/src/lib/normalizeEmail.js
+++ b/src/lib/normalizeEmail.js
@@ -1,4 +1,4 @@
-import merge from './util/merge';
+import merge from './util/merge.js';
const default_normalize_email_options = {
// The following options apply to all email addresses
@@ -41,10 +41,7 @@ const default_normalize_email_options = {
};
// List of domains used by iCloud
-const icloud_domains = [
- 'icloud.com',
- 'me.com',
-];
+const icloud_domains = ['icloud.com', 'me.com'];
// List of domains used by Outlook.com and its predecessors
// This list is likely incomplete.
@@ -220,7 +217,10 @@ export default function normalizeEmail(email, options) {
// Address is Yahoo
if (options.yahoo_remove_subaddress) {
let components = parts[0].split('-');
- parts[0] = (components.length > 1) ? components.slice(0, -1).join('-') : components[0];
+ parts[0] =
+ components.length > 1
+ ? components.slice(0, -1).join('-')
+ : components[0];
}
if (!parts[0].length) {
return false;
diff --git a/src/lib/rtrim.js b/src/lib/rtrim.js
index 2d311574b..8c5e2e146 100644
--- a/src/lib/rtrim.js
+++ b/src/lib/rtrim.js
@@ -1,10 +1,13 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
export default function rtrim(str, chars) {
assertString(str);
if (chars) {
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Regular_Expressions#Escaping
- const pattern = new RegExp(`[${chars.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}]+$`, 'g');
+ const pattern = new RegExp(
+ `[${chars.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')}]+$`,
+ 'g'
+ );
return str.replace(pattern, '');
}
// Use a faster and more safe than regex trim method https://blog.stevenlevithan.com/archives/faster-trim-javascript
diff --git a/src/lib/stripLow.js b/src/lib/stripLow.js
index d616800de..6e07f9e11 100644
--- a/src/lib/stripLow.js
+++ b/src/lib/stripLow.js
@@ -1,9 +1,11 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
-import blacklist from './blacklist';
+import blacklist from './blacklist.js';
export default function stripLow(str, keep_new_lines) {
assertString(str);
- const chars = keep_new_lines ? '\\x00-\\x09\\x0B\\x0C\\x0E-\\x1F\\x7F' : '\\x00-\\x1F\\x7F';
+ const chars = keep_new_lines
+ ? '\\x00-\\x09\\x0B\\x0C\\x0E-\\x1F\\x7F'
+ : '\\x00-\\x1F\\x7F';
return blacklist(str, chars);
}
diff --git a/src/lib/toBoolean.js b/src/lib/toBoolean.js
index 95e210ca3..2ec1b1ec8 100644
--- a/src/lib/toBoolean.js
+++ b/src/lib/toBoolean.js
@@ -1,4 +1,4 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
export default function toBoolean(str, strict) {
assertString(str);
diff --git a/src/lib/toDate.js b/src/lib/toDate.js
index 179645fda..8757de2a2 100644
--- a/src/lib/toDate.js
+++ b/src/lib/toDate.js
@@ -1,4 +1,4 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
export default function toDate(date) {
assertString(date);
diff --git a/src/lib/toFloat.js b/src/lib/toFloat.js
index fa7d7b7c7..c2b3e363e 100644
--- a/src/lib/toFloat.js
+++ b/src/lib/toFloat.js
@@ -1,4 +1,4 @@
-import isFloat from './isFloat';
+import isFloat from './isFloat.js';
export default function toFloat(str) {
if (!isFloat(str)) return NaN;
diff --git a/src/lib/toInt.js b/src/lib/toInt.js
index 232fd1d92..176e737ad 100644
--- a/src/lib/toInt.js
+++ b/src/lib/toInt.js
@@ -1,4 +1,4 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
export default function toInt(str, radix) {
assertString(str);
diff --git a/src/lib/trim.js b/src/lib/trim.js
index 8b08f1ddf..7c1aee28e 100644
--- a/src/lib/trim.js
+++ b/src/lib/trim.js
@@ -1,5 +1,5 @@
-import rtrim from './rtrim';
-import ltrim from './ltrim';
+import rtrim from './rtrim.js';
+import ltrim from './ltrim.js';
export default function trim(str, chars) {
return rtrim(ltrim(str, chars), chars);
diff --git a/src/lib/unescape.js b/src/lib/unescape.js
index feb255ac0..b9275626a 100644
--- a/src/lib/unescape.js
+++ b/src/lib/unescape.js
@@ -1,15 +1,16 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
export default function unescape(str) {
assertString(str);
- return (str.replace(/"/g, '"')
+ return str
+ .replace(/"/g, '"')
.replace(/'/g, "'")
.replace(/</g, '<')
.replace(/>/g, '>')
.replace(///g, '/')
.replace(/\/g, '\\')
.replace(/`/g, '`')
- .replace(/&/g, '&'));
+ .replace(/&/g, '&');
// & replacement has to be the last one to prevent
// bugs with intermediate strings containing escape sequences
// See: https://github.com/validatorjs/validator.js/issues/1827
diff --git a/src/lib/util/algorithms.js b/src/lib/util/algorithms.js
index 4ac1f2784..a8fb361a6 100644
--- a/src/lib/util/algorithms.js
+++ b/src/lib/util/algorithms.js
@@ -11,8 +11,10 @@
export function iso7064Check(str) {
let checkvalue = 10;
for (let i = 0; i < str.length - 1; i++) {
- checkvalue = (parseInt(str[i], 10) + checkvalue) % 10 === 0 ? (10 * 2) % 11 :
- (((parseInt(str[i], 10) + checkvalue) % 10) * 2) % 11;
+ checkvalue =
+ (parseInt(str[i], 10) + checkvalue) % 10 === 0
+ ? (10 * 2) % 11
+ : (((parseInt(str[i], 10) + checkvalue) % 10) * 2) % 11;
}
checkvalue = checkvalue === 1 ? 0 : 11 - checkvalue;
return checkvalue === parseInt(str[10], 10);
@@ -31,7 +33,11 @@ export function luhnCheck(str) {
const product = parseInt(str[i], 10) * 2;
if (product > 9) {
// sum digits of product and add to checksum
- checksum += product.toString().split('').map(a => parseInt(a, 10)).reduce((a, b) => a + b, 0);
+ checksum += product
+ .toString()
+ .split('')
+ .map((a) => parseInt(a, 10))
+ .reduce((a, b) => a + b, 0);
} else {
checksum += product;
}
diff --git a/src/lib/util/includes.js b/src/lib/util/includes.js
index 70ace8857..e039dafc8 100644
--- a/src/lib/util/includes.js
+++ b/src/lib/util/includes.js
@@ -1,3 +1,3 @@
-const includes = (arr, val) => arr.some(arrVal => val === arrVal);
+const includes = (arr, val) => arr.some((arrVal) => val === arrVal);
export default includes;
diff --git a/src/lib/util/merge.js b/src/lib/util/merge.js
index 071477696..1abfb5656 100644
--- a/src/lib/util/merge.js
+++ b/src/lib/util/merge.js
@@ -1,4 +1,5 @@
-export default function merge(obj = { }, defaults) {
+// eslint-disable-next-line default-param-last
+export default function merge(obj = {}, defaults) {
for (const key in defaults) {
if (typeof obj[key] === 'undefined') {
obj[key] = defaults[key];
diff --git a/src/lib/util/toString.js b/src/lib/util/toString.js
index fe4563b35..439030173 100644
--- a/src/lib/util/toString.js
+++ b/src/lib/util/toString.js
@@ -5,7 +5,11 @@ export default function toString(input) {
} else {
input = '[object Object]';
}
- } else if (input === null || typeof input === 'undefined' || (isNaN(input) && !input.length)) {
+ } else if (
+ input === null ||
+ typeof input === 'undefined' ||
+ (isNaN(input) && !input.length)
+ ) {
input = '';
}
return String(input);
diff --git a/src/lib/whitelist.js b/src/lib/whitelist.js
index 3df56e71b..db706935e 100644
--- a/src/lib/whitelist.js
+++ b/src/lib/whitelist.js
@@ -1,4 +1,4 @@
-import assertString from './util/assertString';
+import assertString from './util/assertString.js';
export default function whitelist(str, chars) {
assertString(str);
diff --git a/test/clientSide.test.js b/test/clientSide.test.js
index f0b5ca72c..037c4e4a5 100644
--- a/test/clientSide.test.js
+++ b/test/clientSide.test.js
@@ -1,6 +1,8 @@
+/* eslint-disable import/no-extraneous-dependencies */
import assert from 'assert';
-import validator from '../validator';
-import min from '../validator.min';
+import { describe, it } from 'vitest';
+import validator from '../validator.js';
+import min from '../validator.min.js';
describe('Minified version', () => {
it('should export the same things as the server-side version', () => {
@@ -8,14 +10,19 @@ describe('Minified version', () => {
if ({}.hasOwnProperty.call(validator, key)) {
assert.strictEqual(
typeof validator[key],
- typeof min[key], `Minified version did not export ${key}`
+ typeof min[key],
+ `Minified version did not export ${key}`
);
}
}
});
it('should be up to date', () => {
- assert.strictEqual(min.version, validator.version, 'Minified version mismatch. Run `make min`');
+ assert.strictEqual(
+ min.version,
+ validator.version,
+ 'Minified version mismatch. Run `make min`'
+ );
});
it('should validate strings', () => {
diff --git a/test/exports.test.js b/test/exports.test.js
index 0bff532ab..96ec33502 100644
--- a/test/exports.test.js
+++ b/test/exports.test.js
@@ -1,11 +1,16 @@
+/* eslint-disable import/no-extraneous-dependencies */
import assert from 'assert';
-import validator from '../index';
-import { locales as isPostalCodeLocales } from '../src/lib/isPostalCode';
-import { locales as isAlphaLocales } from '../src/lib/isAlpha';
-import { locales as isAlphanumericLocales } from '../src/lib/isAlphanumeric';
-import { locales as isMobilePhoneLocales } from '../src/lib/isMobilePhone';
-import { locales as isFloatLocales } from '../src/lib/isFloat';
-import { locales as ibanCountryCodes } from '../src/lib/isIBAN';
+import { createRequire } from 'module';
+import { describe, it } from 'vitest';
+import validator from '../src/index.js';
+import { locales as isPostalCodeLocales } from '../src/lib/isPostalCode.js';
+import { locales as isAlphaLocales } from '../src/lib/isAlpha.js';
+import { locales as isAlphanumericLocales } from '../src/lib/isAlphanumeric.js';
+import { locales as isMobilePhoneLocales } from '../src/lib/isMobilePhone.js';
+import { locales as isFloatLocales } from '../src/lib/isFloat.js';
+import { locales as ibanCountryCodes } from '../src/lib/isIBAN.js';
+
+const require = createRequire(import.meta.url);
describe('Exports', () => {
it('should export validators', () => {
@@ -21,33 +26,34 @@ describe('Exports', () => {
it('should export the version number', () => {
/* eslint-disable global-require */
assert.strictEqual(
- validator.version, require('../package.json').version,
+ validator.version,
+ require('../package.json').version,
'Version number mismatch in "package.json" vs. "validator.js"'
);
/* eslint-enable global-require */
});
- it('should export isPostalCode\'s supported locales', () => {
+ it("should export isPostalCode's supported locales", () => {
assert.ok(isPostalCodeLocales instanceof Array);
assert.ok(validator.isPostalCodeLocales instanceof Array);
});
- it('should export isAlpha\'s supported locales', () => {
+ it("should export isAlpha's supported locales", () => {
assert.ok(isAlphaLocales instanceof Array);
assert.ok(validator.isAlphaLocales instanceof Array);
});
- it('should export isAlphanumeric\'s supported locales', () => {
+ it("should export isAlphanumeric's supported locales", () => {
assert.ok(isAlphanumericLocales instanceof Array);
assert.ok(validator.isAlphanumericLocales instanceof Array);
});
- it('should export isMobilePhone\'s supported locales', () => {
+ it("should export isMobilePhone's supported locales", () => {
assert.ok(isMobilePhoneLocales instanceof Array);
assert.ok(validator.isMobilePhoneLocales instanceof Array);
});
- it('should export isFloat\'s supported locales', () => {
+ it("should export isFloat's supported locales", () => {
assert.ok(isFloatLocales instanceof Array);
assert.ok(validator.isFloatLocales instanceof Array);
});
diff --git a/test/sanitizers.test.js b/test/sanitizers.test.js
index ecb0e128f..900b0c3c0 100644
--- a/test/sanitizers.test.js
+++ b/test/sanitizers.test.js
@@ -1,5 +1,7 @@
+/* eslint-disable import/no-extraneous-dependencies */
import { format } from 'util';
-import validator from '../src/index';
+import { describe, it } from 'vitest';
+import validator from '../src/index.js';
function test(options) {
let args = options.args || [];
@@ -17,7 +19,10 @@ function test(options) {
if (result !== expected) {
let warning = format(
'validator.%s(%s) returned "%s" but should have returned "%s"',
- options.sanitizer, args.join(', '), result, expected
+ options.sanitizer,
+ args.join(', '),
+ result,
+ expected
);
throw new Error(warning);
@@ -107,7 +112,6 @@ describe('Sanitizers', () => {
expect: { '\\S01010020100001': '01010020100001' },
});
-
test({
sanitizer: 'rtrim',
args: ['01'],
@@ -158,16 +162,14 @@ describe('Sanitizers', () => {
sanitizer: 'escape',
expect: {
'':
- '<script> alert("xss&fun"); </script>',
+ '<script> alert("xss&fun"); </script>',
"":
- '<script> alert('xss&fun'); </script>',
+ '<script> alert('xss&fun'); </script>',
- 'Backtick: `':
- 'Backtick: `',
+ 'Backtick: `': 'Backtick: `',
- 'Backslash: \\':
- 'Backslash: \',
+ 'Backslash: \\': 'Backslash: \',
},
});
});
@@ -177,16 +179,14 @@ describe('Sanitizers', () => {
sanitizer: 'unescape',
expect: {
'<script> alert("xss&fun"); </script>':
- '',
+ '',
'<script> alert('xss&fun'); </script>':
- "",
+ "",
- 'Backtick: `':
- 'Backtick: `',
+ 'Backtick: `': 'Backtick: `',
- 'Escaped string: <':
- 'Escaped string: <',
+ 'Escaped string: <': 'Escaped string: <',
},
});
});
@@ -252,15 +252,17 @@ describe('Sanitizers', () => {
it('should score passwords', () => {
test({
sanitizer: 'isStrongPassword',
- args: [{
- returnScore: true,
- pointsPerUnique: 1,
- pointsPerRepeat: 0.5,
- pointsForContainingLower: 10,
- pointsForContainingUpper: 10,
- pointsForContainingNumber: 10,
- pointsForContainingSymbol: 10,
- }],
+ args: [
+ {
+ returnScore: true,
+ pointsPerUnique: 1,
+ pointsPerRepeat: 0.5,
+ pointsForContainingLower: 10,
+ pointsForContainingUpper: 10,
+ pointsForContainingNumber: 10,
+ pointsForContainingSymbol: 10,
+ },
+ ],
expect: {
abc: 13,
abcc: 13.5,
@@ -294,13 +296,18 @@ describe('Sanitizers', () => {
'some.name@googleMail.com': 'somename@gmail.com',
'some.name+extension@gmail.com': 'somename@gmail.com',
'some.Name+extension@GoogleMail.com': 'somename@gmail.com',
- 'some.name.middleName+extension@gmail.com': 'somenamemiddlename@gmail.com',
- 'some.name.middleName+extension@GoogleMail.com': 'somenamemiddlename@gmail.com',
- 'some.name.midd.leNa.me.+extension@gmail.com': 'somenamemiddlename@gmail.com',
- 'some.name.midd.leNa.me.+extension@GoogleMail.com': 'somenamemiddlename@gmail.com',
+ 'some.name.middleName+extension@gmail.com':
+ 'somenamemiddlename@gmail.com',
+ 'some.name.middleName+extension@GoogleMail.com':
+ 'somenamemiddlename@gmail.com',
+ 'some.name.midd.leNa.me.+extension@gmail.com':
+ 'somenamemiddlename@gmail.com',
+ 'some.name.midd.leNa.me.+extension@GoogleMail.com':
+ 'somenamemiddlename@gmail.com',
'some.name+extension@unknown.com': 'some.name+extension@unknown.com',
'hans@m端ller.com': 'hans@m端ller.com',
- 'some.name.midd..leNa...me...+extension@GoogleMail.com': 'somenamemidd..lena...me...@gmail.com',
+ 'some.name.midd..leNa...me...+extension@GoogleMail.com':
+ 'somenamemidd..lena...me...@gmail.com',
'matthew..example@gmail.com': 'matthew..example@gmail.com',
'"foo@bar"@baz.com': '"foo@bar"@baz.com',
'test@ya.ru': 'test@yandex.ru',
@@ -329,8 +336,10 @@ describe('Sanitizers', () => {
'TEST@me.com': 'test@me.com',
'TEST@ME.COM': 'test@me.com',
'SOME.name@GMAIL.com': 'somename@gmail.com',
- 'SOME.name.middleName+extension@GoogleMail.com': 'somenamemiddlename@gmail.com',
- 'SOME.name.midd.leNa.me.+extension@gmail.com': 'somenamemiddlename@gmail.com',
+ 'SOME.name.middleName+extension@GoogleMail.com':
+ 'somenamemiddlename@gmail.com',
+ 'SOME.name.midd.leNa.me.+extension@gmail.com':
+ 'somenamemiddlename@gmail.com',
'SOME.name@gmail.com': 'somename@gmail.com',
'SOME.name@yahoo.ca': 'some.name@yahoo.ca',
'SOME.name@outlook.ie': 'some.name@outlook.ie',
@@ -342,14 +351,16 @@ describe('Sanitizers', () => {
// Testing *_lowercase
test({
sanitizer: 'normalizeEmail',
- args: [{
- all_lowercase: false,
- gmail_lowercase: false,
- icloud_lowercase: false,
- outlookdotcom_lowercase: false,
- yahoo_lowercase: false,
- yandex_lowercase: false,
- }],
+ args: [
+ {
+ all_lowercase: false,
+ gmail_lowercase: false,
+ icloud_lowercase: false,
+ outlookdotcom_lowercase: false,
+ yahoo_lowercase: false,
+ yandex_lowercase: false,
+ },
+ ],
expect: {
'TEST@FOO.COM': 'TEST@foo.com', // all_lowercase
'ME@gMAil.com': 'ME@gmail.com', // gmail_lowercase
@@ -366,13 +377,15 @@ describe('Sanitizers', () => {
// Should overwrite all the *_lowercase options
test({
sanitizer: 'normalizeEmail',
- args: [{
- all_lowercase: true,
- gmail_lowercase: false, // Overruled
- icloud_lowercase: false, // Overruled
- outlookdotcom_lowercase: false, // Overruled
- yahoo_lowercase: false, // Overruled
- }],
+ args: [
+ {
+ all_lowercase: true,
+ gmail_lowercase: false, // Overruled
+ icloud_lowercase: false, // Overruled
+ outlookdotcom_lowercase: false, // Overruled
+ yahoo_lowercase: false, // Overruled
+ },
+ ],
expect: {
'TEST@FOO.COM': 'test@foo.com', // all_lowercase
'ME@gMAil.com': 'me@gmail.com', // gmail_lowercase
@@ -387,9 +400,11 @@ describe('Sanitizers', () => {
// Testing *_remove_dots
test({
sanitizer: 'normalizeEmail',
- args: [{
- gmail_remove_dots: false,
- }],
+ args: [
+ {
+ gmail_remove_dots: false,
+ },
+ ],
expect: {
'SOME.name@GMAIL.com': 'some.name@gmail.com',
'SOME.name+me@GMAIL.com': 'some.name@gmail.com',
@@ -399,9 +414,11 @@ describe('Sanitizers', () => {
test({
sanitizer: 'normalizeEmail',
- args: [{
- gmail_remove_dots: true,
- }],
+ args: [
+ {
+ gmail_remove_dots: true,
+ },
+ ],
expect: {
'SOME.name@GMAIL.com': 'somename@gmail.com',
'SOME.name+me@GMAIL.com': 'somename@gmail.com',
@@ -413,12 +430,14 @@ describe('Sanitizers', () => {
// Testing *_remove_subaddress
test({
sanitizer: 'normalizeEmail',
- args: [{
- gmail_remove_subaddress: false,
- icloud_remove_subaddress: false,
- outlookdotcom_remove_subaddress: false,
- yahoo_remove_subaddress: false, // Note Yahoo uses "-"
- }],
+ args: [
+ {
+ gmail_remove_subaddress: false,
+ icloud_remove_subaddress: false,
+ outlookdotcom_remove_subaddress: false,
+ yahoo_remove_subaddress: false, // Note Yahoo uses "-"
+ },
+ ],
expect: {
'foo+bar@unknown.com': 'foo+bar@unknown.com',
'foo+bar@gmail.com': 'foo+bar@gmail.com', // gmail_remove_subaddress
@@ -433,12 +452,14 @@ describe('Sanitizers', () => {
test({
sanitizer: 'normalizeEmail',
- args: [{
- gmail_remove_subaddress: true,
- icloud_remove_subaddress: true,
- outlookdotcom_remove_subaddress: true,
- yahoo_remove_subaddress: true, // Note Yahoo uses "-"
- }],
+ args: [
+ {
+ gmail_remove_subaddress: true,
+ icloud_remove_subaddress: true,
+ outlookdotcom_remove_subaddress: true,
+ yahoo_remove_subaddress: true, // Note Yahoo uses "-"
+ },
+ ],
expect: {
'foo+bar@unknown.com': 'foo+bar@unknown.com',
'foo+bar@gmail.com': 'foo@gmail.com', // gmail_remove_subaddress
@@ -454,9 +475,11 @@ describe('Sanitizers', () => {
// Testing gmail_convert_googlemaildotcom
test({
sanitizer: 'normalizeEmail',
- args: [{
- gmail_convert_googlemaildotcom: false,
- }],
+ args: [
+ {
+ gmail_convert_googlemaildotcom: false,
+ },
+ ],
expect: {
'SOME.name@GMAIL.com': 'somename@gmail.com',
'SOME.name+me@GMAIL.com': 'somename@gmail.com',
@@ -469,9 +492,11 @@ describe('Sanitizers', () => {
test({
sanitizer: 'normalizeEmail',
- args: [{
- gmail_convert_googlemaildotcom: true,
- }],
+ args: [
+ {
+ gmail_convert_googlemaildotcom: true,
+ },
+ ],
expect: {
'SOME.name@GMAIL.com': 'somename@gmail.com',
'SOME.name+me@GMAIL.com': 'somename@gmail.com',
diff --git a/test/testFunctions.js b/test/testFunctions.js
index bcd7c15b0..17dc8157a 100644
--- a/test/testFunctions.js
+++ b/test/testFunctions.js
@@ -1,6 +1,6 @@
import assert from 'assert';
import { format } from 'util';
-import validator from '../src/index';
+import validator from '../src/index.js';
export default function test(options) {
const args = options.args || [];
@@ -16,7 +16,8 @@ export default function test(options) {
} catch (err) {
const warning = format(
'validator.%s(%s) passed but should error',
- options.validator, args.join(', ')
+ options.validator,
+ args.join(', ')
);
throw new Error(warning);
@@ -31,7 +32,8 @@ export default function test(options) {
if (validator[options.validator](...args) !== true) {
const warning = format(
'validator.%s(%s) failed but should have passed',
- options.validator, args.join(', ')
+ options.validator,
+ args.join(', ')
);
throw new Error(warning);
@@ -46,7 +48,8 @@ export default function test(options) {
if (validator[options.validator](...args) !== false) {
const warning = format(
'validator.%s(%s) passed but should have failed',
- options.validator, args.join(', ')
+ options.validator,
+ args.join(', ')
);
throw new Error(warning);
diff --git a/test/util.test.js b/test/util.test.js
index 449cd9ee7..f77efafd5 100644
--- a/test/util.test.js
+++ b/test/util.test.js
@@ -1,9 +1,11 @@
+/* eslint-disable import/no-extraneous-dependencies */
/**
* All tests that tests any utility.
* Prevent any breaking of functionality
*/
import assert from 'assert';
-import typeOf from '../src/lib/util/typeOf';
+import { describe, it } from 'vitest';
+import typeOf from '../src/lib/util/typeOf.js';
describe('Util', () => {
it('should validate different typeOf', () => {
diff --git a/test/validators.test.js b/test/validators.test.js
index 6c68cd71a..f9b051231 100644
--- a/test/validators.test.js
+++ b/test/validators.test.js
@@ -1,12 +1,18 @@
+/* eslint-disable import/no-extraneous-dependencies */
import assert from 'assert';
import fs from 'fs';
+import path from 'path';
import timezone_mock from 'timezone-mock';
import { format } from 'util';
+import { describe, it } from 'vitest';
import vm from 'vm';
-import validator from '../src/index';
-import test from './testFunctions';
+import validator from '../src/index.js';
+import test from './testFunctions.js';
-let validator_js = fs.readFileSync(require.resolve('../validator.js')).toString();
+const dirname = path.dirname(new URL(import.meta.url).pathname);
+let validator_js = fs
+ .readFileSync(path.join(dirname, '..', 'validator.js'))
+ .toString();
describe('Validators', () => {
it('should validate email addresses', () => {
@@ -45,7 +51,9 @@ describe('Validators', () => {
`${'a'.repeat(64)}@${'a'.repeat(251)}.com`,
`${'a'.repeat(65)}@${'a'.repeat(250)}.com`,
`${'a'.repeat(64)}@${'a'.repeat(64)}.com`,
- `${'a'.repeat(64)}@${'a'.repeat(63)}.${'a'.repeat(63)}.${'a'.repeat(63)}.${'a'.repeat(58)}.com`,
+ `${'a'.repeat(64)}@${'a'.repeat(63)}.${'a'.repeat(63)}.${'a'.repeat(
+ 63
+ )}.${'a'.repeat(58)}.com`,
'test1@invalid.co m',
'test2@invalid.co m',
'test3@invalid.co m',
@@ -98,9 +106,7 @@ describe('Validators', () => {
test({
validator: 'isEmail',
args: [{ allow_underscores: true }],
- valid: [
- 'foobar@my_sarisari_store.typepad.com',
- ],
+ valid: ['foobar@my_sarisari_store.typepad.com'],
invalid: [],
});
});
@@ -159,7 +165,7 @@ describe('Validators', () => {
'Some Name ',
'Some Name ',
'Some Name ',
- '\'Foo Bar, Esq\'',
+ "'Foo Bar, Esq'",
'Some Name ',
'Some Middle Name ',
'Name ',
@@ -250,10 +256,7 @@ describe('Validators', () => {
test({
validator: 'isEmail',
args: [{ allow_ip_domain: true }],
- valid: [
- 'email@[123.123.123.123]',
- 'email@255.255.255.255',
- ],
+ valid: ['email@[123.123.123.123]', 'email@255.255.255.255'],
invalid: [
'email@0.0.0.256',
'email@26.0.0.256',
@@ -266,16 +269,11 @@ describe('Validators', () => {
test({
validator: 'isEmail',
args: [{ blacklisted_chars: 'abc' }],
- valid: [
- 'emil@gmail.com',
- ],
- invalid: [
- 'email@gmail.com',
- ],
+ valid: ['emil@gmail.com'],
+ invalid: ['email@gmail.com'],
});
});
-
it('should validate really long emails if ignore_max_length is set', () => {
test({
validator: 'isEmail',
@@ -309,13 +307,8 @@ describe('Validators', () => {
test({
validator: 'isEmail',
args: [{ host_blacklist: ['gmail.com', 'foo.bar.com'] }],
- valid: [
- 'email@foo.gmail.com',
- ],
- invalid: [
- 'foo+bar@gmail.com',
- 'email@foo.bar.com',
- ],
+ valid: ['email@foo.gmail.com'],
+ invalid: ['foo+bar@gmail.com', 'email@foo.bar.com'],
});
});
@@ -323,15 +316,8 @@ describe('Validators', () => {
test({
validator: 'isEmail',
args: [{ host_whitelist: ['gmail.com', 'foo.bar.com'] }],
- valid: [
- 'email@gmail.com',
- 'test@foo.bar.com',
- ],
- invalid: [
- 'foo+bar@test.com',
- 'email@foo.com',
- 'email@bar.com',
- ],
+ valid: ['email@gmail.com', 'test@foo.bar.com'],
+ invalid: ['foo+bar@test.com', 'email@foo.com', 'email@bar.com'],
});
});
@@ -361,7 +347,7 @@ describe('Validators', () => {
'http://10.0.0.0/',
'http://189.123.14.13/',
'http://duckduckgo.com/?q=%2F',
- 'http://foobar.com/t$-_.+!*\'(),',
+ "http://foobar.com/t$-_.+!*'(),",
'http://foobar.com/?foo=bar#baz=qux',
'http://foobar.com?foo=bar',
'http://foobar.com#baz=qux',
@@ -423,7 +409,7 @@ describe('Validators', () => {
'http://localhost:61500this is an invalid url!!!!',
'////foobar.com',
'http:////foobar.com',
- 'https://example.com/foo//',
+ "https://example.com/foo//",
],
});
});
@@ -431,79 +417,66 @@ describe('Validators', () => {
it('should validate URLs with custom protocols', () => {
test({
validator: 'isURL',
- args: [{
- protocols: ['rtmp'],
- }],
- valid: [
- 'rtmp://foobar.com',
- ],
- invalid: [
- 'http://foobar.com',
+ args: [
+ {
+ protocols: ['rtmp'],
+ },
],
+ valid: ['rtmp://foobar.com'],
+ invalid: ['http://foobar.com'],
});
});
it('should validate file URLs without a host', () => {
test({
validator: 'isURL',
- args: [{
- protocols: ['file'],
- require_host: false,
- require_tld: false,
- }],
- valid: [
- 'file://localhost/foo.txt',
- 'file:///foo.txt',
- 'file:///',
- ],
- invalid: [
- 'http://foobar.com',
- 'file://',
+ args: [
+ {
+ protocols: ['file'],
+ require_host: false,
+ require_tld: false,
+ },
],
+ valid: ['file://localhost/foo.txt', 'file:///foo.txt', 'file:///'],
+ invalid: ['http://foobar.com', 'file://'],
});
});
it('should validate postgres URLs without a host', () => {
test({
validator: 'isURL',
- args: [{
- protocols: ['postgres'],
- require_host: false,
- }],
- valid: [
- 'postgres://user:pw@/test',
- ],
- invalid: [
- 'http://foobar.com',
- 'postgres://',
+ args: [
+ {
+ protocols: ['postgres'],
+ require_host: false,
+ },
],
+ valid: ['postgres://user:pw@/test'],
+ invalid: ['http://foobar.com', 'postgres://'],
});
});
-
it('should validate URLs with any protocol', () => {
test({
validator: 'isURL',
- args: [{
- require_valid_protocol: false,
- }],
- valid: [
- 'rtmp://foobar.com',
- 'http://foobar.com',
- 'test://foobar.com',
- ],
- invalid: [
- 'mailto:test@example.com',
+ args: [
+ {
+ require_valid_protocol: false,
+ },
],
+ valid: ['rtmp://foobar.com', 'http://foobar.com', 'test://foobar.com'],
+ invalid: ['mailto:test@example.com'],
});
});
it('should validate URLs with underscores', () => {
test({
validator: 'isURL',
- args: [{
- allow_underscores: true,
- }],
+ args: [
+ {
+ allow_underscores: true,
+ },
+ ],
valid: [
'http://foo_bar.com',
'http://pr.example_com.294.example.com/',
@@ -517,9 +490,11 @@ describe('Validators', () => {
it('should validate URLs that do not have a TLD', () => {
test({
validator: 'isURL',
- args: [{
- require_tld: false,
- }],
+ args: [
+ {
+ require_tld: false,
+ },
+ ],
valid: [
'http://foobar.com/',
'http://foobar/',
@@ -534,53 +509,45 @@ describe('Validators', () => {
it('should validate URLs with a trailing dot option', () => {
test({
validator: 'isURL',
- args: [{
- allow_trailing_dot: true,
- require_tld: false,
- }],
- valid: [
- 'http://example.com.',
- 'foobar.',
+ args: [
+ {
+ allow_trailing_dot: true,
+ require_tld: false,
+ },
],
+ valid: ['http://example.com.', 'foobar.'],
});
});
it('should validate URLs with column and no port', () => {
test({
validator: 'isURL',
- valid: [
- 'http://example.com:',
- 'ftp://example.com:',
- ],
- invalid: [
- 'https://example.com:abc',
- ],
+ valid: ['http://example.com:', 'ftp://example.com:'],
+ invalid: ['https://example.com:abc'],
});
});
it('should validate sftp protocol URL containing column and no port', () => {
test({
validator: 'isURL',
- args: [{
- protocols: ['sftp'],
- }],
- valid: [
- 'sftp://user:pass@terminal.aws.test.nl:/incoming/things.csv',
+ args: [
+ {
+ protocols: ['sftp'],
+ },
],
+ valid: ['sftp://user:pass@terminal.aws.test.nl:/incoming/things.csv'],
});
});
it('should validate protocol relative URLs', () => {
test({
validator: 'isURL',
- args: [{
- allow_protocol_relative_urls: true,
- }],
- valid: [
- '//foobar.com',
- 'http://foobar.com',
- 'foobar.com',
+ args: [
+ {
+ allow_protocol_relative_urls: true,
+ },
],
+ valid: ['//foobar.com', 'http://foobar.com', 'foobar.com'],
invalid: [
'://foobar.com',
'/foobar.com',
@@ -593,30 +560,25 @@ describe('Validators', () => {
it('should not validate URLs with fragments when allow fragments is false', () => {
test({
validator: 'isURL',
- args: [{
- allow_fragments: false,
- }],
- valid: [
- 'http://foobar.com',
- 'foobar.com',
- ],
- invalid: [
- 'http://foobar.com#part',
- 'foobar.com#part',
+ args: [
+ {
+ allow_fragments: false,
+ },
],
+ valid: ['http://foobar.com', 'foobar.com'],
+ invalid: ['http://foobar.com#part', 'foobar.com#part'],
});
});
it('should not validate URLs with query components when allow query components is false', () => {
test({
validator: 'isURL',
- args: [{
- allow_query_components: false,
- }],
- valid: [
- 'http://foobar.com',
- 'foobar.com',
+ args: [
+ {
+ allow_query_components: false,
+ },
],
+ valid: ['http://foobar.com', 'foobar.com'],
invalid: [
'http://foobar.com?foo=bar',
'http://foobar.com?foo=bar&bar=foo',
@@ -629,63 +591,51 @@ describe('Validators', () => {
it('should not validate protocol relative URLs when require protocol is true', () => {
test({
validator: 'isURL',
- args: [{
- allow_protocol_relative_urls: true,
- require_protocol: true,
- }],
- valid: [
- 'http://foobar.com',
- ],
- invalid: [
- '//foobar.com',
- '://foobar.com',
- '/foobar.com',
- 'foobar.com',
+ args: [
+ {
+ allow_protocol_relative_urls: true,
+ require_protocol: true,
+ },
],
+ valid: ['http://foobar.com'],
+ invalid: ['//foobar.com', '://foobar.com', '/foobar.com', 'foobar.com'],
});
});
it('should let users specify whether URLs require a protocol', () => {
test({
validator: 'isURL',
- args: [{
- require_protocol: true,
- }],
- valid: [
- 'http://foobar.com/',
- ],
- invalid: [
- 'http://localhost/',
- 'foobar.com',
- 'foobar',
+ args: [
+ {
+ require_protocol: true,
+ },
],
+ valid: ['http://foobar.com/'],
+ invalid: ['http://localhost/', 'foobar.com', 'foobar'],
});
});
it('should let users specify a host whitelist', () => {
test({
validator: 'isURL',
- args: [{
- host_whitelist: ['foo.com', 'bar.com'],
- }],
- valid: [
- 'http://bar.com/',
- 'http://foo.com/',
- ],
- invalid: [
- 'http://foobar.com',
- 'http://foo.bar.com/',
- 'http://qux.com',
+ args: [
+ {
+ host_whitelist: ['foo.com', 'bar.com'],
+ },
],
+ valid: ['http://bar.com/', 'http://foo.com/'],
+ invalid: ['http://foobar.com', 'http://foo.bar.com/', 'http://qux.com'],
});
});
it('should allow regular expressions in the host whitelist', () => {
test({
validator: 'isURL',
- args: [{
- host_whitelist: ['bar.com', 'foo.com', /\.foo\.com$/],
- }],
+ args: [
+ {
+ host_whitelist: ['bar.com', 'foo.com', /\.foo\.com$/],
+ },
+ ],
valid: [
'http://bar.com/',
'http://foo.com/',
@@ -693,43 +643,32 @@ describe('Validators', () => {
'http://cdn.foo.com/',
'http://a.b.c.foo.com/',
],
- invalid: [
- 'http://foobar.com',
- 'http://foo.bar.com/',
- 'http://qux.com',
- ],
+ invalid: ['http://foobar.com', 'http://foo.bar.com/', 'http://qux.com'],
});
});
it('should let users specify a host blacklist', () => {
test({
validator: 'isURL',
- args: [{
- host_blacklist: ['foo.com', 'bar.com'],
- }],
- valid: [
- 'http://foobar.com',
- 'http://foo.bar.com/',
- 'http://qux.com',
- ],
- invalid: [
- 'http://bar.com/',
- 'http://foo.com/',
+ args: [
+ {
+ host_blacklist: ['foo.com', 'bar.com'],
+ },
],
+ valid: ['http://foobar.com', 'http://foo.bar.com/', 'http://qux.com'],
+ invalid: ['http://bar.com/', 'http://foo.com/'],
});
});
it('should allow regular expressions in the host blacklist', () => {
test({
validator: 'isURL',
- args: [{
- host_blacklist: ['bar.com', 'foo.com', /\.foo\.com$/],
- }],
- valid: [
- 'http://foobar.com',
- 'http://foo.bar.com/',
- 'http://qux.com',
+ args: [
+ {
+ host_blacklist: ['bar.com', 'foo.com', /\.foo\.com$/],
+ },
],
+ valid: ['http://foobar.com', 'http://foo.bar.com/', 'http://qux.com'],
invalid: [
'http://bar.com/',
'http://foo.com/',
@@ -744,13 +683,8 @@ describe('Validators', () => {
test({
validator: 'isURL',
args: [{ disallow_auth: true }],
- valid: [
- 'doe.com',
- ],
- invalid: [
- 'john@doe.com',
- 'john:john@doe.com',
- ],
+ valid: ['doe.com'],
+ invalid: ['john@doe.com', 'john:john@doe.com'],
});
});
@@ -852,9 +786,11 @@ describe('Validators', () => {
});
test({
validator: 'isMACAddress',
- args: [{
- eui: '48',
- }],
+ args: [
+ {
+ eui: '48',
+ },
+ ],
valid: [
'ab:ab:ab:ab:ab:ab',
'FF:FF:FF:FF:FF:FF',
@@ -878,9 +814,11 @@ describe('Validators', () => {
});
test({
validator: 'isMACAddress',
- args: [{
- eui: '64',
- }],
+ args: [
+ {
+ eui: '64',
+ },
+ ],
valid: [
'ab:ab:ab:ab:ab:ab:ab:ab',
'FF:FF:FF:FF:FF:FF:FF:FF',
@@ -907,9 +845,11 @@ describe('Validators', () => {
it('should validate MAC addresses without separator', () => {
test({
validator: 'isMACAddress',
- args: [{
- no_separators: true,
- }],
+ args: [
+ {
+ no_separators: true,
+ },
+ ],
valid: [
'abababababab',
'FFFFFFFFFFFF',
@@ -950,16 +890,13 @@ describe('Validators', () => {
});
test({
validator: 'isMACAddress',
- args: [{
- no_separators: true,
- eui: '48',
- }],
- valid: [
- 'abababababab',
- 'FFFFFFFFFFFF',
- '0102030405ab',
- '01AB03040506',
+ args: [
+ {
+ no_separators: true,
+ eui: '48',
+ },
],
+ valid: ['abababababab', 'FFFFFFFFFFFF', '0102030405ab', '01AB03040506'],
invalid: [
'abababababababab',
'FFFFFFFFFFFFFFFF',
@@ -969,22 +906,19 @@ describe('Validators', () => {
});
test({
validator: 'isMACAddress',
- args: [{
- no_separators: true,
- eui: '64',
- }],
+ args: [
+ {
+ no_separators: true,
+ eui: '64',
+ },
+ ],
valid: [
'abababababababab',
'FFFFFFFFFFFFFFFF',
'01020304050607ab',
'01AB030405060708',
],
- invalid: [
- 'abababababab',
- 'FFFFFFFFFFFF',
- '0102030405ab',
- '01AB03040506',
- ],
+ invalid: ['abababababab', 'FFFFFFFFFFFF', '0102030405ab', '01AB03040506'],
});
});
@@ -1176,11 +1110,7 @@ describe('Validators', () => {
test({
validator: 'isIPRange',
args: [6],
- valid: [
- '::1/1',
- '2001:db8:0000:1:1:1:1:1/1',
- '::ffff:127.0.0.1/1',
- ],
+ valid: ['::1/1', '2001:db8:0000:1:1:1:1:1/1', '::ffff:127.0.0.1/1'],
invalid: [
'abc',
'127.0.0.1',
@@ -1254,81 +1184,49 @@ describe('Validators', () => {
it('should validate FQDN with trailing dot option', () => {
test({
validator: 'isFQDN',
- args: [
- { allow_trailing_dot: true },
- ],
- valid: [
- 'example.com.',
- ],
+ args: [{ allow_trailing_dot: true }],
+ valid: ['example.com.'],
});
});
it('should invalidate FQDN when not require_tld', () => {
test({
validator: 'isFQDN',
- args: [
- { require_tld: false },
- ],
- invalid: [
- 'example.0',
- '192.168.0',
- '192.168.0.9999',
- ],
+ args: [{ require_tld: false }],
+ invalid: ['example.0', '192.168.0', '192.168.0.9999'],
});
});
it('should validate FQDN when not require_tld but allow_numeric_tld', () => {
test({
validator: 'isFQDN',
- args: [
- { allow_numeric_tld: true, require_tld: false },
- ],
- valid: [
- 'example.0',
- '192.168.0',
- '192.168.0.9999',
- ],
+ args: [{ allow_numeric_tld: true, require_tld: false }],
+ valid: ['example.0', '192.168.0', '192.168.0.9999'],
});
});
it('should validate FQDN with wildcard option', () => {
test({
validator: 'isFQDN',
- args: [
- { allow_wildcard: true },
- ],
- valid: [
- '*.example.com',
- '*.shop.example.com',
- ],
+ args: [{ allow_wildcard: true }],
+ valid: ['*.example.com', '*.shop.example.com'],
});
});
it('should validate FQDN with required allow_trailing_dot, allow_underscores and allow_numeric_tld options', () => {
test({
validator: 'isFQDN',
args: [
- { allow_trailing_dot: true, allow_underscores: true, allow_numeric_tld: true },
- ],
- valid: [
- 'abc.efg.g1h.',
- 'as1s.sad3s.ssa2d.',
+ {
+ allow_trailing_dot: true,
+ allow_underscores: true,
+ allow_numeric_tld: true,
+ },
],
+ valid: ['abc.efg.g1h.', 'as1s.sad3s.ssa2d.'],
});
});
it('should validate alpha strings', () => {
test({
validator: 'isAlpha',
- valid: [
- 'abc',
- 'ABC',
- 'FoObar',
- ],
- invalid: [
- 'abc1',
- ' foo ',
- '',
- 'ÄBC',
- 'FÜübar',
- 'Jön',
- 'Heiß',
- ],
+ valid: ['abc', 'ABC', 'FoObar'],
+ invalid: ['abc1', ' foo ', '', 'ÄBC', 'FÜübar', 'Jön', 'Heiß'],
});
});
@@ -1336,11 +1234,7 @@ describe('Validators', () => {
test({
validator: 'isAlpha',
args: ['en-US', { ignore: '- /' }], // ignore [space-/]
- valid: [
- 'en-US',
- 'this is a valid alpha string',
- 'us/usa',
- ],
+ valid: ['en-US', 'this is a valid alpha string', 'us/usa'],
invalid: [
'1. this is not a valid alpha string',
'this$is also not a valid.alpha string',
@@ -1351,10 +1245,7 @@ describe('Validators', () => {
test({
validator: 'isAlpha',
args: ['en-US', { ignore: /[\s/-]/g }], // ignore [space -]
- valid: [
- 'en-US',
- 'this is a valid alpha string',
- ],
+ valid: ['en-US', 'this is a valid alpha string'],
invalid: [
'1. this is not a valid alpha string',
'this$is also not a valid.alpha string',
@@ -1365,9 +1256,7 @@ describe('Validators', () => {
test({
validator: 'isAlpha',
args: ['en-US', { ignore: 1234 }], // invalid ignore matcher
- error: [
- 'alpha',
- ],
+ error: ['alpha'],
});
});
@@ -1383,14 +1272,7 @@ describe('Validators', () => {
'dahaBirDüzgünString',
'abcçdeəfgğhxıijkqlmnoöprsştuüvyz',
],
- invalid: [
- 'rəqəm1',
- ' foo ',
- '',
- 'ab(cd)',
- 'simvol@',
- 'wəkil',
- ],
+ invalid: ['rəqəm1', ' foo ', '', 'ab(cd)', 'simvol@', 'wəkil'],
});
});
@@ -1398,20 +1280,8 @@ describe('Validators', () => {
test({
validator: 'isAlpha',
args: ['bg-BG'],
- valid: [
- 'абв',
- 'АБВ',
- 'жаба',
- 'яГоДа',
- ],
- invalid: [
- 'abc1',
- ' foo ',
- '',
- 'ЁЧПС',
- '_аз_обичам_обувки_',
- 'ехо!',
- ],
+ valid: ['абв', 'АБВ', 'жаба', 'яГоДа'],
+ invalid: ['abc1', ' foo ', '', 'ЁЧПС', '_аз_обичам_обувки_', 'ехо!'],
});
});
@@ -1419,19 +1289,8 @@ describe('Validators', () => {
test({
validator: 'isAlpha',
args: ['bn-BD'],
- valid: [
- 'অয়াওর',
- 'ফগফদ্রত',
- 'ফদ্ম্যতভ',
- 'বেরেওভচনভন',
- 'আমারবাসগা',
- ],
- invalid: [
- 'দাস২৩৪',
- ' দ্গফহ্নভ ',
- '',
- '(গফদ)',
- ],
+ valid: ['অয়াওর', 'ফগফদ্রত', 'ফদ্ম্যতভ', 'বেরেওভচনভন', 'আমারবাসগা'],
+ invalid: ['দাস২৩৪', ' দ্গফহ্নভ ', '', '(গফদ)'],
});
});
@@ -1439,18 +1298,8 @@ describe('Validators', () => {
test({
validator: 'isAlpha',
args: ['cs-CZ'],
- valid: [
- 'žluťoučký',
- 'KŮŇ',
- 'Pěl',
- 'Ďábelské',
- 'ódy',
- ],
- invalid: [
- 'ábc1',
- ' fůj ',
- '',
- ],
+ valid: ['žluťoučký', 'KŮŇ', 'Pěl', 'Ďábelské', 'ódy'],
+ invalid: ['ábc1', ' fůj ', ''],
});
});
@@ -1470,12 +1319,7 @@ describe('Validators', () => {
'Ďábelské',
'ódy',
],
- invalid: [
- '1moj',
- '你好世界',
- ' Привет мир ',
- 'مرحبا العا ',
- ],
+ invalid: ['1moj', '你好世界', ' Привет мир ', 'مرحبا العا '],
});
});
@@ -1483,17 +1327,8 @@ describe('Validators', () => {
test({
validator: 'isAlpha',
args: ['da-DK'],
- valid: [
- 'aøå',
- 'Ære',
- 'Øre',
- 'Åre',
- ],
- invalid: [
- 'äbc123',
- 'ÄBC11',
- '',
- ],
+ valid: ['aøå', 'Ære', 'Øre', 'Åre'],
+ invalid: ['äbc123', 'ÄBC11', ''],
});
});
@@ -1501,18 +1336,8 @@ describe('Validators', () => {
test({
validator: 'isAlpha',
args: ['nl-NL'],
- valid: [
- 'Kán',
- 'één',
- 'vóór',
- 'nú',
- 'héél',
- ],
- invalid: [
- 'äca ',
- 'abcß',
- 'Øre',
- ],
+ valid: ['Kán', 'één', 'vóór', 'nú', 'héél'],
+ invalid: ['äca ', 'abcß', 'Øre'],
});
});
@@ -1520,17 +1345,8 @@ describe('Validators', () => {
test({
validator: 'isAlpha',
args: ['de-DE'],
- valid: [
- 'äbc',
- 'ÄBC',
- 'FöÖbär',
- 'Heiß',
- ],
- invalid: [
- 'äbc1',
- ' föö ',
- '',
- ],
+ valid: ['äbc', 'ÄBC', 'FöÖbär', 'Heiß'],
+ invalid: ['äbc1', ' föö ', ''],
});
});
@@ -1538,16 +1354,8 @@ describe('Validators', () => {
test({
validator: 'isAlpha',
args: ['hu-HU'],
- valid: [
- 'árvíztűrőtükörfúrógép',
- 'ÁRVÍZTŰRŐTÜKÖRFÚRÓGÉP',
- ],
- invalid: [
- 'äbc1',
- ' fäö ',
- 'Heiß',
- '',
- ],
+ valid: ['árvíztűrőtükörfúrógép', 'ÁRVÍZTŰRŐTÜKÖRFÚRÓGÉP'],
+ invalid: ['äbc1', ' fäö ', 'Heiß', ''],
});
});
@@ -1555,19 +1363,8 @@ describe('Validators', () => {
test({
validator: 'isAlpha',
args: ['pt-PT'],
- valid: [
- 'palíndromo',
- 'órgão',
- 'qwértyúão',
- 'àäãcëüïÄÏÜ',
- ],
- invalid: [
- '12abc',
- 'Heiß',
- 'Øre',
- 'æøå',
- '',
- ],
+ valid: ['palíndromo', 'órgão', 'qwértyúão', 'àäãcëüïÄÏÜ'],
+ invalid: ['12abc', 'Heiß', 'Øre', 'æøå', ''],
});
});
@@ -1585,12 +1382,7 @@ describe('Validators', () => {
'PÉSCA',
'genî',
],
- invalid: [
- 'äbc123',
- 'ÄBC11',
- 'æøå',
- '',
- ],
+ invalid: ['äbc123', 'ÄBC11', 'æøå', ''],
});
});
@@ -1612,11 +1404,7 @@ describe('Validators', () => {
'七人の侍',
'シン・ウルトラマン',
],
- invalid: [
- 'あいう123',
- 'abcあいう',
- '1984',
- ],
+ invalid: ['あいう123', 'abcあいう', '1984'],
});
});
@@ -1633,11 +1421,7 @@ describe('Validators', () => {
'ағылшынша',
'түсінбедім',
],
- invalid: [
- 'Кешіріңіз1',
- ' Кет бар ',
- 'مرحبا العا',
- ],
+ invalid: ['Кешіріңіз1', ' Кет бар ', 'مرحبا العا'],
});
});
@@ -1645,19 +1429,8 @@ describe('Validators', () => {
test({
validator: 'isAlpha',
args: ['vi-VN'],
- valid: [
- 'thiến',
- 'nghiêng',
- 'xin',
- 'chào',
- 'thế',
- 'giới',
- ],
- invalid: [
- 'thầy3',
- 'Ba gà',
- '',
- ],
+ valid: ['thiến', 'nghiêng', 'xin', 'chào', 'thế', 'giới'],
+ invalid: ['thầy3', 'Ba gà', ''],
});
});
@@ -1665,10 +1438,7 @@ describe('Validators', () => {
test({
validator: 'isAlpha',
args: ['ar'],
- valid: [
- 'أبت',
- 'اَبِتَثّجً',
- ],
+ valid: ['أبت', 'اَبِتَثّجً'],
invalid: [
'١٢٣أبت',
'١٢٣',
@@ -1687,12 +1457,7 @@ describe('Validators', () => {
test({
validator: 'isAlpha',
args: ['fa-IR'],
- valid: [
- 'پدر',
- 'مادر',
- 'برادر',
- 'خواهر',
- ],
+ valid: ['پدر', 'مادر', 'برادر', 'خواهر'],
invalid: [
'فارسی۱۲۳',
'۱۶۴',
@@ -1711,17 +1476,8 @@ describe('Validators', () => {
test({
validator: 'isAlpha',
args: ['fi-FI'],
- valid: [
- 'äiti',
- 'Öljy',
- 'Åke',
- 'testÖ',
- ],
- invalid: [
- 'AİıÖöÇ窺ĞğÜüZ',
- 'äöå123',
- '',
- ],
+ valid: ['äiti', 'Öljy', 'Åke', 'testÖ'],
+ invalid: ['AİıÖöÇ窺ĞğÜüZ', 'äöå123', ''],
});
});
@@ -1729,10 +1485,7 @@ describe('Validators', () => {
test({
validator: 'isAlpha',
args: ['ku-IQ'],
- valid: [
- 'ئؤڤگێ',
- 'کوردستان',
- ],
+ valid: ['ئؤڤگێ', 'کوردستان'],
invalid: [
'ئؤڤگێ١٢٣',
'١٢٣',
@@ -1751,17 +1504,8 @@ describe('Validators', () => {
test({
validator: 'isAlpha',
args: ['nb-NO'],
- valid: [
- 'aøå',
- 'Ære',
- 'Øre',
- 'Åre',
- ],
- invalid: [
- 'äbc123',
- 'ÄBC11',
- '',
- ],
+ valid: ['aøå', 'Ære', 'Øre', 'Åre'],
+ invalid: ['äbc123', 'ÄBC11', ''],
});
});
@@ -1778,11 +1522,7 @@ describe('Validators', () => {
'święty',
'Pozwól',
],
- invalid: [
- '12řiď ',
- 'blé!!',
- 'föö!2!',
- ],
+ invalid: ['12řiď ', 'blé!!', 'föö!2!'],
});
});
@@ -1790,15 +1530,8 @@ describe('Validators', () => {
test({
validator: 'isAlpha',
args: ['sr-RS'],
- valid: [
- 'ШћжЂљЕ',
- 'ЧПСТЋЏ',
- ],
- invalid: [
- 'řiď ',
- 'blé33!!',
- 'föö!!',
- ],
+ valid: ['ШћжЂљЕ', 'ЧПСТЋЏ'],
+ invalid: ['řiď ', 'blé33!!', 'föö!!'],
});
});
@@ -1806,15 +1539,8 @@ describe('Validators', () => {
test({
validator: 'isAlpha',
args: ['sr-RS@latin'],
- valid: [
- 'ŠAabčšđćž',
- 'ŠATROĆčđš',
- ],
- invalid: [
- '12řiď ',
- 'blé!!',
- 'föö!2!',
- ],
+ valid: ['ŠAabčšđćž', 'ŠATROĆčđš'],
+ invalid: ['12řiď ', 'blé!!', 'föö!2!'],
});
});
@@ -1822,18 +1548,8 @@ describe('Validators', () => {
test({
validator: 'isAlpha',
args: ['es-ES'],
- valid: [
- 'ábcó',
- 'ÁBCÓ',
- 'dormís',
- 'volvés',
- 'español',
- ],
- invalid: [
- 'äca ',
- 'abcß',
- 'föö!!',
- ],
+ valid: ['ábcó', 'ÁBCÓ', 'dormís', 'volvés', 'español'],
+ invalid: ['äca ', 'abcß', 'föö!!'],
});
});
@@ -1841,17 +1557,8 @@ describe('Validators', () => {
test({
validator: 'isAlpha',
args: ['sv-SE'],
- valid: [
- 'religiös',
- 'stjäla',
- 'västgöte',
- 'Åre',
- ],
- invalid: [
- 'AİıÖöÇ窺ĞğÜüZ',
- 'religiös23',
- '',
- ],
+ valid: ['religiös', 'stjäla', 'västgöte', 'Åre'],
+ invalid: ['AİıÖöÇ窺ĞğÜüZ', 'religiös23', ''],
});
});
@@ -1859,10 +1566,7 @@ describe('Validators', () => {
test({
validator: 'isAlpha',
args: ['ar-SY'],
- valid: [
- 'أبت',
- 'اَبِتَثّجً',
- ],
+ valid: ['أبت', 'اَبِتَثّجً'],
invalid: [
'١٢٣أبت',
'١٢٣',
@@ -1881,9 +1585,7 @@ describe('Validators', () => {
test({
validator: 'isAlpha',
args: ['tr-TR'],
- valid: [
- 'AİıÖöÇ窺ĞğÜüZ',
- ],
+ valid: ['AİıÖöÇ窺ĞğÜüZ'],
invalid: [
'0AİıÖöÇ窺ĞğÜüZ1',
' AİıÖöÇ窺ĞğÜüZ ',
@@ -1900,9 +1602,7 @@ describe('Validators', () => {
test({
validator: 'isAlpha',
args: ['uk-UA'],
- valid: [
- 'АБВГҐДЕЄЖЗИIЇЙКЛМНОПРСТУФХЦШЩЬЮЯ',
- ],
+ valid: ['АБВГҐДЕЄЖЗИIЇЙКЛМНОПРСТУФХЦШЩЬЮЯ'],
invalid: [
'0AİıÖöÇ窺ĞğÜüZ1',
' AİıÖöÇ窺ĞğÜüZ ',
@@ -1942,16 +1642,8 @@ describe('Validators', () => {
test({
validator: 'isAlpha',
args: ['he'],
- valid: [
- 'בדיקה',
- 'שלום',
- ],
- invalid: [
- 'בדיקה123',
- ' foo ',
- 'abc1',
- '',
- ],
+ valid: ['בדיקה', 'שלום'],
+ invalid: ['בדיקה123', ' foo ', 'abc1', ''],
});
});
@@ -1963,14 +1655,7 @@ describe('Validators', () => {
'अतअपनाअपनीअपनेअभीअंदरआदिआपइत्यादिइनइनकाइन्हींइन्हेंइन्होंइसइसकाइसकीइसकेइसमेंइसीइसेउनउनकाउनकीउनकेउनकोउन्हींउन्हेंउन्होंउसउसकेउसीउसेएकएवंएसऐसेऔरकईकरकरताकरतेकरनाकरनेकरेंकहतेकहाकाकाफ़ीकिकितनाकिन्हेंकिन्होंकियाकिरकिसकिसीकिसेकीकुछकुलकेकोकोईकौनकौनसागयाघरजबजहाँजाजितनाजिनजिन्हेंजिन्होंजिसजिसेजीधरजैसाजैसेजोतकतबतरहतिनतिन्हेंतिन्होंतिसतिसेतोथाथीथेदबारादियादुसरादूसरेदोद्वाराननकेनहींनानिहायतनीचेनेपरपहलेपूरापेफिरबनीबहीबहुतबादबालाबिलकुलभीभीतरमगरमानोमेमेंयदियहयहाँयहीयायिहयेरखेंरहारहेऱ्वासालिएलियेलेकिनववग़ैरहवर्गवहवहाँवहींवालेवुहवेवोसकतासकतेसबसेसभीसाथसाबुतसाभसारासेसोसंगहीहुआहुईहुएहैहैंहोहोताहोतीहोतेहोनाहोने',
'इन्हें',
],
- invalid: [
- 'अत०२३४५६७८९',
- 'अत 12',
- ' अत ',
- 'abc1',
- 'abc',
- '',
- ],
+ invalid: ['अत०२३४५६७८९', 'अत 12', ' अत ', 'abc1', 'abc', ''],
});
});
@@ -1978,16 +1663,8 @@ describe('Validators', () => {
test({
validator: 'isAlpha',
args: ['fa-IR'],
- valid: [
- 'تست',
- 'عزیزم',
- 'ح',
- ],
- invalid: [
- 'تست 1',
- ' عزیزم ',
- '',
- ],
+ valid: ['تست', 'عزیزم', 'ح'],
+ invalid: ['تست 1', ' عزیزم ', ''],
});
});
@@ -1995,15 +1672,8 @@ describe('Validators', () => {
test({
validator: 'isAlpha',
args: ['th-TH'],
- valid: [
- 'สวัสดี',
- 'ยินดีต้อนรับ เทสเคส',
- ],
- invalid: [
- 'สวัสดีHi',
- '123 ยินดีต้อนรับ',
- 'ยินดีต้อนรับ-๑๒๓',
- ],
+ valid: ['สวัสดี', 'ยินดีต้อนรับ เทสเคส'],
+ invalid: ['สวัสดีHi', '123 ยินดีต้อนรับ', 'ยินดีต้อนรับ-๑๒๓'],
});
});
@@ -2032,19 +1702,8 @@ describe('Validators', () => {
test({
validator: 'isAlpha',
args: ['si-LK'],
- valid: [
- 'චතුර',
- 'කචටදබ',
- 'ඎඏදාෛපසුගො',
- ],
- invalid: [
- 'ஆஐअतක',
- 'කචට 12',
- ' ඎ ',
- 'abc1',
- 'abc',
- '',
- ],
+ valid: ['චතුර', 'කචටදබ', 'ඎඏදාෛපසුගො'],
+ invalid: ['ஆஐअतක', 'කචට 12', ' ඎ ', 'abc1', 'abc', ''],
});
});
@@ -2052,27 +1711,15 @@ describe('Validators', () => {
test({
validator: 'isAlpha',
args: ['is-NOT'],
- error: [
- 'abc',
- 'ABC',
- ],
+ error: ['abc', 'ABC'],
});
});
it('should validate alphanumeric strings', () => {
test({
validator: 'isAlphanumeric',
- valid: [
- 'abc123',
- 'ABC11',
- ],
- invalid: [
- 'abc ',
- 'foo!!',
- 'ÄBC',
- 'FÜübar',
- 'Jön',
- ],
+ valid: ['abc123', 'ABC11'],
+ invalid: ['abc ', 'foo!!', 'ÄBC', 'FÜübar', 'Jön'],
});
});
@@ -2085,33 +1732,20 @@ describe('Validators', () => {
'this is a valid alphaNumeric string',
'En-US @ alpha_numeric',
],
- invalid: [
- 'In*Valid',
- 'hello$123',
- '{invalid}',
- ],
+ invalid: ['In*Valid', 'hello$123', '{invalid}'],
});
test({
validator: 'isAlphanumeric',
args: ['en-US', { ignore: /[\s/-]/g }], // ignore [space -]
- valid: [
- 'en-US',
- 'this is a valid alphaNumeric string',
- ],
- invalid: [
- 'INVALID$ AlphaNum Str',
- 'hello@123',
- 'abc*123',
- ],
+ valid: ['en-US', 'this is a valid alphaNumeric string'],
+ invalid: ['INVALID$ AlphaNum Str', 'hello@123', 'abc*123'],
});
test({
validator: 'isAlphanumeric',
args: ['en-US', { ignore: 1234 }], // invalid ignore matcher (ignore should be instance of a String or RegExp)
- error: [
- 'alpha',
- ],
+ error: ['alpha'],
});
});
@@ -2119,17 +1753,8 @@ describe('Validators', () => {
test({
validator: 'isAlphanumeric',
args: ['en-GB'],
- valid: [
- 'abc123',
- 'ABC11',
- ],
- invalid: [
- 'abc ',
- 'foo!!',
- 'ÄBC',
- 'FÜübar',
- 'Jön',
- ],
+ valid: ['abc123', 'ABC11'],
+ invalid: ['abc ', 'foo!!', 'ÄBC', 'FÜübar', 'Jön'],
});
});
@@ -2137,20 +1762,8 @@ describe('Validators', () => {
test({
validator: 'isAlphanumeric',
args: ['az-AZ'],
- valid: [
- 'Azərbaycan',
- 'Bakı',
- 'abc1',
- 'abcç2',
- '3kərə4kərə',
- ],
- invalid: [
- ' foo1 ',
- '',
- 'ab(cd)',
- 'simvol@',
- 'wəkil',
- ],
+ valid: ['Azərbaycan', 'Bakı', 'abc1', 'abcç2', '3kərə4kərə'],
+ invalid: [' foo1 ', '', 'ab(cd)', 'simvol@', 'wəkil'],
});
});
@@ -2158,19 +1771,8 @@ describe('Validators', () => {
test({
validator: 'isAlphanumeric',
args: ['bg-BG'],
- valid: [
- 'абв1',
- '4АБ5В6',
- 'жаба',
- 'яГоДа2',
- 'йЮя',
- '123',
- ],
- invalid: [
- ' ',
- '789 ',
- 'hello000',
- ],
+ valid: ['абв1', '4АБ5В6', 'жаба', 'яГоДа2', 'йЮя', '123'],
+ invalid: [' ', '789 ', 'hello000'],
});
});
@@ -2185,11 +1787,7 @@ describe('Validators', () => {
'১২৩৪',
'৩৪২৩৪দফজ্ঞদফ',
],
- invalid: [
- ' ',
- '১২৩ ',
- 'hel৩২0',
- ],
+ invalid: [' ', '১২৩ ', 'hel৩২0'],
});
});
@@ -2197,14 +1795,8 @@ describe('Validators', () => {
test({
validator: 'isAlphanumeric',
args: ['cs-CZ'],
- valid: [
- 'řiť123',
- 'KŮŇ11',
- ],
- invalid: [
- 'řiď ',
- 'blé!!',
- ],
+ valid: ['řiť123', 'KŮŇ11'],
+ invalid: ['řiď ', 'blé!!'],
});
});
@@ -2224,11 +1816,7 @@ describe('Validators', () => {
'9Ďábelské',
'10ódy',
],
- invalid: [
- '1moj!',
- '你好世界',
- ' Привет мир ',
- ],
+ invalid: ['1moj!', '你好世界', ' Привет мир '],
});
});
@@ -2236,17 +1824,8 @@ describe('Validators', () => {
test({
validator: 'isAlphanumeric',
args: ['da-DK'],
- valid: [
- 'ÆØÅ123',
- 'Ære321',
- '321Øre',
- '123Åre',
- ],
- invalid: [
- 'äbc123',
- 'ÄBC11',
- '',
- ],
+ valid: ['ÆØÅ123', 'Ære321', '321Øre', '123Åre'],
+ invalid: ['äbc123', 'ÄBC11', ''],
});
});
@@ -2254,18 +1833,8 @@ describe('Validators', () => {
test({
validator: 'isAlphanumeric',
args: ['nl-NL'],
- valid: [
- 'Kán123',
- 'één354',
- 'v4óór',
- 'nú234',
- 'hé54él',
- ],
- invalid: [
- '1äca ',
- 'ab3cß',
- 'Øre',
- ],
+ valid: ['Kán123', 'één354', 'v4óór', 'nú234', 'hé54él'],
+ invalid: ['1äca ', 'ab3cß', 'Øre'],
});
});
@@ -2273,17 +1842,8 @@ describe('Validators', () => {
test({
validator: 'isAlphanumeric',
args: ['fi-FI'],
- valid: [
- 'äiti124',
- 'ÖLJY1234',
- '123Åke',
- '451åå23',
- ],
- invalid: [
- 'AİıÖöÇ窺ĞğÜüZ',
- 'foo!!',
- '',
- ],
+ valid: ['äiti124', 'ÖLJY1234', '123Åke', '451åå23'],
+ invalid: ['AİıÖöÇ窺ĞğÜüZ', 'foo!!', ''],
});
});
@@ -2291,14 +1851,8 @@ describe('Validators', () => {
test({
validator: 'isAlphanumeric',
args: ['de-DE'],
- valid: [
- 'äbc123',
- 'ÄBC11',
- ],
- invalid: [
- 'äca ',
- 'föö!!',
- ],
+ valid: ['äbc123', 'ÄBC11'],
+ invalid: ['äca ', 'föö!!'],
});
});
@@ -2306,17 +1860,8 @@ describe('Validators', () => {
test({
validator: 'isAlphanumeric',
args: ['hu-HU'],
- valid: [
- '0árvíztűrőtükörfúrógép123',
- '0ÁRVÍZTŰRŐTÜKÖRFÚRÓGÉP123',
- ],
- invalid: [
- '1időúr!',
- 'äbc1',
- ' fäö ',
- 'Heiß!',
- '',
- ],
+ valid: ['0árvíztűrőtükörfúrógép123', '0ÁRVÍZTŰRŐTÜKÖRFÚRÓGÉP123'],
+ invalid: ['1időúr!', 'äbc1', ' fäö ', 'Heiß!', ''],
});
});
@@ -2324,19 +1869,8 @@ describe('Validators', () => {
test({
validator: 'isAlphanumeric',
args: ['pt-PT'],
- valid: [
- 'palíndromo',
- '2órgão',
- 'qwértyúão9',
- 'àäãcë4üïÄÏÜ',
- ],
- invalid: [
- '!abc',
- 'Heiß',
- 'Øre',
- 'æøå',
- '',
- ],
+ valid: ['palíndromo', '2órgão', 'qwértyúão9', 'àäãcë4üïÄÏÜ'],
+ invalid: ['!abc', 'Heiß', 'Øre', 'æøå', ''],
});
});
@@ -2354,12 +1888,7 @@ describe('Validators', () => {
'PÉS45CA',
'gen45î',
],
- invalid: [
- 'äbc123',
- 'ÄBC11',
- 'æøå',
- '',
- ],
+ invalid: ['äbc123', 'ÄBC11', 'æøå', ''],
});
});
@@ -2367,15 +1896,8 @@ describe('Validators', () => {
test({
validator: 'isAlphanumeric',
args: ['es-ES'],
- valid: [
- 'ábcó123',
- 'ÁBCÓ11',
- ],
- invalid: [
- 'äca ',
- 'abcß',
- 'föö!!',
- ],
+ valid: ['ábcó123', 'ÁBCÓ11'],
+ invalid: ['äca ', 'abcß', 'föö!!'],
});
});
@@ -2383,14 +1905,8 @@ describe('Validators', () => {
test({
validator: 'isAlphanumeric',
args: ['vi-VN'],
- valid: [
- 'Thầy3',
- '3Gà',
- ],
- invalid: [
- 'toang!',
- 'Cậu Vàng',
- ],
+ valid: ['Thầy3', '3Gà'],
+ invalid: ['toang!', 'Cậu Vàng'],
});
});
@@ -2398,15 +1914,8 @@ describe('Validators', () => {
test({
validator: 'isAlphanumeric',
args: ['ar'],
- valid: [
- 'أبت123',
- 'أبتَُِ١٢٣',
- ],
- invalid: [
- 'äca ',
- 'abcß',
- 'föö!!',
- ],
+ valid: ['أبت123', 'أبتَُِ١٢٣'],
+ invalid: ['äca ', 'abcß', 'föö!!'],
});
});
@@ -2418,15 +1927,7 @@ describe('Validators', () => {
'अतअपनाअपनीअपनेअभीअंदरआदिआपइत्यादिइनइनकाइन्हींइन्हेंइन्होंइसइसकाइसकीइसकेइसमेंइसीइसेउनउनकाउनकीउनकेउनकोउन्हींउन्हेंउन्होंउसउसकेउसीउसेएकएवंएसऐसेऔरकईकरकरताकरतेकरनाकरनेकरेंकहतेकहाकाकाफ़ीकिकितनाकिन्हेंकिन्होंकियाकिरकिसकिसीकिसेकीकुछकुलकेकोकोईकौनकौनसागयाघरजबजहाँजाजितनाजिनजिन्हेंजिन्होंजिसजिसेजीधरजैसाजैसेजोतकतबतरहतिनतिन्हेंतिन्होंतिसतिसेतोथाथीथेदबारादियादुसरादूसरेदोद्वाराननकेनहींनानिहायतनीचेनेपरपहलेपूरापेफिरबनीबहीबहुतबादबालाबिलकुलभीभीतरमगरमानोमेमेंयदियहयहाँयहीयायिहयेरखेंरहारहेऱ्वासालिएलियेलेकिनववग़ैरहवर्गवहवहाँवहींवालेवुहवेवोसकतासकतेसबसेसभीसाथसाबुतसाभसारासेसोसंगहीहुआहुईहुएहैहैंहोहोताहोतीहोतेहोनाहोने०२३४५६७८९',
'इन्हें४५६७८९',
],
- invalid: [
- 'अत ०२३४५६७८९',
- ' ३४५६७८९',
- '12 ',
- ' अत ',
- 'abc1',
- 'abc',
- '',
- ],
+ invalid: ['अत ०२३४५६७८९', ' ३४५६७८९', '12 ', ' अत ', 'abc1', 'abc', ''],
});
});
@@ -2434,17 +1935,8 @@ describe('Validators', () => {
test({
validator: 'isAlphanumeric',
args: ['fa-IR'],
- valid: [
- 'پارسی۱۲۳',
- '۱۴۵۶',
- 'مژگان9',
- ],
- invalid: [
- 'äca ',
- 'abcßة',
- 'föö!!',
- '٤٥٦',
- ],
+ valid: ['پارسی۱۲۳', '۱۴۵۶', 'مژگان9'],
+ invalid: ['äca ', 'abcßة', 'föö!!', '٤٥٦'],
});
});
@@ -2462,11 +1954,7 @@ describe('Validators', () => {
'20世紀少年',
'華氏451度',
],
- invalid: [
- ' あいう123 ',
- 'abcあいう',
- '生きろ!!',
- ],
+ invalid: [' あいう123 ', 'abcあいう', '生きろ!!'],
});
});
@@ -2483,11 +1971,7 @@ describe('Validators', () => {
'жалғыз',
'570бердім',
],
- invalid: [
- ' кешіріңіз ',
- 'abcағылшынша',
- 'мүмкін!!',
- ],
+ invalid: [' кешіріңіз ', 'abcағылшынша', 'мүмкін!!'],
});
});
@@ -2495,14 +1979,8 @@ describe('Validators', () => {
test({
validator: 'isAlphanumeric',
args: ['ku-IQ'],
- valid: [
- 'ئؤڤگێ١٢٣',
- ],
- invalid: [
- 'äca ',
- 'abcß',
- 'föö!!',
- ],
+ valid: ['ئؤڤگێ١٢٣'],
+ invalid: ['äca ', 'abcß', 'föö!!'],
});
});
@@ -2510,17 +1988,8 @@ describe('Validators', () => {
test({
validator: 'isAlphanumeric',
args: ['ar-SY'],
- valid: [
- 'أبت123',
- 'أبتَُِ١٢٣',
- ],
- invalid: [
- 'abc ',
- 'foo!!',
- 'ÄBC',
- 'FÜübar',
- 'Jön',
- ],
+ valid: ['أبت123', 'أبتَُِ١٢٣'],
+ invalid: ['abc ', 'foo!!', 'ÄBC', 'FÜübar', 'Jön'],
});
});
@@ -2528,17 +1997,8 @@ describe('Validators', () => {
test({
validator: 'isAlphanumeric',
args: ['nb-NO'],
- valid: [
- 'ÆØÅ123',
- 'Ære321',
- '321Øre',
- '123Åre',
- ],
- invalid: [
- 'äbc123',
- 'ÄBC11',
- '',
- ],
+ valid: ['ÆØÅ123', 'Ære321', '321Øre', '123Åre'],
+ invalid: ['äbc123', 'ÄBC11', ''],
});
});
@@ -2555,11 +2015,7 @@ describe('Validators', () => {
'świ23ęty',
'Poz1322wól',
],
- invalid: [
- '12řiď ',
- 'blé!!',
- 'föö!2!',
- ],
+ invalid: ['12řiď ', 'blé!!', 'föö!2!'],
});
});
@@ -2567,15 +2023,8 @@ describe('Validators', () => {
test({
validator: 'isAlphanumeric',
args: ['sr-RS'],
- valid: [
- 'ШћжЂљЕ123',
- 'ЧПСТ132ЋЏ',
- ],
- invalid: [
- 'řiď ',
- 'blé!!',
- 'föö!!',
- ],
+ valid: ['ШћжЂљЕ123', 'ЧПСТ132ЋЏ'],
+ invalid: ['řiď ', 'blé!!', 'föö!!'],
});
});
@@ -2583,15 +2032,8 @@ describe('Validators', () => {
test({
validator: 'isAlphanumeric',
args: ['sr-RS@latin'],
- valid: [
- 'ŠAabčšđćž123',
- 'ŠATRO11Ćčđš',
- ],
- invalid: [
- 'řiď ',
- 'blé!!',
- 'föö!!',
- ],
+ valid: ['ŠAabčšđćž123', 'ŠATRO11Ćčđš'],
+ invalid: ['řiď ', 'blé!!', 'föö!!'],
});
});
@@ -2599,17 +2041,8 @@ describe('Validators', () => {
test({
validator: 'isAlphanumeric',
args: ['sv-SE'],
- valid: [
- 'religiös13',
- 'st23jäla',
- 'västgöte123',
- '123Åre',
- ],
- invalid: [
- 'AİıÖöÇ窺ĞğÜüZ',
- 'foo!!',
- '',
- ],
+ valid: ['religiös13', 'st23jäla', 'västgöte123', '123Åre'],
+ invalid: ['AİıÖöÇ窺ĞğÜüZ', 'foo!!', ''],
});
});
@@ -2617,14 +2050,8 @@ describe('Validators', () => {
test({
validator: 'isAlphanumeric',
args: ['tr-TR'],
- valid: [
- 'AİıÖöÇ窺ĞğÜüZ123',
- ],
- invalid: [
- 'AİıÖöÇ窺ĞğÜüZ ',
- 'foo!!',
- 'ÄBC',
- ],
+ valid: ['AİıÖöÇ窺ĞğÜüZ123'],
+ invalid: ['AİıÖöÇ窺ĞğÜüZ ', 'foo!!', 'ÄBC'],
});
});
@@ -2632,15 +2059,8 @@ describe('Validators', () => {
test({
validator: 'isAlphanumeric',
args: ['uk-UA'],
- valid: [
- 'АБВГҐДЕЄЖЗИIЇЙКЛМНОПРСТУФХЦШЩЬЮЯ123',
- ],
- invalid: [
- 'éeoc ',
- 'foo!!',
- 'ÄBC',
- 'ЫыЪъЭэ',
- ],
+ valid: ['АБВГҐДЕЄЖЗИIЇЙКЛМНОПРСТУФХЦШЩЬЮЯ123'],
+ invalid: ['éeoc ', 'foo!!', 'ÄBC', 'ЫыЪъЭэ'],
});
});
@@ -2669,16 +2089,8 @@ describe('Validators', () => {
test({
validator: 'isAlphanumeric',
args: ['he'],
- valid: [
- 'אבג123',
- 'שלום11',
- ],
- invalid: [
- 'אבג ',
- 'לא!!',
- 'abc',
- ' foo ',
- ],
+ valid: ['אבג123', 'שלום11'],
+ invalid: ['אבג ', 'לא!!', 'abc', ' foo '],
});
});
@@ -2686,14 +2098,8 @@ describe('Validators', () => {
test({
validator: 'isAlphanumeric',
args: ['th-TH'],
- valid: [
- 'สวัสดี ๑๒๓',
- 'ยินดีต้อนรับทั้ง ๒ คน',
- ],
- invalid: [
- '1.สวัสดี',
- 'ยินดีต้อนรับทั้ง 2 คน',
- ],
+ valid: ['สวัสดี ๑๒๓', 'ยินดีต้อนรับทั้ง ๒ คน'],
+ invalid: ['1.สวัสดี', 'ยินดีต้อนรับทั้ง 2 คน'],
});
});
@@ -2701,16 +2107,8 @@ describe('Validators', () => {
test({
validator: 'isAlphanumeric',
args: ['ko-KR'],
- valid: [
- '2002',
- '훈민정음',
- '1446년훈민정음반포',
- ],
- invalid: [
- '2022!',
- '2019 코로나시작',
- '1.로렘입숨',
- ],
+ valid: ['2002', '훈민정음', '1446년훈민정음반포'],
+ invalid: ['2022!', '2019 코로나시작', '1.로렘입숨'],
});
});
@@ -2718,20 +2116,8 @@ describe('Validators', () => {
test({
validator: 'isAlphanumeric',
args: ['si-LK'],
- valid: [
- 'චතුර',
- 'කචට12',
- 'ඎඏදාෛපසුගො2',
- '1234',
- ],
- invalid: [
- 'ஆஐअतක',
- 'කචට 12',
- ' ඎ ',
- 'a1234',
- 'abc',
- '',
- ],
+ valid: ['චතුර', 'කචට12', 'ඎඏදාෛපසුගො2', '1234'],
+ invalid: ['ஆஐअतක', 'කචට 12', ' ඎ ', 'a1234', 'abc', ''],
});
});
@@ -2739,10 +2125,7 @@ describe('Validators', () => {
test({
validator: 'isAlphanumeric',
args: ['is-NOT'],
- error: [
- '1234568960',
- 'abc123',
- ],
+ error: ['1234568960', 'abc123'],
});
});
@@ -2759,44 +2142,31 @@ describe('Validators', () => {
'123.123',
'+000000',
],
- invalid: [
- ' ',
- '',
- '.',
- ],
+ invalid: [' ', '', '.'],
});
});
it('should validate numeric strings without symbols', () => {
test({
validator: 'isNumeric',
- args: [{
- no_symbols: true,
- }],
- valid: [
- '123',
- '00123',
- '0',
- ],
- invalid: [
- '-0',
- '+000000',
- '',
- '+123',
- '123.123',
- '-00123',
- ' ',
- '.',
+ args: [
+ {
+ no_symbols: true,
+ },
],
+ valid: ['123', '00123', '0'],
+ invalid: ['-0', '+000000', '', '+123', '123.123', '-00123', ' ', '.'],
});
});
it('should validate numeric strings with locale', () => {
test({
validator: 'isNumeric',
- args: [{
- locale: 'fr-FR',
- }],
+ args: [
+ {
+ locale: 'fr-FR',
+ },
+ ],
valid: [
'123',
'00123',
@@ -2807,20 +2177,18 @@ describe('Validators', () => {
'123,123',
'+000000',
],
- invalid: [
- ' ',
- '',
- ',',
- ],
+ invalid: [' ', '', ','],
});
});
it('should validate numeric strings with locale', () => {
test({
validator: 'isNumeric',
- args: [{
- locale: 'fr-CA',
- }],
+ args: [
+ {
+ locale: 'fr-CA',
+ },
+ ],
valid: [
'123',
'00123',
@@ -2831,31 +2199,15 @@ describe('Validators', () => {
'123,123',
'+000000',
],
- invalid: [
- ' ',
- '',
- '.',
- ],
+ invalid: [' ', '', '.'],
});
});
it('should validate ports', () => {
test({
validator: 'isPort',
- valid: [
- '0',
- '22',
- '80',
- '443',
- '3000',
- '8080',
- '65535',
- ],
- invalid: [
- '',
- '-1',
- '65536',
- ],
+ valid: ['0', '22', '80', '443', '3000', '8080', '65535'],
+ invalid: ['', '-1', '65536'],
});
});
@@ -2863,158 +2215,91 @@ describe('Validators', () => {
test({
validator: 'isPassportNumber',
args: ['AM'],
- valid: [
- 'AF0549358',
- ],
- invalid: [
- 'A1054935',
- ],
+ valid: ['AF0549358'],
+ invalid: ['A1054935'],
});
-
test({
validator: 'isPassportNumber',
args: ['ID'],
- valid: [
- 'C1253473',
- 'B5948378',
- 'A4859472',
- ],
- invalid: [
- 'D39481728',
- 'A-3847362',
- '324132132',
- ],
+ valid: ['C1253473', 'B5948378', 'A4859472'],
+ invalid: ['D39481728', 'A-3847362', '324132132'],
});
test({
validator: 'isPassportNumber',
args: ['AR'],
- valid: [
- 'AAC811035',
- ],
- invalid: [
- 'A11811035',
- ],
+ valid: ['AAC811035'],
+ invalid: ['A11811035'],
});
test({
validator: 'isPassportNumber',
args: ['AT'],
- valid: [
- 'P 1630837',
- 'P 4366918',
- ],
- invalid: [
- '0 1630837',
- ],
+ valid: ['P 1630837', 'P 4366918'],
+ invalid: ['0 1630837'],
});
test({
validator: 'isPassportNumber',
args: ['AU'],
- valid: [
- 'N0995852',
- 'L4819236',
- ],
- invalid: [
- '1A012345',
- ],
+ valid: ['N0995852', 'L4819236'],
+ invalid: ['1A012345'],
});
test({
validator: 'isPassportNumber',
args: ['AZ'],
- valid: [
- 'AZE16175905',
- 'AA1617595',
- ],
- invalid: [
- 'A12345843',
- ],
+ valid: ['AZE16175905', 'AA1617595'],
+ invalid: ['A12345843'],
});
test({
validator: 'isPassportNumber',
args: ['BE'],
- valid: [
- 'EM000000',
- 'LA080402',
- ],
- invalid: [
- '00123456',
- ],
+ valid: ['EM000000', 'LA080402'],
+ invalid: ['00123456'],
});
test({
validator: 'isPassportNumber',
args: ['BG'],
- valid: [
- '346395366',
- '039903356',
- ],
- invalid: [
- 'ABC123456',
- ],
+ valid: ['346395366', '039903356'],
+ invalid: ['ABC123456'],
});
test({
validator: 'isPassportNumber',
args: ['BR'],
- valid: [
- 'FZ973689',
- 'GH231233',
- ],
- invalid: [
- 'ABX29332',
- ],
+ valid: ['FZ973689', 'GH231233'],
+ invalid: ['ABX29332'],
});
test({
validator: 'isPassportNumber',
args: ['BY'],
- valid: [
- 'MP3899901',
- ],
- invalid: [
- '345333454',
- 'FG53334542',
- ],
+ valid: ['MP3899901'],
+ invalid: ['345333454', 'FG53334542'],
});
test({
validator: 'isPassportNumber',
args: ['CA'],
- valid: [
- 'GA302922',
- 'ZE000509',
- ],
- invalid: [
- 'AB0123456',
- ],
+ valid: ['GA302922', 'ZE000509'],
+ invalid: ['AB0123456'],
});
test({
validator: 'isPassportNumber',
args: ['CH'],
- valid: [
- 'S1100409',
- 'S5200073',
- 'X4028791',
- ],
- invalid: [
- 'AB123456',
- ],
+ valid: ['S1100409', 'S5200073', 'X4028791'],
+ invalid: ['AB123456'],
});
test({
validator: 'isPassportNumber',
args: ['CN'],
- valid: [
- 'G25352389',
- 'E00160027',
- 'EA1234567',
- ],
+ valid: ['G25352389', 'E00160027', 'EA1234567'],
invalid: [
'K0123456',
'E-1234567',
@@ -3028,60 +2313,35 @@ describe('Validators', () => {
test({
validator: 'isPassportNumber',
args: ['CY'],
- valid: [
- 'K00000413',
- ],
- invalid: [
- 'K10100',
- ],
+ valid: ['K00000413'],
+ invalid: ['K10100'],
});
test({
validator: 'isPassportNumber',
args: ['CZ'],
- valid: [
- '99003853',
- '42747260',
- ],
- invalid: [
- '012345678',
- 'AB123456',
- ],
+ valid: ['99003853', '42747260'],
+ invalid: ['012345678', 'AB123456'],
});
test({
validator: 'isPassportNumber',
args: ['DE'],
- valid: [
- 'C01X00T47',
- 'C26VMVVC3',
- ],
- invalid: [
- 'AS0123456',
- 'A012345678',
- ],
+ valid: ['C01X00T47', 'C26VMVVC3'],
+ invalid: ['AS0123456', 'A012345678'],
});
test({
validator: 'isPassportNumber',
args: ['DK'],
- valid: [
- '900010172',
- ],
- invalid: [
- '01234567',
- 'K01234567',
- ],
+ valid: ['900010172'],
+ invalid: ['01234567', 'K01234567'],
});
test({
validator: 'isPassportNumber',
args: ['DZ'],
- valid: [
- '855609385',
- '154472412',
- '197025599',
- ],
+ valid: ['855609385', '154472412', '197025599'],
invalid: [
'AS0123456',
'A012345678',
@@ -3094,386 +2354,200 @@ describe('Validators', () => {
test({
validator: 'isPassportNumber',
args: ['EE'],
- valid: [
- 'K4218285',
- 'K3295867',
- 'KB0167630',
- 'VD0023777',
- ],
- invalid: [
- 'K01234567',
- 'KB00112233',
- ],
+ valid: ['K4218285', 'K3295867', 'KB0167630', 'VD0023777'],
+ invalid: ['K01234567', 'KB00112233'],
});
test({
validator: 'isPassportNumber',
args: ['ES'],
- valid: [
- 'AF238143',
- 'ZAB000254',
- ],
- invalid: [
- 'AF01234567',
- ],
+ valid: ['AF238143', 'ZAB000254'],
+ invalid: ['AF01234567'],
});
test({
validator: 'isPassportNumber',
args: ['FI'],
- valid: [
- 'XP8271602',
- 'XD8500003',
- ],
- invalid: [
- 'A01234567',
- 'ABC012345',
- ],
+ valid: ['XP8271602', 'XD8500003'],
+ invalid: ['A01234567', 'ABC012345'],
});
test({
validator: 'isPassportNumber',
args: ['FR'],
- valid: [
- '10CV28144',
- '60RF19342',
- '05RP34083',
- ],
- invalid: [
- '012345678',
- 'AB0123456',
- '01C234567',
- ],
+ valid: ['10CV28144', '60RF19342', '05RP34083'],
+ invalid: ['012345678', 'AB0123456', '01C234567'],
});
test({
validator: 'isPassportNumber',
args: ['GB'],
- valid: [
- '925076473',
- '107182890',
- '104121156',
- ],
- invalid: [
- 'A012345678',
- 'K000000000',
- '0123456789',
- ],
+ valid: ['925076473', '107182890', '104121156'],
+ invalid: ['A012345678', 'K000000000', '0123456789'],
});
test({
validator: 'isPassportNumber',
args: ['GR'],
- valid: [
- 'AE0000005',
- 'AK0219304',
- ],
- invalid: [
- 'A01234567',
- '012345678',
- ],
+ valid: ['AE0000005', 'AK0219304'],
+ invalid: ['A01234567', '012345678'],
});
test({
validator: 'isPassportNumber',
args: ['HR'],
- valid: [
- '007007007',
- '138463188',
- ],
- invalid: [
- 'A01234567',
- '00112233',
- ],
+ valid: ['007007007', '138463188'],
+ invalid: ['A01234567', '00112233'],
});
test({
validator: 'isPassportNumber',
args: ['HU'],
- valid: [
- 'ZA084505',
- 'BA0006902',
- ],
- invalid: [
- 'A01234567',
- '012345678',
- ],
+ valid: ['ZA084505', 'BA0006902'],
+ invalid: ['A01234567', '012345678'],
});
test({
validator: 'isPassportNumber',
args: ['IE'],
- valid: [
- 'D23145890',
- 'X65097105',
- 'XN0019390',
- ],
- invalid: [
- 'XND012345',
- '0123456789',
- ],
+ valid: ['D23145890', 'X65097105', 'XN0019390'],
+ invalid: ['XND012345', '0123456789'],
});
test({
validator: 'isPassportNumber',
args: ['IN'],
- valid: [
- 'A-1234567',
- 'A1234567',
- 'X0019390',
- ],
- invalid: [
- 'AB-1234567',
- '0123456789',
- ],
+ valid: ['A-1234567', 'A1234567', 'X0019390'],
+ invalid: ['AB-1234567', '0123456789'],
});
test({
validator: 'isPassportNumber',
args: ['IR'],
- valid: [
- 'J97634522',
- 'A01234567',
- 'Z11977831',
- ],
- invalid: [
- 'A0123456',
- 'A0123456Z',
- '012345678',
- ],
+ valid: ['J97634522', 'A01234567', 'Z11977831'],
+ invalid: ['A0123456', 'A0123456Z', '012345678'],
});
test({
validator: 'isPassportNumber',
args: ['IS'],
- valid: [
- 'A2040611',
- 'A1197783',
- ],
- invalid: [
- 'K0000000',
- '01234567',
- ],
+ valid: ['A2040611', 'A1197783'],
+ invalid: ['K0000000', '01234567'],
});
test({
validator: 'isPassportNumber',
args: ['IT'],
- valid: [
- 'YA8335453',
- 'KK0000000',
- ],
- invalid: [
- '01234567',
- 'KAK001122',
- ],
+ valid: ['YA8335453', 'KK0000000'],
+ invalid: ['01234567', 'KAK001122'],
});
test({
validator: 'isPassportNumber',
args: ['JM'],
- valid: [
- 'A0123456',
- ],
- invalid: [
- 's0123456',
- 'a01234567',
- ],
+ valid: ['A0123456'],
+ invalid: ['s0123456', 'a01234567'],
});
test({
validator: 'isPassportNumber',
args: ['JP'],
- valid: [
- 'NH1106002',
- 'TE3180251',
- 'XS1234567',
- ],
- invalid: [
- 'X12345678',
- '012345678',
- ],
+ valid: ['NH1106002', 'TE3180251', 'XS1234567'],
+ invalid: ['X12345678', '012345678'],
});
test({
validator: 'isPassportNumber',
args: ['KR'],
- valid: [
- 'M35772699',
- 'M70689098',
- ],
- invalid: [
- 'X12345678',
- '012345678',
- ],
+ valid: ['M35772699', 'M70689098'],
+ invalid: ['X12345678', '012345678'],
});
test({
validator: 'isPassportNumber',
args: ['KZ'],
- valid: [
- 'A0123456',
- 'b0123456',
- ],
- invalid: [
- '01234567',
- 'bb0123456',
- ],
+ valid: ['A0123456', 'b0123456'],
+ invalid: ['01234567', 'bb0123456'],
});
test({
validator: 'isPassportNumber',
args: ['LI'],
- valid: [
- 'a01234',
- 'f01234',
- ],
- invalid: [
- '012345',
- ],
+ valid: ['a01234', 'f01234'],
+ invalid: ['012345'],
});
test({
validator: 'isPassportNumber',
args: ['LT'],
- valid: [
- '20200997',
- 'LB311756',
- ],
- invalid: [
- 'LB01234567',
- ],
+ valid: ['20200997', 'LB311756'],
+ invalid: ['LB01234567'],
});
test({
validator: 'isPassportNumber',
args: ['LU'],
- valid: [
- 'JCU9J4T2',
- 'JC4E7L2H',
- ],
- invalid: [
- 'JCU9J4T',
- 'JC4E7L2H0',
- ],
+ valid: ['JCU9J4T2', 'JC4E7L2H'],
+ invalid: ['JCU9J4T', 'JC4E7L2H0'],
});
test({
validator: 'isPassportNumber',
args: ['LV'],
- valid: [
- 'LV9000339',
- 'LV4017173',
- ],
- invalid: [
- 'LV01234567',
- '4017173LV',
- ],
+ valid: ['LV9000339', 'LV4017173'],
+ invalid: ['LV01234567', '4017173LV'],
});
test({
validator: 'isPassportNumber',
args: ['LY'],
- valid: [
- 'P79JF34X',
- 'RJ45H4V2',
- ],
- invalid: [
- 'P79JF34',
- 'RJ45H4V2C',
- 'RJ4-H4V2',
- ],
+ valid: ['P79JF34X', 'RJ45H4V2'],
+ invalid: ['P79JF34', 'RJ45H4V2C', 'RJ4-H4V2'],
});
test({
validator: 'isPassportNumber',
args: ['MT'],
- valid: [
- '1026564',
- ],
- invalid: [
- '01234567',
- 'MT01234',
- ],
+ valid: ['1026564'],
+ invalid: ['01234567', 'MT01234'],
});
test({
validator: 'isPassportNumber',
args: ['MZ'],
- valid: [
- 'AB0808212',
- '08AB12123',
- ],
- invalid: [
- '1AB011241',
- '1AB01121',
- 'ABAB01121',
- ],
+ valid: ['AB0808212', '08AB12123'],
+ invalid: ['1AB011241', '1AB01121', 'ABAB01121'],
});
test({
validator: 'isPassportNumber',
args: ['MY'],
- valid: [
- 'A00000000',
- 'H12345678',
- 'K43143233',
- ],
- invalid: [
- 'A1234567',
- 'C01234567',
- ],
+ valid: ['A00000000', 'H12345678', 'K43143233'],
+ invalid: ['A1234567', 'C01234567'],
});
test({
validator: 'isPassportNumber',
args: ['MX'],
- valid: [
- '43986369222',
- '01234567890',
- ],
- invalid: [
- 'ABC34567890',
- '34567890',
- ],
+ valid: ['43986369222', '01234567890'],
+ invalid: ['ABC34567890', '34567890'],
});
test({
validator: 'isPassportNumber',
args: ['NL'],
- valid: [
- 'XTR110131',
- 'XR1001R58',
- ],
- invalid: [
- 'XTR11013R',
- 'XR1001R58A',
- ],
+ valid: ['XTR110131', 'XR1001R58'],
+ invalid: ['XTR11013R', 'XR1001R58A'],
});
test({
validator: 'isPassportNumber',
args: ['PK'],
- valid: [
- 'QZ1791293',
- 'XR1001458',
- ],
- invalid: [
- 'XTR11013R',
- 'XR1001R58A',
- ],
+ valid: ['QZ1791293', 'XR1001458'],
+ invalid: ['XTR11013R', 'XR1001R58A'],
});
test({
validator: 'isPassportNumber',
args: ['PH'],
- valid: [
- 'X123456',
- 'XY123456',
- 'XY1234567',
- 'X1234567Y',
- ],
- invalid: [
- 'XY12345',
- 'X12345Z',
- 'XY12345Z',
- ],
+ valid: ['X123456', 'XY123456', 'XY1234567', 'X1234567Y'],
+ invalid: ['XY12345', 'X12345Z', 'XY12345Z'],
});
test({
@@ -3488,62 +2562,34 @@ describe('Validators', () => {
'ep012345',
'n012345',
],
- invalid: [
- 'Lp012345',
- 'nd012345',
- 'ed012345',
- 'eh012345',
- 'ef012345',
- ],
+ invalid: ['Lp012345', 'nd012345', 'ed012345', 'eh012345', 'ef012345'],
});
test({
validator: 'isPassportNumber',
args: ['PL'],
- valid: [
- 'ZS 0000177',
- 'AN 3000011',
- ],
- invalid: [
- 'A1 0000177',
- '012345678',
- ],
+ valid: ['ZS 0000177', 'AN 3000011'],
+ invalid: ['A1 0000177', '012345678'],
});
test({
validator: 'isPassportNumber',
args: ['PT'],
- valid: [
- 'I700044',
- 'K453286',
- ],
- invalid: [
- '0700044',
- 'K4532861',
- ],
+ valid: ['I700044', 'K453286'],
+ invalid: ['0700044', 'K4532861'],
});
test({
validator: 'isPassportNumber',
args: ['RO'],
- valid: [
- '05485968',
- '040005646',
- ],
- invalid: [
- 'R05485968',
- '0511060461',
- ],
+ valid: ['05485968', '040005646'],
+ invalid: ['R05485968', '0511060461'],
});
test({
validator: 'isPassportNumber',
args: ['RU'],
- valid: [
- '2 32 636829',
- '012 345321',
- '439863692',
- ],
+ valid: ['2 32 636829', '012 345321', '439863692'],
invalid: [
'A 2R YU46J0',
'01A 3D5321',
@@ -3556,97 +2602,50 @@ describe('Validators', () => {
test({
validator: 'isPassportNumber',
args: ['SE'],
- valid: [
- '59000001',
- '56702928',
- ],
- invalid: [
- 'SE012345',
- '012345678',
- ],
+ valid: ['59000001', '56702928'],
+ invalid: ['SE012345', '012345678'],
});
test({
validator: 'isPassportNumber',
args: ['SL'],
- valid: [
- 'PB0036440',
- 'PB1390281',
- ],
- invalid: [
- 'SL0123456',
- 'P01234567',
- ],
+ valid: ['PB0036440', 'PB1390281'],
+ invalid: ['SL0123456', 'P01234567'],
});
test({
validator: 'isPassportNumber',
args: ['SK'],
- valid: [
- 'P0000000',
- ],
- invalid: [
- 'SK012345',
- '012345678',
- ],
+ valid: ['P0000000'],
+ invalid: ['SK012345', '012345678'],
});
test({
validator: 'isPassportNumber',
args: ['TH'],
- valid: [
- 'A123456',
- 'B1234567',
- 'CD123456',
- 'EF1234567',
- ],
- invalid: [
- '123456',
- '1234567',
- '010485371AA',
- ],
+ valid: ['A123456', 'B1234567', 'CD123456', 'EF1234567'],
+ invalid: ['123456', '1234567', '010485371AA'],
});
test({
validator: 'isPassportNumber',
args: ['TR'],
- valid: [
- 'U 06764100',
- 'U 01048537',
- ],
- invalid: [
- '06764100U',
- '010485371',
- ],
+ valid: ['U 06764100', 'U 01048537'],
+ invalid: ['06764100U', '010485371'],
});
test({
validator: 'isPassportNumber',
args: ['UA'],
- valid: [
- 'EH345655',
- 'EK000001',
- 'AP841503',
- ],
- invalid: [
- '01234567',
- '012345EH',
- 'A012345P',
- ],
+ valid: ['EH345655', 'EK000001', 'AP841503'],
+ invalid: ['01234567', '012345EH', 'A012345P'],
});
test({
validator: 'isPassportNumber',
args: ['US'],
- valid: [
- '790369937',
- '340007237',
- ],
- invalid: [
- 'US0123456',
- '0123456US',
- '7903699371',
- ],
+ valid: ['790369937', '340007237'],
+ invalid: ['US0123456', '0123456US', '7903699371'],
});
});
@@ -3853,35 +2852,21 @@ describe('Validators', () => {
test({
validator: 'isDecimal',
args: [{ locale: ['ar-EG'] }],
- valid: [
- '0.01',
- ],
- invalid: [
- '0,01',
- ],
+ valid: ['0.01'],
+ invalid: ['0,01'],
});
test({
validator: 'isDecimal',
args: [{ locale: ['en-ZM'] }],
- valid: [
- '0,01',
- ],
- invalid: [
- '0.01',
- ],
+ valid: ['0,01'],
+ invalid: ['0.01'],
});
test({
validator: 'isDecimal',
args: [{ force_decimal: true }],
- valid: [
- '0.01',
- '.1',
- '1.0',
- '-.25',
- '0.0000000000001',
- ],
+ valid: ['0.01', '.1', '1.0', '-.25', '0.0000000000001'],
invalid: [
'-0',
'123',
@@ -3951,31 +2936,18 @@ describe('Validators', () => {
test({
validator: 'isDecimal',
args: [{ locale: ['is-NOT'] }],
- error: [
- '123',
- '0.01',
- '0,01',
- ],
+ error: ['123', '0.01', '0,01'],
});
});
it('should validate lowercase strings', () => {
test({
validator: 'isLowercase',
- valid: [
- 'abc',
- 'abc123',
- 'this is lowercase.',
- 'tr竪s 端ber',
- ],
- invalid: [
- 'fooBar',
- '123A',
- ],
+ valid: ['abc', 'abc123', 'this is lowercase.', 'tr竪s 端ber'],
+ invalid: ['fooBar', '123A'],
});
});
-
it('should validate imei strings', () => {
test({
validator: 'isIMEI',
@@ -3987,15 +2959,10 @@ describe('Validators', () => {
'998227667144730',
'532729766805999',
],
- invalid: [
- '490154203237517',
- '3568680000414120',
- '3520990017614823',
- ],
+ invalid: ['490154203237517', '3568680000414120', '3520990017614823'],
});
});
-
it('should validate imei strings with hyphens', () => {
test({
validator: 'isIMEI',
@@ -4016,64 +2983,25 @@ describe('Validators', () => {
});
});
-
it('should validate uppercase strings', () => {
test({
validator: 'isUppercase',
- valid: [
- 'ABC',
- 'ABC123',
- 'ALL CAPS IS FUN.',
- ' .',
- ],
- invalid: [
- 'fooBar',
- '123abc',
- ],
+ valid: ['ABC', 'ABC123', 'ALL CAPS IS FUN.', ' .'],
+ invalid: ['fooBar', '123abc'],
});
});
it('should validate integers', () => {
test({
validator: 'isInt',
- valid: [
- '13',
- '123',
- '0',
- '123',
- '-0',
- '+1',
- '01',
- '-01',
- '000',
- ],
- invalid: [
- '100e10',
- '123.123',
- ' ',
- '',
- ],
+ valid: ['13', '123', '0', '123', '-0', '+1', '01', '-01', '000'],
+ invalid: ['100e10', '123.123', ' ', ''],
});
test({
validator: 'isInt',
args: [{ allow_leading_zeroes: false }],
- valid: [
- '13',
- '123',
- '0',
- '123',
- '-0',
- '+1',
- ],
- invalid: [
- '01',
- '-01',
- '000',
- '100e10',
- '123.123',
- ' ',
- '',
- ],
+ valid: ['13', '123', '0', '123', '-0', '+1'],
+ invalid: ['01', '-01', '000', '100e10', '123.123', ' ', ''],
});
test({
validator: 'isInt',
@@ -4091,69 +3019,39 @@ describe('Validators', () => {
'-000',
'+000',
],
- invalid: [
- '100e10',
- '123.123',
- ' ',
- '',
- ],
+ invalid: ['100e10', '123.123', ' ', ''],
});
test({
validator: 'isInt',
- args: [{
- min: 10,
- }],
- valid: [
- '15',
- '80',
- '99',
- ],
- invalid: [
- '9',
- '6',
- '3.2',
- 'a',
+ args: [
+ {
+ min: 10,
+ },
],
+ valid: ['15', '80', '99'],
+ invalid: ['9', '6', '3.2', 'a'],
});
test({
validator: 'isInt',
- args: [{
- min: 10,
- max: 15,
- }],
- valid: [
- '15',
- '11',
- '13',
- ],
- invalid: [
- '9',
- '2',
- '17',
- '3.2',
- '33',
- 'a',
+ args: [
+ {
+ min: 10,
+ max: 15,
+ },
],
+ valid: ['15', '11', '13'],
+ invalid: ['9', '2', '17', '3.2', '33', 'a'],
});
test({
validator: 'isInt',
- args: [{
- gt: 10,
- lt: 15,
- }],
- valid: [
- '14',
- '11',
- '13',
- ],
- invalid: [
- '10',
- '15',
- '17',
- '3.2',
- '33',
- 'a',
+ args: [
+ {
+ gt: 10,
+ lt: 15,
+ },
],
+ valid: ['14', '11', '13'],
+ invalid: ['10', '15', '17', '3.2', '33', 'a'],
});
});
@@ -4204,14 +3102,7 @@ describe('Validators', () => {
'01.123',
'-0.22250738585072011e-307',
],
- invalid: [
- '123٫123',
- '123,123',
- ' ',
- '',
- '.',
- 'foo',
- ],
+ invalid: ['123٫123', '123,123', ' ', '', '.', 'foo'],
});
test({
@@ -4231,14 +3122,7 @@ describe('Validators', () => {
'01,123',
'-0,22250738585072011e-307',
],
- invalid: [
- '123.123',
- '123٫123',
- ' ',
- '',
- '.',
- 'foo',
- ],
+ invalid: ['123.123', '123٫123', ' ', '', '.', 'foo'],
});
test({
@@ -4258,113 +3142,63 @@ describe('Validators', () => {
'01٫123',
'-0٫22250738585072011e-307',
],
- invalid: [
- '123,123',
- '123.123',
- ' ',
- '',
- '.',
- 'foo',
- ],
+ invalid: ['123,123', '123.123', ' ', '', '.', 'foo'],
});
test({
validator: 'isFloat',
- args: [{
- min: 3.7,
- }],
- valid: [
- '3.888',
- '3.92',
- '4.5',
- '50',
- '3.7',
- '3.71',
- ],
- invalid: [
- '3.6',
- '3.69',
- '3',
- '1.5',
- 'a',
+ args: [
+ {
+ min: 3.7,
+ },
],
+ valid: ['3.888', '3.92', '4.5', '50', '3.7', '3.71'],
+ invalid: ['3.6', '3.69', '3', '1.5', 'a'],
});
test({
validator: 'isFloat',
- args: [{
- min: 0.1,
- max: 1.0,
- }],
- valid: [
- '0.1',
- '1.0',
- '0.15',
- '0.33',
- '0.57',
- '0.7',
- ],
- invalid: [
- '0',
- '0.0',
- 'a',
- '1.3',
- '0.05',
- '5',
+ args: [
+ {
+ min: 0.1,
+ max: 1.0,
+ },
],
+ valid: ['0.1', '1.0', '0.15', '0.33', '0.57', '0.7'],
+ invalid: ['0', '0.0', 'a', '1.3', '0.05', '5'],
});
test({
validator: 'isFloat',
- args: [{
- gt: -5.5,
- lt: 10,
- }],
- valid: [
- '9.9',
- '1.0',
- '0',
- '-1',
- '7',
- '-5.4',
- ],
- invalid: [
- '10',
- '-5.5',
- 'a',
- '-20.3',
- '20e3',
- '10.00001',
+ args: [
+ {
+ gt: -5.5,
+ lt: 10,
+ },
],
+ valid: ['9.9', '1.0', '0', '-1', '7', '-5.4'],
+ invalid: ['10', '-5.5', 'a', '-20.3', '20e3', '10.00001'],
});
test({
validator: 'isFloat',
- args: [{
- min: -5.5,
- max: 10,
- gt: -5.5,
- lt: 10,
- }],
- valid: [
- '9.99999',
- '-5.499999',
- ],
- invalid: [
- '10',
- '-5.5',
+ args: [
+ {
+ min: -5.5,
+ max: 10,
+ gt: -5.5,
+ lt: 10,
+ },
],
- });
- test({
- validator: 'isFloat',
- args: [{
- locale: 'de-DE',
- min: 3.1,
- }],
- valid: [
- '123',
- '123,',
- '123,123',
- '3,1',
- '3,100001',
+ valid: ['9.99999', '-5.499999'],
+ invalid: ['10', '-5.5'],
+ });
+ test({
+ validator: 'isFloat',
+ args: [
+ {
+ locale: 'de-DE',
+ min: 3.1,
+ },
],
+ valid: ['123', '123,', '123,123', '3,1', '3,100001'],
invalid: [
'3,09',
'-,123',
@@ -4416,37 +3250,16 @@ describe('Validators', () => {
it('should validate octal strings', () => {
test({
validator: 'isOctal',
- valid: [
- '076543210',
- '0o01234567',
- ],
- invalid: [
- 'abcdefg',
- '012345678',
- '012345670c',
- '00c12345670c',
- '',
- '..',
- ],
+ valid: ['076543210', '0o01234567'],
+ invalid: ['abcdefg', '012345678', '012345670c', '00c12345670c', '', '..'],
});
});
it('should validate hexadecimal color strings', () => {
test({
validator: 'isHexColor',
- valid: [
- '#ff0000ff',
- '#ff0034',
- '#CCCCCC',
- '0f38',
- 'fff',
- '#f00',
- ],
- invalid: [
- '#ff',
- 'fff0a',
- '#ff12FG',
- ],
+ valid: ['#ff0000ff', '#ff0034', '#CCCCCC', '0f38', 'fff', '#f00'],
+ invalid: ['#ff', 'fff0a', '#ff12FG'],
});
});
@@ -4534,32 +3347,16 @@ describe('Validators', () => {
test({
validator: 'isRgbColor',
args: [false],
- valid: [
- 'rgb(5,5,5)',
- 'rgba(5,5,5,.3)',
- ],
- invalid: [
- 'rgb(4,4,5%)',
- 'rgba(5%,5%,5%)',
- ],
+ valid: ['rgb(5,5,5)', 'rgba(5,5,5,.3)'],
+ invalid: ['rgb(4,4,5%)', 'rgba(5%,5%,5%)'],
});
});
it('should validate ISRC code strings', () => {
test({
validator: 'isISRC',
- valid: [
- 'USAT29900609',
- 'GBAYE6800011',
- 'USRC15705223',
- 'USCA29500702',
- ],
- invalid: [
- 'USAT2990060',
- 'SRC15705223',
- 'US-CA29500702',
- 'USARC15705223',
- ],
+ valid: ['USAT29900609', 'GBAYE6800011', 'USRC15705223', 'USCA29500702'],
+ invalid: ['USAT2990060', 'SRC15705223', 'US-CA29500702', 'USARC15705223'],
});
});
@@ -4740,56 +3537,36 @@ describe('Validators', () => {
'$Zs.ewu.su84',
'ks64$S/9.dy$§kz.3sd73b',
],
- error: [
- [],
- {},
- null,
- undefined,
- ],
+ error: [[], {}, null, undefined],
});
});
it('should validate null strings', () => {
test({
validator: 'isEmpty',
- valid: [
- '',
- ],
- invalid: [
- ' ',
- 'foo',
- '3',
- ],
+ valid: [''],
+ invalid: [' ', 'foo', '3'],
});
test({
validator: 'isEmpty',
args: [{ ignore_whitespace: false }],
- valid: [
- '',
- ],
- invalid: [
- ' ',
- 'foo',
- '3',
- ],
+ valid: [''],
+ invalid: [' ', 'foo', '3'],
});
test({
validator: 'isEmpty',
args: [{ ignore_whitespace: true }],
- valid: [
- '',
- ' ',
- ],
- invalid: [
- 'foo',
- '3',
- ],
+ valid: ['', ' '],
+ invalid: ['foo', '3'],
});
});
it('should validate strings against an expected value', () => {
test({
- validator: 'equals', args: ['abc'], valid: ['abc'], invalid: ['Abc', '123'],
+ validator: 'equals',
+ args: ['abc'],
+ valid: ['abc'],
+ invalid: ['Abc', '123'],
});
});
@@ -4803,18 +3580,24 @@ describe('Validators', () => {
test({
validator: 'contains',
- args: ['foo', {
- ignoreCase: true,
- }],
+ args: [
+ 'foo',
+ {
+ ignoreCase: true,
+ },
+ ],
valid: ['Foo', 'FOObar', 'BAZfoo'],
invalid: ['bar', 'fobar', 'baxoof'],
});
test({
validator: 'contains',
- args: ['foo', {
- minOccurrences: 2,
- }],
+ args: [
+ 'foo',
+ {
+ minOccurrences: 2,
+ },
+ ],
valid: ['foofoofoo', '12foo124foo', 'fofooofoooofoooo', 'foo1foo'],
invalid: ['foo', 'foobar', 'Fooofoo', 'foofo'],
});
@@ -4914,13 +3697,7 @@ describe('Validators', () => {
'zh-CN-a-myext-x-private',
'en-a-myext-b-another',
],
- invalid: [
- 'lo_POP',
- '12',
- '12_DD',
- 'de-419-DE',
- 'a-DE',
- ],
+ invalid: ['lo_POP', '12', '12_DD', 'de-419-DE', 'a-DE'],
});
});
@@ -5049,9 +3826,7 @@ describe('Validators', () => {
test({
validator: 'isUUID',
args: [null],
- valid: [
- 'A127FBC9-4BED-3078-CF07-9141BA07C9F3',
- ],
+ valid: ['A127FBC9-4BED-3078-CF07-9141BA07C9F3'],
invalid: [
'',
'xxxA987FBC9-4BED-3078-CF07-9141BA07C9F3',
@@ -5063,9 +3838,7 @@ describe('Validators', () => {
test({
validator: 'isUUID',
args: [1],
- valid: [
- 'E034B584-7D89-11E9-9669-1AECF481A97B',
- ],
+ valid: ['E034B584-7D89-11E9-9669-1AECF481A97B'],
invalid: [
'xxxA987FBC9-4BED-3078-CF07-9141BA07C9F3',
'AAAAAAAA-1111-2222-AAAG',
@@ -5077,9 +3850,7 @@ describe('Validators', () => {
test({
validator: 'isUUID',
args: [2],
- valid: [
- 'A987FBC9-4BED-2078-CF07-9141BA07C9F3',
- ],
+ valid: ['A987FBC9-4BED-2078-CF07-9141BA07C9F3'],
invalid: [
'',
'xxxA987FBC9-4BED-3078-CF07-9141BA07C9F3',
@@ -5092,9 +3863,7 @@ describe('Validators', () => {
test({
validator: 'isUUID',
args: [3],
- valid: [
- 'A987FBC9-4BED-3078-CF07-9141BA07C9F3',
- ],
+ valid: ['A987FBC9-4BED-3078-CF07-9141BA07C9F3'],
invalid: [
'',
'xxxA987FBC9-4BED-3078-CF07-9141BA07C9F3',
@@ -5271,10 +4040,7 @@ describe('Validators', () => {
test({
validator: 'isIBAN',
args: [{ whitelist: ['DK', 'GB'] }],
- valid: [
- 'DK5000400440116243',
- 'GB29NWBK60161331926819',
- ],
+ valid: ['DK5000400440116243', 'GB29NWBK60161331926819'],
invalid: [
'BE71 0961 2345 6769',
'FR76 3000 6000 0112 3456 7890 189',
@@ -5374,14 +4140,7 @@ describe('Validators', () => {
validator: 'isDivisibleBy',
args: [2],
valid: ['2', '4', '100', '1000'],
- invalid: [
- '1',
- '2.5',
- '101',
- 'foo',
- '',
- '2020-01-06T14:31:00.135Z',
- ],
+ invalid: ['1', '2.5', '101', 'foo', '', '2020-01-06T14:31:00.135Z'],
});
});
@@ -5455,7 +4214,6 @@ describe('Validators', () => {
});
});
-
it('should validate credit cards without a proper provider', () => {
test({
validator: 'isCreditCard',
@@ -5471,14 +4229,11 @@ describe('Validators', () => {
});
});
-
it('should validate AmEx provided credit cards', () => {
test({
validator: 'isCreditCard',
args: [{ provider: 'AmEx' }],
- valid: [
- '375556917985515',
- ],
+ valid: ['375556917985515'],
invalid: [
'foo',
'2222155765072228',
@@ -5507,14 +4262,11 @@ describe('Validators', () => {
});
});
-
it('should validate Diners Club provided credit cards', () => {
test({
validator: 'isCreditCard',
args: [{ provider: 'DinersClub' }],
- valid: [
- '36050234196908',
- ],
+ valid: ['36050234196908'],
invalid: [
'foo',
'2222155765072228',
@@ -5547,10 +4299,7 @@ describe('Validators', () => {
test({
validator: 'isCreditCard',
args: [{ provider: 'Discover' }],
- valid: [
- '6011111111111117',
- '6011000990139424',
- ],
+ valid: ['6011111111111117', '6011000990139424'],
invalid: [
'foo',
'2222155765072228',
@@ -5584,10 +4333,7 @@ describe('Validators', () => {
test({
validator: 'isCreditCard',
args: [{ provider: 'JCB' }],
- valid: [
- '3530111333300000',
- '3566002020360505',
- ],
+ valid: ['3530111333300000', '3566002020360505'],
invalid: [
'foo',
'2222155765072228',
@@ -5617,7 +4363,6 @@ describe('Validators', () => {
});
});
-
it('should validate Mastercard provided credit cards', () => {
test({
validator: 'isCreditCard',
@@ -5653,7 +4398,6 @@ describe('Validators', () => {
});
});
-
it('should validate Union Pay provided credit cards', () => {
test({
validator: 'isCreditCard',
@@ -5688,7 +4432,6 @@ describe('Validators', () => {
});
});
-
it('should validate Visa provided credit cards', () => {
test({
validator: 'isCreditCard',
@@ -5724,7 +4467,6 @@ describe('Validators', () => {
});
});
-
it('should validate identity cards', () => {
const fixtures = [
{
@@ -5832,18 +4574,11 @@ describe('Validators', () => {
'131052+308T', // People born in 1800s
'131052-313Y',
],
- invalid: [
- '131052308T',
- '131052-308T ',
- '131052-308A',
- ],
+ invalid: ['131052308T', '131052-308T ', '131052-308A'],
},
{
locale: 'IN',
- valid: [
- '298448863364',
- '2984 4886 3364',
- ],
+ valid: ['298448863364', '2984 4886 3364'],
invalid: [
'99999999R',
'12345678Z',
@@ -5881,16 +4616,8 @@ describe('Validators', () => {
},
{
locale: 'IT',
- valid: [
- 'CR43675TM',
- 'CA79382RA',
- ],
- invalid: [
- 'CA00000AA',
- 'CB2342TG',
- 'CS123456A',
- 'C1236EC',
- ],
+ valid: ['CR43675TM', 'CA79382RA'],
+ invalid: ['CA00000AA', 'CB2342TG', 'CS123456A', 'C1236EC'],
},
{
locale: 'NO',
@@ -5904,19 +4631,11 @@ describe('Validators', () => {
'13031379673',
'29126214926',
],
- invalid: [
- '09053426699',
- '00000000000',
- '26028338724',
- '92031470790',
- ],
+ invalid: ['09053426699', '00000000000', '26028338724', '92031470790'],
},
{
locale: 'TH',
- valid: [
- '1101230000001',
- '1101230000060',
- ],
+ valid: ['1101230000001', '1101230000060'],
invalid: [
'abc',
'1101230',
@@ -5966,12 +4685,7 @@ describe('Validators', () => {
},
{
locale: 'ar-LY',
- valid: [
- '119803455876',
- '120024679875',
- '219624876201',
- '220103480657',
- ],
+ valid: ['119803455876', '120024679875', '219624876201', '220103480657'],
invalid: [
'987654320123',
'123-456-7890',
@@ -6099,12 +4813,8 @@ describe('Validators', () => {
// Test generics
test({
validator: 'isIdentityCard',
- valid: [
- ...allValid,
- ],
- invalid: [
- 'foo',
- ],
+ valid: [...allValid],
+ invalid: ['foo'],
args: ['any'],
});
});
@@ -6113,10 +4823,7 @@ describe('Validators', () => {
test({
validator: 'isIdentityCard',
args: ['is-NOT'],
- error: [
- '99999999R',
- '12345678Z',
- ],
+ error: ['99999999R', '12345678Z'],
});
});
@@ -6133,12 +4840,7 @@ describe('Validators', () => {
'PLLWBGD00016',
'US0378331005',
],
- invalid: [
- 'DE000BAY0018',
- 'PLLWBGD00019',
- 'foo',
- '5398228707871528',
- ],
+ invalid: ['DE000BAY0018', 'PLLWBGD00019', 'foo', '5398228707871528'],
});
});
@@ -6156,11 +4858,7 @@ describe('Validators', () => {
'10012345678902',
'20012345678909',
],
- invalid: [
- '5901234123451',
- '079777681629',
- '0705632085948',
- ],
+ invalid: ['5901234123451', '079777681629', '0705632085948'],
});
});
@@ -6190,57 +4888,30 @@ describe('Validators', () => {
test({
validator: 'isISSN',
args: [{ case_sensitive: true }],
- valid: [
- '2434-561X',
- '2434561X',
- '0378-5955',
- '03785955',
- ],
- invalid: [
- '2434-561x',
- '2434561x',
- ],
+ valid: ['2434-561X', '2434561X', '0378-5955', '03785955'],
+ invalid: ['2434-561x', '2434561x'],
});
test({
validator: 'isISSN',
args: [{ require_hyphen: true }],
- valid: [
- '2434-561X',
- '2434-561x',
- '0378-5955',
- ],
- invalid: [
- '2434561X',
- '2434561x',
- '03785955',
- ],
+ valid: ['2434-561X', '2434-561x', '0378-5955'],
+ invalid: ['2434561X', '2434561x', '03785955'],
});
test({
validator: 'isISSN',
args: [{ case_sensitive: true, require_hyphen: true }],
- valid: [
- '2434-561X',
- '0378-5955',
- ],
- invalid: [
- '2434-561x',
- '2434561X',
- '2434561x',
- '03785955',
- ],
+ valid: ['2434-561X', '0378-5955'],
+ invalid: ['2434-561x', '2434561X', '2434561x', '03785955'],
});
});
it('should validate JSON', () => {
test({
validator: 'isJSON',
- valid: [
- '{ "key": "value" }',
- '{}',
- ],
+ valid: ['{ "key": "value" }', '{}'],
invalid: [
'{ key: "value" }',
- '{ \'key\': \'value\' }',
+ "{ 'key': 'value' }",
'null',
'1234',
'"nope"',
@@ -6252,16 +4923,10 @@ describe('Validators', () => {
test({
validator: 'isJSON',
args: [{ allow_primitives: true }],
- valid: [
- '{ "key": "value" }',
- '{}',
- 'null',
- 'false',
- 'true',
- ],
+ valid: ['{ "key": "value" }', '{}', 'null', 'false', 'true'],
invalid: [
'{ key: "value" }',
- '{ \'key\': \'value\' }',
+ "{ 'key': 'value' }",
'{ "key": value }',
'1234',
'"nope"',
@@ -6280,29 +4945,15 @@ describe('Validators', () => {
'カタカナ',
'中文',
],
- invalid: [
- 'abc',
- 'abc123',
- '<>@" *.',
- ],
+ invalid: ['abc', 'abc123', '<>@" *.'],
});
});
it('should validate ascii strings', () => {
test({
validator: 'isAscii',
- valid: [
- 'foobar',
- '0987654321',
- 'test@example.com',
- '1234abcDEF',
- ],
- invalid: [
- 'foobar',
- 'xyz098',
- '123456',
- 'カタカナ',
- ],
+ valid: ['foobar', '0987654321', 'test@example.com', '1234abcDEF'],
+ invalid: ['foobar', 'xyz098', '123456', 'カタカナ'],
});
});
@@ -6315,11 +4966,7 @@ describe('Validators', () => {
'Fカタカナ゙ᆲ',
'Good=Parts',
],
- invalid: [
- 'abc',
- 'abc123',
- '!"#$%&()<>/+=-_? ~^|.,@`{}[]',
- ],
+ invalid: ['abc', 'abc123', '!"#$%&()<>/+=-_? ~^|.,@`{}[]'],
});
});
@@ -6332,10 +4979,7 @@ describe('Validators', () => {
'abc123い',
'カタカナ゙ᆲ←',
],
- invalid: [
- 'あいうえお',
- '0011',
- ],
+ invalid: ['あいうえお', '0011'],
});
});
@@ -6362,16 +5006,8 @@ describe('Validators', () => {
it('should validate surrogate pair strings', () => {
test({
validator: 'isSurrogatePair',
- valid: [
- '𠮷野𠮷',
- '𩸽',
- 'ABC千𥧄1-2-3',
- ],
- invalid: [
- '吉野竈',
- '鮪',
- 'ABC1-2-3',
- ],
+ valid: ['𠮷野𠮷', '𩸽', 'ABC千𥧄1-2-3'],
+ invalid: ['吉野竈', '鮪', 'ABC1-2-3'],
});
});
@@ -6480,12 +5116,7 @@ describe('Validators', () => {
test({
validator: 'isBase32',
args: [{ crockford: true }],
- valid: [
- '91JPRV3F41BPYWKCCGGG',
- '60',
- '64',
- 'B5QQA833C5Q20S3F41MQ8',
- ],
+ valid: ['91JPRV3F41BPYWKCCGGG', '60', '64', 'B5QQA833C5Q20S3F41MQ8'],
invalid: [
'91JPRV3F41BUPYWKCCGGG',
'B5QQA833C5Q20S3F41MQ8L',
@@ -6535,12 +5166,12 @@ describe('Validators', () => {
'Vml2YW11cyBmZXJtZW50dW0gc2VtcGVyIHBvcnRhLg==',
'U3VzcGVuZGlzc2UgbGVjdHVzIGxlbw==',
'MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAuMPNS1Ufof9EW/M98FNw' +
- 'UAKrwflsqVxaxQjBQnHQmiI7Vac40t8x7pIb8gLGV6wL7sBTJiPovJ0V7y7oc0Ye' +
- 'rhKh0Rm4skP2z/jHwwZICgGzBvA0rH8xlhUiTvcwDCJ0kc+fh35hNt8srZQM4619' +
- 'FTgB66Xmp4EtVyhpQV+t02g6NzK72oZI0vnAvqhpkxLeLiMCyrI416wHm5Tkukhx' +
- 'QmcL2a6hNOyu0ixX/x2kSFXApEnVrJ+/IxGyfyw8kf4N2IZpW5nEP847lpfj0SZZ' +
- 'Fwrd1mnfnDbYohX2zRptLy2ZUn06Qo9pkG5ntvFEPo9bfZeULtjYzIl6K8gJ2uGZ' +
- 'HQIDAQAB',
+ 'UAKrwflsqVxaxQjBQnHQmiI7Vac40t8x7pIb8gLGV6wL7sBTJiPovJ0V7y7oc0Ye' +
+ 'rhKh0Rm4skP2z/jHwwZICgGzBvA0rH8xlhUiTvcwDCJ0kc+fh35hNt8srZQM4619' +
+ 'FTgB66Xmp4EtVyhpQV+t02g6NzK72oZI0vnAvqhpkxLeLiMCyrI416wHm5Tkukhx' +
+ 'QmcL2a6hNOyu0ixX/x2kSFXApEnVrJ+/IxGyfyw8kf4N2IZpW5nEP847lpfj0SZZ' +
+ 'Fwrd1mnfnDbYohX2zRptLy2ZUn06Qo9pkG5ntvFEPo9bfZeULtjYzIl6K8gJ2uGZ' +
+ 'HQIDAQAB',
],
invalid: [
'12345',
@@ -6572,17 +5203,11 @@ describe('Validators', () => {
'This+isa/bad+base64Url==',
'0K3RgtC+INC30LDQutC+0LTQuNGA0L7QstCw0L3QvdCw0Y8g0YHRgtGA0L7QutCw',
],
- error: [
- null,
- undefined,
- {},
- [],
- 42,
- ],
+ error: [null, undefined, {}, [], 42],
});
for (let i = 0, str = '', encoded; i < 1000; i++) {
- str += String.fromCharCode(Math.random() * 26 | 97); // eslint-disable-line no-bitwise
+ str += String.fromCharCode((Math.random() * 26) | 97); // eslint-disable-line no-bitwise
encoded = Buffer.from(str).toString('base64');
if (!validator.isBase64(encoded)) {
let msg = format('validator.isBase64() failed with "%s"', encoded);
@@ -6594,9 +5219,7 @@ describe('Validators', () => {
it('should validate hex-encoded MongoDB ObjectId', () => {
test({
validator: 'isMongoId',
- valid: [
- '507f1f77bcf86cd799439011',
- ],
+ valid: ['507f1f77bcf86cd799439011'],
invalid: [
'507f1f77bcf86cd7994390',
'507f1f77bcf86cd79943901z',
@@ -6868,22 +5491,11 @@ describe('Validators', () => {
'016329712',
'97517265559',
],
- invalid: [
- '',
- '9898347255',
- '+96326626262',
- '963372',
- '0114152198',
- ],
+ invalid: ['', '9898347255', '+96326626262', '963372', '0114152198'],
},
{
locale: 'ar-OM',
- valid: [
- '+96891212121',
- '0096899999999',
- '93112211',
- '99099009',
- ],
+ valid: ['+96891212121', '0096899999999', '93112211', '99099009'],
invalid: [
'+96890212121',
'0096890999999',
@@ -6897,12 +5509,7 @@ describe('Validators', () => {
},
{
locale: 'ar-PS',
- valid: [
- '+970563459876',
- '970592334218',
- '0566372345',
- '0598273583',
- ],
+ valid: ['+970563459876', '970592334218', '0566372345', '0598273583'],
invalid: [
'+9759029487',
'97059123456789',
@@ -6924,13 +5531,7 @@ describe('Validators', () => {
'0944549710',
'0962655597',
],
- invalid: [
- '12345',
- '',
- '+9639626626262',
- '+963332210972',
- '0114152198',
- ],
+ invalid: ['12345', '', '+9639626626262', '+963332210972', '0114152198'],
},
{
locale: 'ar-SA',
@@ -6941,22 +5542,11 @@ describe('Validators', () => {
'596578654',
'572655597',
],
- invalid: [
- '12345',
- '',
- '+9665626626262',
- '+96633221097',
- '0114152198',
- ],
+ invalid: ['12345', '', '+9665626626262', '+96633221097', '0114152198'],
},
{
locale: 'ar-SD',
- valid: [
- '0128652312',
- '+249919425113',
- '249123212345',
- '0993212345',
- ],
+ valid: ['0128652312', '+249919425113', '249123212345', '0993212345'],
invalid: [
'12345',
'',
@@ -6969,33 +5559,13 @@ describe('Validators', () => {
},
{
locale: 'ar-TN',
- valid: [
- '23456789',
- '+21623456789',
- '21623456789',
- ],
- invalid: [
- '12345',
- '75200123',
- '+216512345678',
- '13520459',
- '85479520',
- ],
+ valid: ['23456789', '+21623456789', '21623456789'],
+ invalid: ['12345', '75200123', '+216512345678', '13520459', '85479520'],
},
{
locale: 'bg-BG',
- valid: [
- '+359897123456',
- '+359898888888',
- '0897123123',
- ],
- invalid: [
- '',
- '0898123',
- '+359212555666',
- '18001234567',
- '12125559999',
- ],
+ valid: ['+359897123456', '+359898888888', '0897123123'],
+ invalid: ['', '0898123', '+359212555666', '18001234567', '12125559999'],
},
{
locale: 'bn-BD',
@@ -7129,24 +5699,12 @@ describe('Validators', () => {
'+4372876',
'06434908989562345',
],
- invalid: [
- '167612345678',
- '1234',
- '064349089895623459',
- ],
+ invalid: ['167612345678', '1234', '064349089895623459'],
},
{
locale: 'hu-HU',
- valid: [
- '06301234567',
- '+36201234567',
- '06701234567',
- ],
- invalid: [
- '1234',
- '06211234567',
- '+3620123456',
- ],
+ valid: ['06301234567', '+36201234567', '06701234567'],
+ invalid: ['1234', '06211234567', '+3620123456'],
},
{
locale: 'mz-MZ',
@@ -7312,12 +5870,7 @@ describe('Validators', () => {
'+886-987123456',
'886-987123456',
],
- invalid: [
- '12345',
- '',
- 'Vml2YW11cyBmZXJtZtesting123',
- '0-987123456',
- ],
+ invalid: ['12345', '', 'Vml2YW11cyBmZXJtZtesting123', '0-987123456'],
},
{
local: 'en-LS',
@@ -7340,12 +5893,7 @@ describe('Validators', () => {
},
{
locale: 'en-BM',
- valid: [
- '+14417974653',
- '14413986653',
- '4415370973',
- '+14415005489',
- ],
+ valid: ['+14417974653', '14413986653', '4415370973', '+14415005489'],
invalid: [
'85763287',
'+14412020436',
@@ -7383,11 +5931,7 @@ describe('Validators', () => {
},
{
locale: 'en-ZA',
- valid: [
- '0821231234',
- '+27821231234',
- '27821231234',
- ],
+ valid: ['0821231234', '+27821231234', '27821231234'],
invalid: [
'082123',
'08212312345',
@@ -7398,11 +5942,7 @@ describe('Validators', () => {
},
{
locale: 'en-AU',
- valid: [
- '61404111222',
- '+61411222333',
- '0417123456',
- ],
+ valid: ['61404111222', '+61411222333', '0417123456'],
invalid: [
'082123',
'08212312345',
@@ -7438,11 +5978,7 @@ describe('Validators', () => {
'441481123456',
'441481789123',
],
- invalid: [
- '999',
- '+441481123456789',
- '+447123456789',
- ],
+ invalid: ['999', '+441481123456789', '+447123456789'],
},
{
locale: 'en-GH',
@@ -7470,21 +6006,11 @@ describe('Validators', () => {
'+233592349493',
'0550298219',
],
- invalid: [
- '082123',
- '232345671',
- '0292345671',
- '+233292345671',
- ],
+ invalid: ['082123', '232345671', '0292345671', '+233292345671'],
},
{
locale: 'en-GY',
- valid: [
- '+5926121234',
- '06121234',
- '06726381',
- '+5926726381',
- ],
+ valid: ['+5926121234', '06121234', '06726381', '+5926726381'],
invalid: [
'5926121234',
'6121234',
@@ -7507,12 +6033,7 @@ describe('Validators', () => {
'9123 4567',
'852-91234567',
],
- invalid: [
- '999',
- '+852-912345678',
- '123456789',
- '+852-1234-56789',
- ],
+ invalid: ['999', '+852-912345678', '123456789', '+852-1234-56789'],
},
{
locale: 'en-MO',
@@ -7561,12 +6082,7 @@ describe('Validators', () => {
},
{
locale: 'en-JM',
- valid: [
- '+8761021234',
- '8761211234',
- '8763511274',
- '+8764511274',
- ],
+ valid: ['+8761021234', '8761211234', '8763511274', '+8764511274'],
invalid: [
'999',
'+876102123422',
@@ -7587,12 +6103,7 @@ describe('Validators', () => {
'+254110456794',
'254198452389',
],
- invalid: [
- '999',
- '+25489032',
- '123456789',
- '+254800723845',
- ],
+ invalid: ['999', '+25489032', '123456789', '+254800723845'],
},
{
locale: 'fr-CF',
@@ -7616,17 +6127,11 @@ describe('Validators', () => {
'022452389',
'+236772345678',
'+236700456794',
-
],
},
{
locale: 'en-KI',
- valid: [
- '+68673140000',
- '68673059999',
- '+68663000000',
- '68663019999',
- ],
+ valid: ['+68673140000', '68673059999', '+68663000000', '68663019999'],
invalid: [
'+68653000000',
'68664019999',
@@ -7637,16 +6142,8 @@ describe('Validators', () => {
},
{
locale: 'en-MT',
- valid: [
- '+35699000000',
- '+35679000000',
- '99000000',
- ],
- invalid: [
- '356',
- '+35699000',
- '+35610000000',
- ],
+ valid: ['+35699000000', '+35679000000', '99000000'],
+ invalid: ['356', '+35699000', '+35610000000'],
},
{
locale: 'en-PH',
@@ -7996,7 +6493,6 @@ describe('Validators', () => {
'022452389',
'+681772345678',
'+681700456794',
-
],
},
{
@@ -8085,11 +6581,7 @@ describe('Validators', () => {
},
{
locale: 'en-GB',
- valid: [
- '447789345856',
- '+447861235675',
- '07888814488',
- ],
+ valid: ['447789345856', '+447861235675', '07888814488'],
invalid: [
'67699567',
'0773894868',
@@ -8224,12 +6716,7 @@ describe('Validators', () => {
},
{
locale: 'ru-RU',
- valid: [
- '+79676338855',
- '79676338855',
- '89676338855',
- '9676338855',
- ],
+ valid: ['+79676338855', '79676338855', '89676338855', '9676338855'],
invalid: [
'12345',
'',
@@ -8282,12 +6769,7 @@ describe('Validators', () => {
},
{
locale: 'en-NZ',
- valid: [
- '+6427987035',
- '642240512347',
- '0293981646',
- '029968425',
- ],
+ valid: ['+6427987035', '642240512347', '0293981646', '029968425'],
invalid: [
'12345',
'',
@@ -8302,11 +6784,7 @@ describe('Validators', () => {
},
{
locale: 'en-MU',
- valid: [
- '+23012341234',
- '12341234',
- '012341234',
- ],
+ valid: ['+23012341234', '12341234', '012341234'],
invalid: [
'41234',
'',
@@ -8447,12 +6925,7 @@ describe('Validators', () => {
},
{
locale: 'es-CL',
- valid: [
- '+56733875615',
- '56928590234',
- '0928590294',
- '0208590294',
- ],
+ valid: ['+56733875615', '56928590234', '0928590294', '0208590294'],
invalid: [
'1234',
'+5633875615',
@@ -8507,12 +6980,7 @@ describe('Validators', () => {
},
{
locale: 'es-CU',
- valid: [
- '+5351234567',
- '005353216547',
- '51234567',
- '53214567',
- ],
+ valid: ['+5351234567', '005353216547', '51234567', '53214567'],
invalid: [
'1234',
'+5341234567',
@@ -8655,12 +7123,7 @@ describe('Validators', () => {
},
{
locale: 'es-PA',
- valid: [
- '+5076784565',
- '+5074321557',
- '5073331112',
- '+50723431212',
- ],
+ valid: ['+5076784565', '+5074321557', '5073331112', '+50723431212'],
invalid: [
'+50755555',
'+207123456',
@@ -8730,12 +7193,7 @@ describe('Validators', () => {
},
{
locale: 'es-UY',
- valid: [
- '+59899123456',
- '099123456',
- '+59894654321',
- '091111111',
- ],
+ valid: ['+59899123456', '099123456', '+59894654321', '091111111'],
invalid: [
'54321',
'montevideo',
@@ -8747,16 +7205,8 @@ describe('Validators', () => {
},
{
locale: 'es-VE',
- valid: [
- '+582125457765',
- '+582125458053',
- '+584125458053',
- ],
- invalid: [
- '+585129934395',
- '+58212993439',
- '',
- ],
+ valid: ['+582125457765', '+582125458053', '+584125458053'],
+ invalid: ['+585129934395', '+58212993439', ''],
},
{
locale: 'et-EE',
@@ -8966,11 +7416,7 @@ describe('Validators', () => {
'77271234567',
'0271234567',
],
- invalid: [
- '02188565377',
- '09386932778',
- '0938693277vadggjdsaasdgj8',
- ],
+ invalid: ['02188565377', '09386932778', '0938693277vadggjdsaasdgj8'],
},
{
locale: 'ja-JP',
@@ -9013,12 +7459,7 @@ describe('Validators', () => {
},
{
locale: 'ir-IR',
- valid: [
- '09023818688',
- '09123809999',
- '+989023818688',
- '+989103923523',
- ],
+ valid: ['09023818688', '09123809999', '+989023818688', '+989103923523'],
invalid: [
'19023818688',
'323254',
@@ -9035,11 +7476,7 @@ describe('Validators', () => {
'+39 310 7688449',
'+39 3339847632',
],
- invalid: [
- '011 7387545',
- '12345',
- '+45 345 6782395',
- ],
+ invalid: ['011 7387545', '12345', '+45 345 6782395'],
},
{
locale: 'fr-BE',
@@ -9286,10 +7723,7 @@ describe('Validators', () => {
},
{
locale: 'lt-LT',
- valid: [
- '+37051234567',
- '851234567',
- ],
+ valid: ['+37051234567', '851234567'],
invalid: [
'+65740 123 456',
'',
@@ -9302,12 +7736,7 @@ describe('Validators', () => {
},
{
locale: 'uk-UA',
- valid: [
- '+380982345679',
- '380982345679',
- '80982345679',
- '0982345679',
- ],
+ valid: ['+380982345679', '380982345679', '80982345679', '0982345679'],
invalid: [
'+30982345679',
'982345679',
@@ -9419,12 +7848,7 @@ describe('Validators', () => {
},
{
locale: 'kk-KZ',
- valid: [
- '+77254716212',
- '77254716212',
- '87254716212',
- '7254716212',
- ],
+ valid: ['+77254716212', '77254716212', '87254716212', '7254716212'],
invalid: [
'12345',
'',
@@ -9459,17 +7883,8 @@ describe('Validators', () => {
},
{
locale: 'th-TH',
- valid: [
- '0912345678',
- '+66912345678',
- '66912345678',
- ],
- invalid: [
- '99123456789',
- '12345',
- '67812345623',
- '081234567891',
- ],
+ valid: ['0912345678', '+66912345678', '66912345678'],
+ invalid: ['99123456789', '12345', '67812345623', '081234567891'],
},
{
locale: 'tk-TM',
@@ -9480,20 +7895,11 @@ describe('Validators', () => {
'99312183399',
'812391717',
],
- invalid: [
- '12345',
- '+99412495154',
- '99412495154',
- '998900066506',
- ],
+ invalid: ['12345', '+99412495154', '99412495154', '998900066506'],
},
{
locale: 'en-SL',
- valid: [
- '+23274560591',
- '23274560591',
- '074560591',
- ],
+ valid: ['+23274560591', '23274560591', '074560591'],
invalid: [
'0745605912',
'12345',
@@ -9552,10 +7958,7 @@ describe('Validators', () => {
},
{
locale: 'de-LU',
- valid: [
- '601123456',
- '+352601123456',
- ],
+ valid: ['601123456', '+352601123456'],
invalid: [
'NaN',
'791234',
@@ -9576,13 +7979,7 @@ describe('Validators', () => {
'+390549612345678',
'+37805496123456789',
],
- invalid: [
- '61234567890',
- '6123',
- '1234567',
- '+49123456',
- 'NotANumber',
- ],
+ invalid: ['61234567890', '6123', '1234567', '+49123456', 'NotANumber'],
},
{
locale: 'so-SO',
@@ -9607,10 +8004,7 @@ describe('Validators', () => {
},
{
locale: 'sq-AL',
- valid: [
- '067123456',
- '+35567123456',
- ],
+ valid: ['067123456', '+35567123456'],
invalid: [
'67123456',
'06712345',
@@ -9622,23 +8016,12 @@ describe('Validators', () => {
},
{
locale: 'ca-AD',
- valid: [
- '+376312345',
- '312345',
- ],
- invalid: [
- '31234',
- '31234567',
- '512345',
- 'NotANumber',
- ],
+ valid: ['+376312345', '312345'],
+ invalid: ['31234', '31234567', '512345', 'NotANumber'],
},
{
locale: 'pt-AO',
- valid: [
- '+244911123432',
- '+244123091232',
- ],
+ valid: ['+244911123432', '+244123091232'],
invalid: [
'+2449111234321',
'31234',
@@ -9649,10 +8032,7 @@ describe('Validators', () => {
},
{
locale: 'lv-LV',
- valid: [
- '+37121234567',
- '37121234567',
- ],
+ valid: ['+37121234567', '37121234567'],
invalid: [
'+37201234567',
'+3754321',
@@ -9895,11 +8275,7 @@ describe('Validators', () => {
},
{
locale: 'ar-YE',
- valid: [
- '737198225',
- '733111355',
- '+967700990270',
- ],
+ valid: ['737198225', '733111355', '+967700990270'],
invalid: [
'+5032136663',
'21346663',
@@ -9936,11 +8312,7 @@ describe('Validators', () => {
},
{
locale: 'fa-AF',
- valid: [
- '0511231231',
- '+93511231231',
- '+93281234567',
- ],
+ valid: ['0511231231', '+93511231231', '+93281234567'],
invalid: [
'212528812312123',
'+212-5290-12312',
@@ -9977,7 +8349,6 @@ describe('Validators', () => {
'+211931234567',
'+211901234567',
'+211991234567',
-
],
},
];
@@ -10021,11 +8392,7 @@ describe('Validators', () => {
// strict mode
test({
validator: 'isMobilePhone',
- valid: [
- '+254728530234',
- '+299 12 34 56',
- '+94766660206',
- ],
+ valid: ['+254728530234', '+299 12 34 56', '+94766660206'],
invalid: [
'254728530234',
'0728530234',
@@ -10062,21 +8429,15 @@ describe('Validators', () => {
'+41791112233',
'+411122112211',
],
- invalid: [
- '+41041112233',
- ],
+ invalid: ['+41041112233'],
args: [],
});
-
it('should error on invalid locale', () => {
test({
validator: 'isMobilePhone',
args: [{ locale: ['is-NOT'] }],
- error: [
- '+123456789',
- '012345',
- ],
+ error: ['+123456789', '012345'],
});
});
@@ -10931,9 +9292,7 @@ describe('Validators', () => {
// $##,###.## with no negatives (en-US, en-CA, en-AU, en-HK)
test({
validator: 'isCurrency',
- args: [
- { allow_negatives: false },
- ],
+ args: [{ allow_negatives: false }],
valid: [
'$10,123.45',
'$10123.45',
@@ -10996,14 +9355,8 @@ describe('Validators', () => {
decimal_separator: ',',
},
],
- valid: [
- 'R$ 1.400,00',
- 'R$ 400,00',
- ],
- invalid: [
- '$ 1.400,00',
- '$R 1.400,00',
- ],
+ valid: ['R$ 1.400,00', 'R$ 400,00'],
+ invalid: ['$ 1.400,00', '$R 1.400,00'],
});
});
@@ -11053,29 +9406,15 @@ describe('Validators', () => {
it('should validate booleans', () => {
test({
validator: 'isBoolean',
- valid: [
- 'true',
- 'false',
- '0',
- '1',
- ],
- invalid: [
- '1.0',
- '0.0',
- 'true ',
- 'False',
- 'True',
- 'yes',
- ],
+ valid: ['true', 'false', '0', '1'],
+ invalid: ['1.0', '0.0', 'true ', 'False', 'True', 'yes'],
});
});
it('should validate booleans with option loose set to true', () => {
test({
validator: 'isBoolean',
- args: [
- { loose: true },
- ],
+ args: [{ loose: true }],
valid: [
'true',
'True',
@@ -11092,12 +9431,7 @@ describe('Validators', () => {
'No',
'NO',
],
- invalid: [
- '1.0',
- '0.0',
- 'true ',
- ' false',
- ],
+ invalid: ['1.0', '0.0', 'true ', ' false'],
});
});
@@ -11196,9 +9530,7 @@ describe('Validators', () => {
it('should validate ISO 8601 dates, with strict = true (regression)', () => {
test({
validator: 'isISO8601',
- args: [
- { strict: true },
- ],
+ args: [{ strict: true }],
valid: validISO8601,
invalid: invalidISO8601,
});
@@ -11207,31 +9539,16 @@ describe('Validators', () => {
it('should validate ISO 8601 dates, with strict = true', () => {
test({
validator: 'isISO8601',
- args: [
- { strict: true },
- ],
- valid: [
- '2000-02-29',
- '2009-123',
- '2009-222',
- '2020-366',
- '2400-366',
- ],
- invalid: [
- '2010-02-30',
- '2009-02-29',
- '2009-366',
- '2019-02-31',
- ],
+ args: [{ strict: true }],
+ valid: ['2000-02-29', '2009-123', '2009-222', '2020-366', '2400-366'],
+ invalid: ['2010-02-30', '2009-02-29', '2009-366', '2019-02-31'],
});
});
it('should validate ISO 8601 dates, with strictSeparator = true', () => {
test({
validator: 'isISO8601',
- args: [
- { strictSeparator: true },
- ],
+ args: [{ strictSeparator: true }],
valid: [
'2009-12T12:34',
'2009',
@@ -11308,16 +9625,8 @@ describe('Validators', () => {
it('should validate ISO 8601 dates, with strict = true and strictSeparator = true (regression)', () => {
test({
validator: 'isISO8601',
- args: [
- { strict: true, strictSeparator: true },
- ],
- valid: [
- '2000-02-29',
- '2009-123',
- '2009-222',
- '2020-366',
- '2400-366',
- ],
+ args: [{ strict: true, strictSeparator: true }],
+ valid: ['2000-02-29', '2009-123', '2009-222', '2020-366', '2400-366'],
invalid: [
'2010-02-30',
'2009-02-29',
@@ -11374,30 +9683,8 @@ describe('Validators', () => {
// from https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2
test({
validator: 'isISO31661Alpha2',
- valid: [
- 'FR',
- 'fR',
- 'GB',
- 'PT',
- 'CM',
- 'JP',
- 'PM',
- 'ZW',
- 'MM',
- 'cc',
- 'GG',
- ],
- invalid: [
- '',
- 'FRA',
- 'AA',
- 'PI',
- 'RP',
- 'WV',
- 'WL',
- 'UK',
- 'ZZ',
- ],
+ valid: ['FR', 'fR', 'GB', 'PT', 'CM', 'JP', 'PM', 'ZW', 'MM', 'cc', 'GG'],
+ invalid: ['', 'FRA', 'AA', 'PI', 'RP', 'WV', 'WL', 'UK', 'ZZ'],
});
});
@@ -11405,23 +9692,8 @@ describe('Validators', () => {
// from https://en.wikipedia.org/wiki/ISO_3166-1_alpha-3
test({
validator: 'isISO31661Alpha3',
- valid: [
- 'ABW',
- 'HND',
- 'KHM',
- 'RWA',
- ],
- invalid: [
- '',
- 'FR',
- 'fR',
- 'GB',
- 'PT',
- 'CM',
- 'JP',
- 'PM',
- 'ZW',
- ],
+ valid: ['ABW', 'HND', 'KHM', 'RWA'],
+ invalid: ['', 'FR', 'fR', 'GB', 'PT', 'CM', 'JP', 'PM', 'ZW'],
});
});
@@ -11441,17 +9713,7 @@ describe('Validators', () => {
'SGD',
'USD',
],
- invalid: [
- '',
- '$',
- 'US',
- 'us',
- 'AAA',
- 'aaa',
- 'RWA',
- 'EURO',
- 'euro',
- ],
+ invalid: ['', '$', 'US', 'us', 'AAA', 'aaa', 'RWA', 'EURO', 'euro'],
});
});
@@ -11496,7 +9758,8 @@ describe('Validators', () => {
'data:,A%20brief%20invalid%20[note',
'file:text/plain;base64,SGVsbG8sIFdvcmxkIQ%3D%3D',
'data:text/html;charset=,%3Ch1%3EHello!%3C%2Fh1%3E',
- 'data:text/html;charset,%3Ch1%3EHello!%3C%2Fh1%3E', 'data:base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD///+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC',
+ 'data:text/html;charset,%3Ch1%3EHello!%3C%2Fh1%3E',
+ 'data:base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQAQMAAAAlPW0iAAAABlBMVEUAAAD///+l2Z/dAAAAM0lEQVR4nGP4/5/h/1+G/58ZDrAz3D/McH8yw83NDDeNGe4Ug9C9zwz3gVLMDA/A6P9/AFGGFyjOXZtQAAAAAElFTkSuQmCC',
'',
'http://wikipedia.org',
'base64',
@@ -11506,7 +9769,6 @@ describe('Validators', () => {
/* eslint-enable max-len */
});
-
it('should validate magnetURI', () => {
/* eslint-disable max-len */
test({
@@ -11540,7 +9802,6 @@ describe('Validators', () => {
/* eslint-enable max-len */
});
-
it('should validate LatLong', () => {
test({
validator: 'isLatLong',
@@ -11603,9 +9864,11 @@ describe('Validators', () => {
test({
validator: 'isLatLong',
- args: [{
- checkDMS: true,
- }],
+ args: [
+ {
+ checkDMS: true,
+ },
+ ],
valid: [
'40° 26′ 46″ N, 79° 58′ 56″ W',
'40° 26′ 46″ S, 79° 58′ 56″ E',
@@ -11615,7 +9878,6 @@ describe('Validators', () => {
'40°26′46″s, 79°58′56″e',
'11° 0′ 0.005″ S, 180° 0′ 0″ E',
'40°26′45.9996″N, 79°58′55.2″E',
-
],
invalid: [
'100° 26′ 46″ N, 79° 70′ 56″ W',
@@ -11630,27 +9892,12 @@ describe('Validators', () => {
const fixtures = [
{
locale: 'AU',
- valid: [
- '4000',
- '2620',
- '3000',
- '2017',
- '0800',
- ],
- }, {
+ valid: ['4000', '2620', '3000', '2017', '0800'],
+ },
+ {
locale: 'BY',
- valid: [
- '225320',
- '211120',
- '247710',
- '231960',
- ],
- invalid: [
- 'test 225320',
- '211120 test',
- '317543',
- '267946',
- ],
+ valid: ['225320', '211120', '247710', '231960'],
+ invalid: ['test 225320', '211120 test', '317543', '267946'],
},
{
locale: 'CA',
@@ -11681,39 +9928,16 @@ describe('Validators', () => {
},
{
locale: 'ES',
- valid: [
- '01001',
- '52999',
- '27880',
- ],
- invalid: [
- '123',
- '1234',
- '53000',
- '052999',
- '0123',
- 'abcde',
- ],
+ valid: ['01001', '52999', '27880'],
+ invalid: ['123', '1234', '53000', '052999', '0123', 'abcde'],
},
{
locale: 'JP',
- valid: [
- '135-0000',
- '874-8577',
- '669-1161',
- '470-0156',
- '672-8031',
- ],
+ valid: ['135-0000', '874-8577', '669-1161', '470-0156', '672-8031'],
},
{
locale: 'GR',
- valid: [
- '022 93',
- '29934',
- '90293',
- '299 42',
- '94944',
- ],
+ valid: ['022 93', '29934', '90293', '299 42', '94944'],
},
{
locale: 'GB',
@@ -11735,29 +9959,15 @@ describe('Validators', () => {
},
{
locale: 'FR',
- valid: [
- '75008',
- '44 522',
- '98025',
- '38 499',
- '39940',
- ],
+ valid: ['75008', '44 522', '98025', '38 499', '39940'],
},
{
locale: 'ID',
- valid: [
- '10210',
- '40181',
- '55161',
- '60233',
- ],
+ valid: ['10210', '40181', '55161', '60233'],
},
{
locale: 'IE',
- valid: [
- 'A65 TF12',
- 'A6W U9U9',
- ],
+ valid: ['A65 TF12', 'A6W U9U9'],
invalid: [
'123',
'75690HG',
@@ -11770,10 +9980,7 @@ describe('Validators', () => {
},
{
locale: 'IN',
- valid: [
- '364240',
- '360005',
- ],
+ valid: ['364240', '360005'],
invalid: [
'123',
'012345',
@@ -11822,16 +10029,11 @@ describe('Validators', () => {
},
{
locale: 'BG',
- valid: [
- '1000',
- ],
+ valid: ['1000'],
},
{
locale: 'IR',
- valid: [
- '4351666456',
- '5614736867',
- ],
+ valid: ['4351666456', '5614736867'],
invalid: [
'43516 6456',
'123443516 6456',
@@ -11843,39 +10045,16 @@ describe('Validators', () => {
},
{
locale: 'CZ',
- valid: [
- '20134',
- '392 90',
- '39919',
- '938 29',
- '39949',
- ],
+ valid: ['20134', '392 90', '39919', '938 29', '39949'],
},
{
locale: 'NL',
- valid: [
- '1012 SZ',
- '3432FE',
- '1118 BH',
- '3950IO',
- '3997 GH',
- ],
+ valid: ['1012 SZ', '3432FE', '1118 BH', '3950IO', '3997 GH'],
},
{
locale: 'NP',
- valid: [
- '10811',
- '32600',
- '56806',
- '977',
- ],
- invalid: [
- '11977',
- 'asds',
- '13 32',
- '-977',
- '97765',
- ],
+ valid: ['10811', '32600', '56806', '977'],
+ invalid: ['11977', 'asds', '13 32', '-977', '97765'],
},
{
locale: 'PL',
@@ -11891,72 +10070,31 @@ describe('Validators', () => {
},
{
locale: 'TW',
- valid: [
- '360',
- '90312',
- '399',
- '935',
- '38842',
- ],
+ valid: ['360', '90312', '399', '935', '38842'],
},
{
locale: 'LI',
- valid: [
- '9485',
- '9497',
- '9491',
- '9489',
- '9496',
- ],
+ valid: ['9485', '9497', '9491', '9489', '9496'],
},
{
locale: 'PT',
- valid: [
- '4829-489',
- '0294-348',
- '8156-392',
- ],
+ valid: ['4829-489', '0294-348', '8156-392'],
},
{
locale: 'SE',
- valid: [
- '12994',
- '284 39',
- '39556',
- '489 39',
- '499 49',
- ],
+ valid: ['12994', '284 39', '39556', '489 39', '499 49'],
},
{
locale: 'AD',
- valid: [
- 'AD100',
- 'AD200',
- 'AD300',
- 'AD400',
- 'AD500',
- 'AD600',
- 'AD700',
- ],
+ valid: ['AD100', 'AD200', 'AD300', 'AD400', 'AD500', 'AD600', 'AD700'],
},
{
locale: 'UA',
- valid: [
- '65000',
- '65080',
- '01000',
- '51901',
- '51909',
- '49125',
- ],
+ valid: ['65000', '65080', '01000', '51901', '51909', '49125'],
},
{
locale: 'BR',
- valid: [
- '39100-000',
- '22040-020',
- '39400-152',
- ],
+ valid: ['39100-000', '22040-020', '39400-152'],
invalid: [
'79800A12',
'13165-00',
@@ -11968,160 +10106,67 @@ describe('Validators', () => {
},
{
locale: 'NZ',
- valid: [
- '7843',
- '3581',
- '0449',
- '0984',
- '4144',
- ],
+ valid: ['7843', '3581', '0449', '0984', '4144'],
},
{
locale: 'MG',
- valid: [
- '101',
- '303',
- '407',
- '512',
- ],
+ valid: ['101', '303', '407', '512'],
},
{
locale: 'MT',
- valid: [
- 'VLT2345',
- 'VLT 2345',
- 'ATD1234',
- 'MSK8723',
- ],
+ valid: ['VLT2345', 'VLT 2345', 'ATD1234', 'MSK8723'],
},
{
locale: 'MY',
- valid: [
- '56000',
- '12000',
- '79502',
- ],
+ valid: ['56000', '12000', '79502'],
},
{
locale: 'PR',
- valid: [
- '00979',
- '00631',
- '00786',
- '00987',
- ],
+ valid: ['00979', '00631', '00786', '00987'],
},
{
locale: 'AZ',
- valid: [
- 'AZ0100',
- 'AZ0121',
- 'AZ3500',
- ],
- invalid: [
- '',
- ' AZ0100',
- 'AZ100',
- 'AZ34340',
- 'EN2020',
- 'AY3030',
- ],
+ valid: ['AZ0100', 'AZ0121', 'AZ3500'],
+ invalid: ['', ' AZ0100', 'AZ100', 'AZ34340', 'EN2020', 'AY3030'],
},
{
locale: 'DO',
- valid: [
- '12345',
- ],
- invalid: [
- 'A1234',
- '123',
- '123456',
- ],
+ valid: ['12345'],
+ invalid: ['A1234', '123', '123456'],
},
{
locale: 'HT',
- valid: [
- 'HT1234',
- ],
- invalid: [
- 'HT123',
- 'HT12345',
- 'AA1234',
- ],
+ valid: ['HT1234'],
+ invalid: ['HT123', 'HT12345', 'AA1234'],
},
{
locale: 'TH',
- valid: [
- '10250',
- '72170',
- '12140',
- ],
- invalid: [
- 'T1025',
- 'T72170',
- '12140TH',
- ],
+ valid: ['10250', '72170', '12140'],
+ invalid: ['T1025', 'T72170', '12140TH'],
},
{
locale: 'SG',
- valid: [
- '308215',
- '546080',
- ],
+ valid: ['308215', '546080'],
},
{
locale: 'CN',
- valid: [
- '150237',
- '100000',
- ],
- invalid: [
- '141234',
- '386789',
- 'ab1234',
- ],
+ valid: ['150237', '100000'],
+ invalid: ['141234', '386789', 'ab1234'],
},
{
locale: 'KR',
- valid: [
- '17008',
- '339012',
- ],
- invalid: [
- '1412347',
- 'ab1234',
- ],
+ valid: ['17008', '339012'],
+ invalid: ['1412347', 'ab1234'],
},
{
locale: 'LK',
- valid: [
- '11500',
- '22200',
- '10370',
- '43000',
- ],
- invalid: [
- '1234',
- '789389',
- '982',
- ],
+ valid: ['11500', '22200', '10370', '43000'],
+ invalid: ['1234', '789389', '982'],
},
{
locale: 'BA',
- valid: [
- '76300',
- '71000',
- '75412',
- '76100',
- '88202',
- '88313',
- ],
- invalid: [
- '1234',
- '789389',
- '98212',
- '11000',
- ],
+ valid: ['76300', '71000', '75412', '76100', '88202', '88313'],
+ invalid: ['1234', '789389', '98212', '11000'],
},
];
@@ -12175,10 +10220,7 @@ describe('Validators', () => {
test({
validator: 'isPostalCode',
args: ['is-NOT'],
- error: [
- '293940',
- '1234',
- ],
+ error: ['293940', '1234'],
});
});
@@ -12230,7 +10272,6 @@ describe('Validators', () => {
});
});
-
it('should validate ISO6346 shipping containerID', () => {
test({
validator: 'isISO6346',
@@ -12292,13 +10333,15 @@ describe('Validators', () => {
'0101010012',
'0111010010',
'7521010014',
- '7541010019'],
+ '7541010019',
+ ],
invalid: [
'750101001',
'75010100101',
'75-01010/01 0',
'7521320010',
- '7501010019'],
+ '7501010019',
+ ],
});
test({
validator: 'isTaxID',
@@ -12312,7 +10355,8 @@ describe('Validators', () => {
'5451219994',
'0424175466',
'0532175468',
- '7159079940'],
+ '7159079940',
+ ],
invalid: [
'53-0121 999',
'530121000',
@@ -12320,20 +10364,14 @@ describe('Validators', () => {
'0124175466',
'0472301754',
'1975116400',
- '7159079945'],
+ '7159079945',
+ ],
});
test({
validator: 'isTaxID',
args: ['de-AT'],
- valid: [
- '931736581',
- '93-173/6581',
- '93--173/6581'],
- invalid: [
- '999999999',
- '93 173 6581',
- '93-173/65811',
- '93-173/658'],
+ valid: ['931736581', '93-173/6581', '93--173/6581'],
+ invalid: ['999999999', '93 173 6581', '93-173/65811', '93-173/658'],
});
test({
validator: 'isTaxID',
@@ -12343,7 +10381,8 @@ describe('Validators', () => {
'86095742719',
'65929970489',
'79608434120',
- '659/299/7048/9'],
+ '659/299/7048/9',
+ ],
invalid: [
'26954371828',
'86095752719',
@@ -12351,7 +10390,8 @@ describe('Validators', () => {
'860957527190',
'65299970489',
'65999970489',
- '6592997048-9'],
+ '6592997048-9',
+ ],
});
test({
validator: 'isTaxID',
@@ -12364,35 +10404,33 @@ describe('Validators', () => {
'2110595002',
'2110197007',
'0101110117',
- '0101110230'],
+ '0101110230',
+ ],
invalid: [
'010111/1113',
'010111111',
'01011111133',
'2110485008',
'2902034000',
- '0101110630'],
+ '0101110630',
+ ],
});
test({
validator: 'isTaxID',
args: ['el-CY'],
- valid: [
- '00123123T',
- '99652156X'],
+ valid: ['00123123T', '99652156X'],
invalid: [
'99652156A',
'00124123T',
'00123123',
'001123123T',
- '00 12-3123/T'],
+ '00 12-3123/T',
+ ],
});
test({
validator: 'isTaxID',
args: ['el-GR'],
- valid: [
- '758426713',
- '032792320',
- '054100004'],
+ valid: ['758426713', '032792320', '054100004'],
invalid: [
'054100005',
'05410000',
@@ -12400,7 +10438,8 @@ describe('Validators', () => {
'05 4100005',
'05-410/0005',
'658426713',
- '558426713'],
+ '558426713',
+ ],
});
test({
validator: 'isTaxID',
@@ -12442,10 +10481,7 @@ describe('Validators', () => {
test({
validator: 'isTaxID',
args: ['en-GB'],
- valid: [
- '1234567890',
- 'AA123456A',
- 'AA123456 '],
+ valid: ['1234567890', 'AA123456A', 'AA123456 '],
invalid: [
'GB123456A',
'123456789',
@@ -12458,22 +10494,14 @@ describe('Validators', () => {
'AO123456A',
'GB-123456A',
'GB 123456 A',
- 'GB123456 '],
+ 'GB123456 ',
+ ],
});
test({
validator: 'isTaxID',
args: ['en-IE'],
- valid: [
- '1234567T',
- '1234567TW',
- '1234577W',
- '1234577WW',
- '1234577IA'],
- invalid: [
- '1234567',
- '1234577WWW',
- '1234577A',
- '1234577JA'],
+ valid: ['1234567T', '1234567TW', '1234577W', '1234577WW', '1234577IA'],
+ invalid: ['1234567', '1234577WWW', '1234577A', '1234577JA'],
});
test({
validator: 'isTaxID',
@@ -12487,7 +10515,8 @@ describe('Validators', () => {
'67-1234567',
'15-1234567',
'31-1234567',
- '99-1234567'],
+ '99-1234567',
+ ],
invalid: [
'0-11234567',
'01#1234567',
@@ -12495,7 +10524,8 @@ describe('Validators', () => {
'01 1234 567',
'07-1234567',
'28-1234567',
- '96-1234567'],
+ '96-1234567',
+ ],
});
test({
validator: 'isTaxID',
@@ -12508,7 +10538,8 @@ describe('Validators', () => {
'33693450239',
'30534868460',
'23111111129',
- '34557619099'],
+ '34557619099',
+ ],
invalid: [
'20-27163363-8',
'20.27163363.8',
@@ -12516,7 +10547,8 @@ describe('Validators', () => {
'69345023',
'693450233123123',
'3369ew50231',
- '34557619095'],
+ '34557619095',
+ ],
});
test({
validator: 'isTaxID',
@@ -12527,131 +10559,115 @@ describe('Validators', () => {
'X1234567L',
'Z1234567R',
'M2812345C',
- 'Y2812345B'],
- invalid: [
- 'M2812345CR',
- 'A2812345C',
- '0/005 423-7A',
- '00054237U'],
+ 'Y2812345B',
+ ],
+ invalid: ['M2812345CR', 'A2812345C', '0/005 423-7A', '00054237U'],
});
test({
validator: 'isTaxID',
args: ['et-EE'],
- valid: [
- '10001010080',
- '46304280206',
- '37102250382',
- '32708101201'],
+ valid: ['10001010080', '46304280206', '37102250382', '32708101201'],
invalid: [
'46304280205',
'61002293333',
'4-6304 28/0206',
'4630428020',
- '463042802066'],
+ '463042802066',
+ ],
});
test({
validator: 'isTaxID',
args: ['fi-FI'],
- valid: [
- '131052-308T',
- '131002+308W',
- '131019A3089'],
+ valid: ['131052-308T', '131002+308W', '131019A3089'],
invalid: [
'131052308T',
'131052-308TT',
'131052S308T',
'13 1052-308/T',
- '290219A1111'],
+ '290219A1111',
+ ],
});
test({
validator: 'isTaxID',
args: ['fr-BE'],
- valid: [
- '00012511119'],
+ valid: ['00012511119'],
});
test({
validator: 'isTaxID',
args: ['fr-FR'],
- valid: [
- '30 23 217 600 053',
- '3023217600053'],
+ valid: ['30 23 217 600 053', '3023217600053'],
invalid: [
'30 2 3 217 600 053',
'3 023217-600/053',
'3023217600052',
'3023217500053',
'30232176000534',
- '302321760005'],
+ '302321760005',
+ ],
});
test({
validator: 'isTaxID',
args: ['nl-BE'],
- valid: [
- '00012511148',
- '00/0125-11148',
- '00000011115'],
+ valid: ['00012511148', '00/0125-11148', '00000011115'],
invalid: [
'00 01 2511148',
'01022911148',
'00013211148',
'0001251114',
'000125111480',
- '00012511149'],
+ '00012511149',
+ ],
});
test({
validator: 'isTaxID',
args: ['fr-LU'],
- valid: [
- '1893120105732'],
+ valid: ['1893120105732'],
invalid: [
'189312010573',
'18931201057322',
'1893 12-01057/32',
'1893120105742',
- '1893120105733'],
+ '1893120105733',
+ ],
});
test({
validator: 'isTaxID',
args: ['lb-LU'],
- invalid: [
- '2016023005732'],
+ invalid: ['2016023005732'],
});
test({
validator: 'isTaxID',
args: ['hr-HR'],
- valid: [
- '94577403194'],
+ valid: ['94577403194'],
invalid: [
'94 57-7403/194',
'9457740319',
'945774031945',
'94577403197',
- '94587403194'],
+ '94587403194',
+ ],
});
test({
validator: 'isTaxID',
args: ['hu-HU'],
- valid: [
- '8071592153'],
+ valid: ['8071592153'],
invalid: [
'80 71-592/153',
'80715921534',
'807159215',
'8071592152',
- '8071582153'],
+ '8071582153',
+ ],
});
test({
validator: 'isTaxID',
args: ['lt-LT'],
- valid: [
- '33309240064'],
+ valid: ['33309240064'],
});
test({
validator: 'isTaxID',
args: ['it-IT'],
- valid: [
- 'DMLPRY77D15H501F',
- 'AXXFAXTTD41H501D'],
+ valid: ['DMLPRY77D15H501F', 'AXXFAXTTD41H501D'],
invalid: [
'DML PRY/77D15H501-F',
'DMLPRY77D15H501',
@@ -12660,30 +10676,19 @@ describe('Validators', () => {
'DMLAXA77D15H501F',
'AXXFAX90A01Z001F',
'DMLPRY77B29H501F',
- 'AXXFAX3TD41H501E'],
+ 'AXXFAX3TD41H501E',
+ ],
});
test({
validator: 'isTaxID',
args: ['lv-LV'],
- valid: [
- '01011012344',
- '32579461005',
- '01019902341',
- '325794-61005'],
- invalid: [
- '010110123444',
- '0101101234',
- '01001612345',
- '290217-22343'],
+ valid: ['01011012344', '32579461005', '01019902341', '325794-61005'],
+ invalid: ['010110123444', '0101101234', '01001612345', '290217-22343'],
});
test({
validator: 'isTaxID',
args: ['mt-MT'],
- valid: [
- '1234567A',
- '882345608',
- '34581M',
- '199Z'],
+ valid: ['1234567A', '882345608', '34581M', '199Z'],
invalid: [
'812345608',
'88234560',
@@ -12693,17 +10698,14 @@ describe('Validators', () => {
'88 23-456/08',
'1234560A',
'0000000M',
- '3200100G'],
+ '3200100G',
+ ],
});
test({
validator: 'isTaxID',
args: ['nl-NL'],
- valid: [
- '174559434'],
- invalid: [
- '17455943',
- '1745594344',
- '17 455-94/34'],
+ valid: ['174559434'],
+ invalid: ['17455943', '1745594344', '17 455-94/34'],
});
test({
validator: 'isTaxID',
@@ -12713,23 +10715,21 @@ describe('Validators', () => {
'02070803628',
'02870803622',
'02670803626',
- '01510813623'],
+ '01510813623',
+ ],
invalid: [
'020708036285',
'223456789',
'22 345-678/95',
'02 070-8036/28',
'2234567855',
- '02223013623'],
+ '02223013623',
+ ],
});
test({
validator: 'isTaxID',
args: ['pt-BR'],
- valid: [
- '35161990910',
- '74407265027',
- '05423994000172',
- '11867044000130'],
+ valid: ['35161990910', '74407265027', '05423994000172', '11867044000130'],
invalid: [
'ABCDEFGH',
'170.691.440-72',
@@ -12748,13 +10748,8 @@ describe('Validators', () => {
test({
validator: 'isTaxID',
args: ['pt-PT'],
- valid: [
- '299999998',
- '299992020'],
- invalid: [
- '2999999988',
- '29999999',
- '29 999-999/8'],
+ valid: ['299999998', '299992020'],
+ invalid: ['2999999988', '29999999', '29 999-999/8'],
});
test({
validator: 'isTaxID',
@@ -12764,7 +10759,8 @@ describe('Validators', () => {
'9000123456789',
'1001011234560',
'3001011234564',
- '5001011234568'],
+ '5001011234568',
+ ],
invalid: [
'5001011234569',
'500 1011-234/568',
@@ -12772,7 +10768,8 @@ describe('Validators', () => {
'50010112345688',
'5001011504568',
'8000230234563',
- '6000230234563'],
+ '6000230234563',
+ ],
});
test({
validator: 'isTaxID',
@@ -12782,25 +10779,22 @@ describe('Validators', () => {
'536221/999',
'031121999',
'520229999',
- '1234567890'],
+ '1234567890',
+ ],
invalid: [
'53012199999',
'990101999',
'530121000',
'53012199',
'53-0121 999',
- '535229999'],
+ '535229999',
+ ],
});
test({
validator: 'isTaxID',
args: ['sl-SI'],
- valid: [
- '15012557',
- '15012590'],
- invalid: [
- '150125577',
- '1501255',
- '15 01-255/7'],
+ valid: ['15012557', '15012590'],
+ invalid: ['150125577', '1501255', '15 01-255/7'],
});
test({
validator: 'isTaxID',
@@ -12813,7 +10807,8 @@ describe('Validators', () => {
'196408233233',
'19640883-3230',
'200228+5266',
- '20180101-5581'],
+ '20180101-5581',
+ ],
invalid: [
'640823+3234',
'160230-3231',
@@ -12825,12 +10820,12 @@ describe('Validators', () => {
'640823+32344',
'64082332344',
'19640823-32333',
- '1964082332333'],
+ '1964082332333',
+ ],
});
test({
validator: 'isTaxID',
- valid: [
- '01-1234567'],
+ valid: ['01-1234567'],
});
test({
validator: 'isTaxID',
@@ -12850,7 +10845,6 @@ describe('Validators', () => {
});
});
-
it('should validate slug', () => {
test({
validator: 'isSlug',
@@ -12878,13 +10872,15 @@ describe('Validators', () => {
it('should validate strong passwords', () => {
test({
validator: 'isStrongPassword',
- args: [{
- minLength: 8,
- minLowercase: 1,
- minUppercase: 1,
- minNumbers: 1,
- minSymbols: 1,
- }],
+ args: [
+ {
+ minLength: 8,
+ minLowercase: 1,
+ minUppercase: 1,
+ minNumbers: 1,
+ minSymbols: 1,
+ },
+ ],
valid: [
'%2%k{7BsL"M%Kd6e',
'EXAMPLE of very long_password123!',
@@ -12926,13 +10922,7 @@ describe('Validators', () => {
'This+isa/bad+base64Url==',
'0K3RgtC+INC30LDQutC+0LTQuNGA0L7QstCw0L3QvdCw0Y8g0YHRgtGA0L7QutCw',
],
- error: [
- null,
- undefined,
- {},
- [],
- 42,
- ],
+ error: [null, undefined, {}, [], 42],
});
});
@@ -12952,7 +10942,11 @@ describe('Validators', () => {
undefined,
{ year: 2002, month: 7, day: 15 },
42,
- { toString() { return '[object Date]'; } }, // faking
+ {
+ toString() {
+ return '[object Date]';
+ },
+ }, // faking
'2020-02-30', // invalid date
'2019-02-29', // non-leap year
'2020-04-31', // invalid date
@@ -12962,68 +10956,31 @@ describe('Validators', () => {
test({
validator: 'isDate',
args: ['DD/MM/YYYY'], // old format for backward compatibility
- valid: [
- '15-07-2002',
- '15/07/2002',
- ],
- invalid: [
- '15/7/2002',
- '15-7-2002',
- '15/7/02',
- '15-7-02',
- '15-07/2002',
- ],
+ valid: ['15-07-2002', '15/07/2002'],
+ invalid: ['15/7/2002', '15-7-2002', '15/7/02', '15-7-02', '15-07/2002'],
});
test({
validator: 'isDate',
args: [{ format: 'DD/MM/YYYY' }],
- valid: [
- '15-07-2002',
- '15/07/2002',
- ],
- invalid: [
- '15/7/2002',
- '15-7-2002',
- '15/7/02',
- '15-7-02',
- '15-07/2002',
- ],
+ valid: ['15-07-2002', '15/07/2002'],
+ invalid: ['15/7/2002', '15-7-2002', '15/7/02', '15-7-02', '15-07/2002'],
});
test({
validator: 'isDate',
args: [{ format: 'DD/MM/YY' }],
- valid: [
- '15-07-02',
- '15/07/02',
- ],
- invalid: [
- '15/7/2002',
- '15-7-2002',
- '15/07-02',
- '30/04/--',
- ],
+ valid: ['15-07-02', '15/07/02'],
+ invalid: ['15/7/2002', '15-7-2002', '15/07-02', '30/04/--'],
});
test({
validator: 'isDate',
args: [{ format: 'D/M/YY' }],
- valid: [
- '5-7-02',
- '5/7/02',
- ],
- invalid: [
- '5/07/02',
- '15/7/02',
- '15-7-02',
- '5/7-02',
- '3/4/aa',
- ],
+ valid: ['5-7-02', '5/7/02'],
+ invalid: ['5/07/02', '15/7/02', '15-7-02', '5/7-02', '3/4/aa'],
});
test({
validator: 'isDate',
args: [{ format: 'DD/MM/YYYY', strictMode: true }],
- valid: [
- '15/07/2002',
- ],
+ valid: ['15/07/2002'],
invalid: [
'15-07-2002',
'15/7/2002',
@@ -13036,12 +10993,7 @@ describe('Validators', () => {
test({
validator: 'isDate',
args: [{ strictMode: true }],
- valid: [
- '2020/01/15',
- '2014/02/15',
- '2014/03/15',
- '2020/02/29',
- ],
+ valid: ['2020/01/15', '2014/02/15', '2014/03/15', '2020/02/29'],
invalid: [
'2014-02-15',
'2020-02-29',
@@ -13069,7 +11021,11 @@ describe('Validators', () => {
undefined,
{ year: 2002, month: 7, day: 15 },
42,
- { toString() { return '[object Date]'; } },
+ {
+ toString() {
+ return '[object Date]';
+ },
+ },
'2020/02/30',
'2019/02/29',
'2020/04/31',
@@ -13079,12 +11035,7 @@ describe('Validators', () => {
test({
validator: 'isDate',
args: [{ format: 'MM.DD.YYYY', delimiters: ['.'], strictMode: true }],
- valid: [
- '01.15.2020',
- '02.15.2014',
- '03.15.2014',
- '02.29.2020',
- ],
+ valid: ['01.15.2020', '02.15.2014', '03.15.2014', '02.29.2020'],
invalid: [
'2014-02-15',
'2020-02-29',
@@ -13100,21 +11051,14 @@ describe('Validators', () => {
timezone_mock.register('US/Pacific');
test({
validator: 'isDate',
- valid: [
- new Date(2016, 2, 29),
- '2017-08-04',
- ],
+ valid: [new Date(2016, 2, 29), '2017-08-04'],
});
timezone_mock.unregister();
});
it('should validate time', () => {
test({
validator: 'isTime',
- valid: [
- '00:00',
- '23:59',
- '9:00',
- ],
+ valid: ['00:00', '23:59', '9:00'],
invalid: [
'',
null,
@@ -13131,11 +11075,7 @@ describe('Validators', () => {
test({
validator: 'isTime',
args: [{ hourFormat: 'hour24', mode: 'withSeconds' }],
- valid: [
- '23:59:59',
- '00:00:00',
- '9:50:01',
- ],
+ valid: ['23:59:59', '00:00:00', '9:50:01'],
invalid: [
'',
null,
@@ -13157,13 +11097,7 @@ describe('Validators', () => {
test({
validator: 'isTime',
args: [{ hourFormat: 'hour12' }],
- valid: [
- '12:59 PM',
- '12:59 AM',
- '01:00 PM',
- '01:00 AM',
- '7:00 AM',
- ],
+ valid: ['12:59 PM', '12:59 AM', '01:00 PM', '01:00 AM', '7:00 AM'],
invalid: [
'',
null,
@@ -13188,11 +11122,7 @@ describe('Validators', () => {
test({
validator: 'isTime',
args: [{ hourFormat: 'hour12', mode: 'withSeconds' }],
- valid: [
- '12:59:59 PM',
- '2:34:45 AM',
- '7:00:00 AM',
- ],
+ valid: ['12:59:59 PM', '2:34:45 AM', '7:00:00 AM'],
invalid: [
'',
null,
@@ -13218,12 +11148,7 @@ describe('Validators', () => {
test({
validator: 'isLicensePlate',
args: ['es-AR'],
- valid: [
- 'AB 123 CD',
- 'AB123CD',
- 'ABC 123',
- 'ABC123',
- ],
+ valid: ['AB 123 CD', 'AB123CD', 'ABC 123', 'ABC123'],
invalid: [
'',
'notalicenseplate',
@@ -13238,34 +11163,14 @@ describe('Validators', () => {
test({
validator: 'isLicensePlate',
args: ['pt-PT'],
- valid: [
- 'AA-12-34',
- '12·34·AB',
- '12·AB·34',
- 'AB 12 CD',
- 'AB12CD',
- ],
- invalid: [
- '',
- 'notalicenseplate',
- 'A1-B2-C3',
- 'ABC-1-EF',
- ],
+ valid: ['AA-12-34', '12·34·AB', '12·AB·34', 'AB 12 CD', 'AB12CD'],
+ invalid: ['', 'notalicenseplate', 'A1-B2-C3', 'ABC-1-EF'],
});
test({
validator: 'isLicensePlate',
args: ['de-LI'],
- valid: [
- 'FL 1',
- 'FL 99999',
- 'FL 1337',
- ],
- invalid: [
- '',
- 'FL 999999',
- 'AB 12345',
- 'FL -1',
- ],
+ valid: ['FL 1', 'FL 99999', 'FL 1337'],
+ invalid: ['', 'FL 999999', 'AB 12345', 'FL -1'],
});
test({
validator: 'isLicensePlate',
@@ -13356,15 +11261,8 @@ describe('Validators', () => {
test({
validator: 'isLicensePlate',
args: ['sq-AL'],
- valid: [
- 'AA 000 AA',
- 'ZZ 999 ZZ',
- ],
- invalid: [
- '',
- 'AA 0 A',
- 'AAA 00 AAA',
- ],
+ valid: ['AA 000 AA', 'ZZ 999 ZZ'],
+ invalid: ['', 'AA 0 A', 'AAA 00 AAA'],
});
test({
validator: 'isLicensePlate',
@@ -13404,14 +11302,7 @@ describe('Validators', () => {
'ABC 1D23',
'ABC-1D23',
],
- invalid: [
- '',
- 'AA 0 A',
- 'AAA 00 AAA',
- 'ABCD123',
- 'AB12345',
- 'AB123DC',
- ],
+ invalid: ['', 'AA 0 A', 'AAA 00 AAA', 'ABCD123', 'AB12345', 'AB123DC'],
});
test({
validator: 'isLicensePlate',
@@ -13486,25 +11377,13 @@ describe('Validators', () => {
test({
validator: 'isLicensePlate',
args: ['any'],
- valid: [
- 'FL 1',
- 'FS AB 123',
- ],
- invalid: [
- '',
- 'FL 999999',
- 'FS AB 1234 A',
- ],
+ valid: ['FL 1', 'FS AB 123'],
+ invalid: ['', 'FL 999999', 'FS AB 1234 A'],
});
test({
validator: 'isLicensePlate',
args: ['asdfasdf'],
- error: [
- 'FL 1',
- 'FS AB 123',
- 'FL 999999',
- 'FS AB 1234 A',
- ],
+ error: ['FL 1', 'FS AB 123', 'FL 999999', 'FS AB 1234 A'],
});
test({
validator: 'isLicensePlate',
@@ -13563,64 +11442,32 @@ describe('Validators', () => {
test({
validator: 'isVAT',
args: ['AT'],
- valid: [
- 'ATU12345678',
- 'U12345678',
- ],
- invalid: [
- 'AT 12345678',
- '12345678',
- ],
+ valid: ['ATU12345678', 'U12345678'],
+ invalid: ['AT 12345678', '12345678'],
});
test({
validator: 'isVAT',
args: ['BE'],
- valid: [
- 'BE1234567890',
- '1234567890',
- ],
- invalid: [
- 'BE 1234567890',
- '123456789',
- ],
+ valid: ['BE1234567890', '1234567890'],
+ invalid: ['BE 1234567890', '123456789'],
});
test({
validator: 'isVAT',
args: ['BG'],
- valid: [
- 'BG1234567890',
- '1234567890',
- 'BG123456789',
- '123456789',
- ],
- invalid: [
- 'BG 1234567890',
- '12345678',
- ],
+ valid: ['BG1234567890', '1234567890', 'BG123456789', '123456789'],
+ invalid: ['BG 1234567890', '12345678'],
});
test({
validator: 'isVAT',
args: ['HR'],
- valid: [
- 'HR12345678901',
- '12345678901',
- ],
- invalid: [
- 'HR 12345678901',
- '1234567890',
- ],
+ valid: ['HR12345678901', '12345678901'],
+ invalid: ['HR 12345678901', '1234567890'],
});
test({
validator: 'isVAT',
args: ['CY'],
- valid: [
- 'CY123456789',
- '123456789',
- ],
- invalid: [
- 'CY 123456789',
- '12345678',
- ],
+ valid: ['CY123456789', '123456789'],
+ invalid: ['CY 123456789', '12345678'],
});
test({
validator: 'isVAT',
@@ -13633,114 +11480,60 @@ describe('Validators', () => {
'123456789',
'12345678',
],
- invalid: [
- 'CZ 123456789',
- '1234567',
- ],
+ invalid: ['CZ 123456789', '1234567'],
});
test({
validator: 'isVAT',
args: ['DK'],
- valid: [
- 'DK12345678',
- '12345678',
- ],
- invalid: [
- 'DK 12345678',
- '1234567',
- ],
+ valid: ['DK12345678', '12345678'],
+ invalid: ['DK 12345678', '1234567'],
});
test({
validator: 'isVAT',
args: ['EE'],
- valid: [
- 'EE123456789',
- '123456789',
- ],
- invalid: [
- 'EE 123456789',
- '12345678',
- ],
+ valid: ['EE123456789', '123456789'],
+ invalid: ['EE 123456789', '12345678'],
});
test({
validator: 'isVAT',
args: ['FI'],
- valid: [
- 'FI12345678',
- '12345678',
- ],
- invalid: [
- 'FI 12345678',
- '1234567',
- ],
+ valid: ['FI12345678', '12345678'],
+ invalid: ['FI 12345678', '1234567'],
});
test({
validator: 'isVAT',
args: ['FR'],
- valid: [
- 'FRAA123456789',
- 'AA123456789',
- ],
- invalid: [
- 'FR AA123456789',
- '123456789',
- ],
+ valid: ['FRAA123456789', 'AA123456789'],
+ invalid: ['FR AA123456789', '123456789'],
});
test({
validator: 'isVAT',
args: ['DE'],
- valid: [
- 'DE123456789',
- '123456789',
- ],
- invalid: [
- 'DE 123456789',
- '12345678',
- ],
+ valid: ['DE123456789', '123456789'],
+ invalid: ['DE 123456789', '12345678'],
});
test({
validator: 'isVAT',
args: ['EL'],
- valid: [
- 'EL123456789',
- '123456789',
- ],
- invalid: [
- 'EL 123456789',
- '12345678',
- ],
+ valid: ['EL123456789', '123456789'],
+ invalid: ['EL 123456789', '12345678'],
});
test({
validator: 'isVAT',
args: ['HU'],
- valid: [
- 'HU12345678',
- '12345678',
- ],
- invalid: [
- 'HU 12345678',
- '1234567',
- ],
+ valid: ['HU12345678', '12345678'],
+ invalid: ['HU 12345678', '1234567'],
});
test({
validator: 'isVAT',
args: ['IE'],
- valid: [
- 'IE1234567AW',
- '1234567AW',
- ],
- invalid: [
- 'IE 1234567',
- '1234567',
- ],
+ valid: ['IE1234567AW', '1234567AW'],
+ invalid: ['IE 1234567', '1234567'],
});
test({
validator: 'isVAT',
args: ['IT'],
- valid: [
- 'IT12345678910',
- '12345678910',
- ],
+ valid: ['IT12345678910', '12345678910'],
invalid: [
'IT12345678 910',
'IT 123456789101',
@@ -13752,14 +11545,8 @@ describe('Validators', () => {
test({
validator: 'isVAT',
args: ['LV'],
- valid: [
- 'LV12345678901',
- '12345678901',
- ],
- invalid: [
- 'LV 12345678901',
- '1234567890',
- ],
+ valid: ['LV12345678901', '12345678901'],
+ invalid: ['LV 12345678901', '1234567890'],
});
test({
validator: 'isVAT',
@@ -13774,42 +11561,24 @@ describe('Validators', () => {
'LT123456789',
'123456789',
],
- invalid: [
- 'LT 123456789012',
- '12345678',
- ],
+ invalid: ['LT 123456789012', '12345678'],
});
test({
validator: 'isVAT',
args: ['LU'],
- valid: [
- 'LU12345678',
- '12345678',
- ],
- invalid: [
- 'LU 12345678',
- '1234567',
- ],
+ valid: ['LU12345678', '12345678'],
+ invalid: ['LU 12345678', '1234567'],
});
test({
validator: 'isVAT',
args: ['MT'],
- valid: [
- 'MT12345678',
- '12345678',
- ],
- invalid: [
- 'MT 12345678',
- '1234567',
- ],
+ valid: ['MT12345678', '12345678'],
+ invalid: ['MT 12345678', '1234567'],
});
test({
validator: 'isVAT',
args: ['NL'],
- valid: [
- 'NL123456789B10',
- '123456789B10',
- ],
+ valid: ['NL123456789B10', '123456789B10'],
invalid: [
'NL12345678 910',
'NL 123456789101',
@@ -13829,168 +11598,85 @@ describe('Validators', () => {
'PL123-45-67-890',
'123-45-67-890',
],
- invalid: [
- 'PL 1234567890',
- '123456789',
- ],
+ invalid: ['PL 1234567890', '123456789'],
});
test({
validator: 'isVAT',
args: ['PT'],
- valid: [
- 'PT123456789',
- '123456789',
- ],
- invalid: [
- 'PT 123456789',
- '000000001',
- ],
+ valid: ['PT123456789', '123456789'],
+ invalid: ['PT 123456789', '000000001'],
});
test({
validator: 'isVAT',
args: ['RO'],
- valid: [
- 'RO1234567890',
- '1234567890',
- 'RO12',
- '12',
- ],
- invalid: [
- 'RO 12',
- '1',
- ],
+ valid: ['RO1234567890', '1234567890', 'RO12', '12'],
+ invalid: ['RO 12', '1'],
});
test({
validator: 'isVAT',
args: ['SK'],
- valid: [
- 'SK1234567890',
- '1234567890',
- ],
- invalid: [
- 'SK 1234567890',
- '123456789',
- ],
+ valid: ['SK1234567890', '1234567890'],
+ invalid: ['SK 1234567890', '123456789'],
});
test({
validator: 'isVAT',
args: ['SI'],
- valid: [
- 'SI12345678',
- '12345678',
- ],
- invalid: [
- 'SI 12345678',
- '1234567',
- ],
+ valid: ['SI12345678', '12345678'],
+ invalid: ['SI 12345678', '1234567'],
});
test({
validator: 'isVAT',
args: ['ES'],
- valid: [
- 'ESA1234567A',
- 'A1234567A',
- ],
- invalid: [
- 'ES 1234567A',
- '123456789',
- ],
+ valid: ['ESA1234567A', 'A1234567A'],
+ invalid: ['ES 1234567A', '123456789'],
});
test({
validator: 'isVAT',
args: ['SE'],
- valid: [
- 'SE123456789012',
- '123456789012',
- ],
- invalid: [
- 'SE 123456789012',
- '12345678901',
- ],
+ valid: ['SE123456789012', '123456789012'],
+ invalid: ['SE 123456789012', '12345678901'],
});
test({
validator: 'isVAT',
args: ['AL'],
- valid: [
- 'AL123456789A',
- '123456789A',
- ],
- invalid: [
- 'AL 123456789A',
- '123456789',
- ],
+ valid: ['AL123456789A', '123456789A'],
+ invalid: ['AL 123456789A', '123456789'],
});
test({
validator: 'isVAT',
args: ['MK'],
- valid: [
- 'MK1234567890123',
- '1234567890123',
- ],
- invalid: [
- 'MK 1234567890123',
- '123456789012',
- ],
+ valid: ['MK1234567890123', '1234567890123'],
+ invalid: ['MK 1234567890123', '123456789012'],
});
test({
validator: 'isVAT',
args: ['AU'],
- valid: [
- 'AU12345678901',
- '12345678901',
- ],
- invalid: [
- 'AU 12345678901',
- '1234567890',
- ],
+ valid: ['AU12345678901', '12345678901'],
+ invalid: ['AU 12345678901', '1234567890'],
});
test({
validator: 'isVAT',
args: ['BY'],
- valid: [
- 'УНП 123456789',
- '123456789',
- ],
- invalid: [
- 'BY 123456789',
- '12345678',
- ],
+ valid: ['УНП 123456789', '123456789'],
+ invalid: ['BY 123456789', '12345678'],
});
test({
validator: 'isVAT',
args: ['CA'],
- valid: [
- 'CA123456789',
- '123456789',
- ],
- invalid: [
- 'CA 123456789',
- '12345678',
- ],
+ valid: ['CA123456789', '123456789'],
+ invalid: ['CA 123456789', '12345678'],
});
test({
validator: 'isVAT',
args: ['IS'],
- valid: [
- 'IS123456',
- '12345',
- ],
- invalid: [
- 'IS 12345',
- '1234',
- ],
+ valid: ['IS123456', '12345'],
+ invalid: ['IS 12345', '1234'],
});
test({
validator: 'isVAT',
args: ['IN'],
- valid: [
- 'IN123456789012345',
- '123456789012345',
- ],
- invalid: [
- 'IN 123456789012345',
- '12345678901234',
- ],
+ valid: ['IN123456789012345', '123456789012345'],
+ invalid: ['IN 123456789012345', '12345678901234'],
});
test({
validator: 'isVAT',
@@ -14001,46 +11687,25 @@ describe('Validators', () => {
'ID12.345.678.9-012.345',
'12.345.678.9-012.345',
],
- invalid: [
- 'ID 123456789012345',
- '12345678901234',
- ],
+ invalid: ['ID 123456789012345', '12345678901234'],
});
test({
validator: 'isVAT',
args: ['IL'],
- valid: [
- 'IL123456789',
- '123456789',
- ],
- invalid: [
- 'IL 123456789',
- '12345678',
- ],
+ valid: ['IL123456789', '123456789'],
+ invalid: ['IL 123456789', '12345678'],
});
test({
validator: 'isVAT',
args: ['KZ'],
- valid: [
- 'KZ123456789',
- '123456789',
- ],
- invalid: [
- 'KZ 123456789',
- '12345678',
- ],
+ valid: ['KZ123456789', '123456789'],
+ invalid: ['KZ 123456789', '12345678'],
});
test({
validator: 'isVAT',
args: ['NZ'],
- valid: [
- 'NZ123456789',
- '123456789',
- ],
- invalid: [
- 'NZ 123456789',
- '12345678',
- ],
+ valid: ['NZ123456789', '123456789'],
+ invalid: ['NZ 123456789', '12345678'],
});
test({
validator: 'isVAT',
@@ -14051,22 +11716,13 @@ describe('Validators', () => {
'NG12345678-9012',
'12345678-9012',
],
- invalid: [
- 'NG 123456789012',
- '12345678901',
- ],
+ invalid: ['NG 123456789012', '12345678901'],
});
test({
validator: 'isVAT',
args: ['NO'],
- valid: [
- 'NO123456789MVA',
- '123456789MVA',
- ],
- invalid: [
- 'NO 123456789MVA',
- '123456789',
- ],
+ valid: ['NO123456789MVA', '123456789MVA'],
+ invalid: ['NO 123456789MVA', '123456789'],
});
test({
validator: 'isVAT',
@@ -14077,60 +11733,31 @@ describe('Validators', () => {
'PH123 456 789 012',
'123 456 789 012',
],
- invalid: [
- 'PH 123456789012',
- '12345678901',
- ],
+ invalid: ['PH 123456789012', '12345678901'],
});
test({
validator: 'isVAT',
args: ['RU'],
- valid: [
- 'RU1234567890',
- '1234567890',
- 'RU123456789012',
- '123456789012',
- ],
- invalid: [
- 'RU 123456789012',
- '12345678901',
- ],
+ valid: ['RU1234567890', '1234567890', 'RU123456789012', '123456789012'],
+ invalid: ['RU 123456789012', '12345678901'],
});
test({
validator: 'isVAT',
args: ['SM'],
- valid: [
- 'SM12345',
- '12345',
- ],
- invalid: [
- 'SM 12345',
- '1234',
- ],
+ valid: ['SM12345', '12345'],
+ invalid: ['SM 12345', '1234'],
});
test({
validator: 'isVAT',
args: ['SA'],
- valid: [
- 'SA123456789012345',
- '123456789012345',
- ],
- invalid: [
- 'SA 123456789012345',
- '12345678901234',
- ],
+ valid: ['SA123456789012345', '123456789012345'],
+ invalid: ['SA 123456789012345', '12345678901234'],
});
test({
validator: 'isVAT',
args: ['RS'],
- valid: [
- 'RS123456789',
- '123456789',
- ],
- invalid: [
- 'RS 123456789',
- '12345678',
- ],
+ valid: ['RS123456789', '123456789'],
+ invalid: ['RS 123456789', '12345678'],
});
test({
validator: 'isVAT',
@@ -14165,26 +11792,14 @@ describe('Validators', () => {
test({
validator: 'isVAT',
args: ['TR'],
- valid: [
- 'TR1234567890',
- '1234567890',
- ],
- invalid: [
- 'TR 1234567890',
- '123456789',
- ],
+ valid: ['TR1234567890', '1234567890'],
+ invalid: ['TR 1234567890', '123456789'],
});
test({
validator: 'isVAT',
args: ['UA'],
- valid: [
- 'UA123456789012',
- '123456789012',
- ],
- invalid: [
- 'UA 123456789012',
- '12345678901',
- ],
+ valid: ['UA123456789012', '123456789012'],
+ invalid: ['UA 123456789012', '12345678901'],
});
test({
validator: 'isVAT',
@@ -14218,38 +11833,20 @@ describe('Validators', () => {
test({
validator: 'isVAT',
args: ['UZ'],
- valid: [
- 'UZ123456789',
- '123456789',
- ],
- invalid: [
- 'UZ 123456789',
- '12345678',
- ],
+ valid: ['UZ123456789', '123456789'],
+ invalid: ['UZ 123456789', '12345678'],
});
test({
validator: 'isVAT',
args: ['AR'],
- valid: [
- 'AR12345678901',
- '12345678901',
- ],
- invalid: [
- 'AR 12345678901',
- '1234567890',
- ],
+ valid: ['AR12345678901', '12345678901'],
+ invalid: ['AR 12345678901', '1234567890'],
});
test({
validator: 'isVAT',
args: ['BO'],
- valid: [
- 'BO1234567',
- '1234567',
- ],
- invalid: [
- 'BO 1234567',
- '123456',
- ],
+ valid: ['BO1234567', '1234567'],
+ invalid: ['BO 1234567', '123456'],
});
test({
validator: 'isVAT',
@@ -14260,94 +11857,49 @@ describe('Validators', () => {
'BR123.456.789-01',
'123.456.789-01',
],
- invalid: [
- 'BR 12.345.678/9012-34',
- '12345678901234',
- ],
+ invalid: ['BR 12.345.678/9012-34', '12345678901234'],
});
test({
validator: 'isVAT',
args: ['CL'],
- valid: [
- 'CL12345678-9',
- '12345678-9',
- ],
- invalid: [
- 'CL 12345678-9',
- '12345678',
- ],
+ valid: ['CL12345678-9', '12345678-9'],
+ invalid: ['CL 12345678-9', '12345678'],
});
test({
validator: 'isVAT',
args: ['CO'],
- valid: [
- 'CO1234567890',
- '1234567890',
- ],
- invalid: [
- 'CO 1234567890',
- '123456789',
- ],
+ valid: ['CO1234567890', '1234567890'],
+ invalid: ['CO 1234567890', '123456789'],
});
test({
validator: 'isVAT',
args: ['CR'],
- valid: [
- 'CR123456789012',
- '123456789012',
- 'CR123456789',
- '123456789',
- ],
- invalid: [
- 'CR 123456789',
- '12345678',
- ],
+ valid: ['CR123456789012', '123456789012', 'CR123456789', '123456789'],
+ invalid: ['CR 123456789', '12345678'],
});
test({
validator: 'isVAT',
args: ['EC'],
- valid: [
- 'EC1234567890123',
- '1234567890123',
- ],
- invalid: [
- 'EC 1234567890123',
- '123456789012',
- ],
+ valid: ['EC1234567890123', '1234567890123'],
+ invalid: ['EC 1234567890123', '123456789012'],
});
test({
validator: 'isVAT',
args: ['SV'],
- valid: [
- 'SV1234-567890-123-1',
- '1234-567890-123-1',
- ],
- invalid: [
- 'SV 1234-567890-123-1',
- '1234567890123',
- ],
+ valid: ['SV1234-567890-123-1', '1234-567890-123-1'],
+ invalid: ['SV 1234-567890-123-1', '1234567890123'],
});
test({
validator: 'isVAT',
args: ['GT'],
- valid: [
- 'GT1234567-8',
- '1234567-8',
- ],
- invalid: [
- 'GT 1234567-8',
- '1234567',
- ],
+ valid: ['GT1234567-8', '1234567-8'],
+ invalid: ['GT 1234567-8', '1234567'],
});
test({
validator: 'isVAT',
args: ['HN'],
- valid: [
- 'HN',
- ],
- invalid: [
- 'HN ',
- ],
+ valid: ['HN'],
+ invalid: ['HN '],
});
test({
validator: 'isVAT',
@@ -14358,58 +11910,31 @@ describe('Validators', () => {
'MXABC123456DEF',
'ABC123456DEF',
],
- invalid: [
- 'MX ABC123456EFG',
- '123456',
- ],
+ invalid: ['MX ABC123456EFG', '123456'],
});
test({
validator: 'isVAT',
args: ['NI'],
- valid: [
- 'NI123-456789-0123A',
- '123-456789-0123A',
- ],
- invalid: [
- 'NI 123-456789-0123A',
- '1234567890123',
- ],
+ valid: ['NI123-456789-0123A', '123-456789-0123A'],
+ invalid: ['NI 123-456789-0123A', '1234567890123'],
});
test({
validator: 'isVAT',
args: ['PA'],
- valid: [
- 'PA',
- ],
- invalid: [
- 'PA ',
- ],
+ valid: ['PA'],
+ invalid: ['PA '],
});
test({
validator: 'isVAT',
args: ['PY'],
- valid: [
- 'PY12345678-9',
- '12345678-9',
- 'PY123456-7',
- '123456-7',
- ],
- invalid: [
- 'PY 123456-7',
- '123456',
- ],
+ valid: ['PY12345678-9', '12345678-9', 'PY123456-7', '123456-7'],
+ invalid: ['PY 123456-7', '123456'],
});
test({
validator: 'isVAT',
args: ['PE'],
- valid: [
- 'PE12345678901',
- '12345678901',
- ],
- invalid: [
- 'PE 12345678901',
- '1234567890',
- ],
+ valid: ['PE12345678901', '12345678901'],
+ invalid: ['PE 12345678901', '1234567890'],
});
test({
validator: 'isVAT',
@@ -14424,43 +11949,24 @@ describe('Validators', () => {
'DO1-23-45678-9',
'1-23-45678-9',
],
- invalid: [
- 'DO 12345678901',
- '1234567890',
- ],
+ invalid: ['DO 12345678901', '1234567890'],
});
test({
validator: 'isVAT',
args: ['UY'],
- valid: [
- 'UY123456789012',
- '123456789012',
- ],
- invalid: [
- 'UY 123456789012',
- '12345678901',
- ],
+ valid: ['UY123456789012', '123456789012'],
+ invalid: ['UY 123456789012', '12345678901'],
});
test({
validator: 'isVAT',
args: ['VE'],
- valid: [
- 'VEJ-123456789',
- 'J-123456789',
- 'VEJ-12345678-9',
- 'J-12345678-9',
- ],
- invalid: [
- 'VE J-123456789',
- '12345678',
- ],
+ valid: ['VEJ-123456789', 'J-123456789', 'VEJ-12345678-9', 'J-12345678-9'],
+ invalid: ['VE J-123456789', '12345678'],
});
test({
validator: 'isVAT',
args: ['invalidCountryCode'],
- error: [
- 'GB999 9999 00',
- ],
+ error: ['GB999 9999 00'],
});
});
it('should validate mailto URI', () => {
diff --git a/test/validators/isAfter.test.js b/test/validators/isAfter.test.js
index d771d9198..b33767eb8 100644
--- a/test/validators/isAfter.test.js
+++ b/test/validators/isAfter.test.js
@@ -1,4 +1,5 @@
-import test from '../testFunctions';
+import { describe, it } from 'vitest';
+import test from '../testFunctions.js';
describe('isAfter', () => {
it('should validate dates against a start date', () => {
diff --git a/test/validators/isFQDN.test.js b/test/validators/isFQDN.test.js
index 134bab005..37a4dfc0f 100644
--- a/test/validators/isFQDN.test.js
+++ b/test/validators/isFQDN.test.js
@@ -1,26 +1,19 @@
-import test from '../testFunctions';
+import { describe, it } from 'vitest';
+import test from '../testFunctions.js';
describe('isFQDN', () => {
it('should validate domain names.', () => {
test({
validator: 'isFQDN',
args: [],
- valid: [
- 'google.com',
- ],
- invalid: [
- 'google.l33t',
- ],
+ valid: ['google.com'],
+ invalid: ['google.l33t'],
});
test({
validator: 'isFQDN',
args: [{ allow_numeric_tld: true }],
- valid: [
- 'google.com',
- 'google.l33t',
- ],
- invalid: [
- ],
+ valid: ['google.com', 'google.l33t'],
+ invalid: [],
});
});
});
diff --git a/test/validators/isISBN.test.js b/test/validators/isISBN.test.js
index 99fb2e014..5376dcafa 100644
--- a/test/validators/isISBN.test.js
+++ b/test/validators/isISBN.test.js
@@ -1,4 +1,5 @@
-import test from '../testFunctions';
+import { describe, it } from 'vitest';
+import test from '../testFunctions.js';
describe('isISBN', () => {
it('should validate ISBNs', () => {
@@ -6,50 +7,68 @@ describe('isISBN', () => {
validator: 'isISBN',
args: [{ version: 10 }],
valid: [
- '3836221195', '3-8362-2119-5', '3 8362 2119 5',
- '1617290858', '1-61729-085-8', '1 61729 085-8',
- '0007269706', '0-00-726970-6', '0 00 726970 6',
- '3423214120', '3-423-21412-0', '3 423 21412 0',
- '340101319X', '3-401-01319-X', '3 401 01319 X',
+ '3836221195',
+ '3-8362-2119-5',
+ '3 8362 2119 5',
+ '1617290858',
+ '1-61729-085-8',
+ '1 61729 085-8',
+ '0007269706',
+ '0-00-726970-6',
+ '0 00 726970 6',
+ '3423214120',
+ '3-423-21412-0',
+ '3 423 21412 0',
+ '340101319X',
+ '3-401-01319-X',
+ '3 401 01319 X',
],
invalid: [
- '3423214121', '3-423-21412-1', '3 423 21412 1',
- '978-3836221191', '9783836221191',
- '123456789a', 'foo', '',
+ '3423214121',
+ '3-423-21412-1',
+ '3 423 21412 1',
+ '978-3836221191',
+ '9783836221191',
+ '123456789a',
+ 'foo',
+ '',
],
});
test({
validator: 'isISBN',
args: [{ version: 13 }],
valid: [
- '9783836221191', '978-3-8362-2119-1', '978 3 8362 2119 1',
- '9783401013190', '978-3401013190', '978 3401013190',
- '9784873113685', '978-4-87311-368-5', '978 4 87311 368 5',
+ '9783836221191',
+ '978-3-8362-2119-1',
+ '978 3 8362 2119 1',
+ '9783401013190',
+ '978-3401013190',
+ '978 3401013190',
+ '9784873113685',
+ '978-4-87311-368-5',
+ '978 4 87311 368 5',
],
invalid: [
- '9783836221190', '978-3-8362-2119-0', '978 3 8362 2119 0',
- '3836221195', '3-8362-2119-5', '3 8362 2119 5',
- '01234567890ab', 'foo', '',
+ '9783836221190',
+ '978-3-8362-2119-0',
+ '978 3 8362 2119 0',
+ '3836221195',
+ '3-8362-2119-5',
+ '3 8362 2119 5',
+ '01234567890ab',
+ 'foo',
+ '',
],
});
test({
validator: 'isISBN',
- valid: [
- '340101319X',
- '9784873113685',
- ],
- invalid: [
- '3423214121',
- '9783836221190',
- ],
+ valid: ['340101319X', '9784873113685'],
+ invalid: ['3423214121', '9783836221190'],
});
test({
validator: 'isISBN',
args: [{ version: 'foo' }],
- invalid: [
- '340101319X',
- '9784873113685',
- ],
+ invalid: ['340101319X', '9784873113685'],
});
});
@@ -59,50 +78,68 @@ describe('isISBN', () => {
validator: 'isISBN',
args: [10],
valid: [
- '3836221195', '3-8362-2119-5', '3 8362 2119 5',
- '1617290858', '1-61729-085-8', '1 61729 085-8',
- '0007269706', '0-00-726970-6', '0 00 726970 6',
- '3423214120', '3-423-21412-0', '3 423 21412 0',
- '340101319X', '3-401-01319-X', '3 401 01319 X',
+ '3836221195',
+ '3-8362-2119-5',
+ '3 8362 2119 5',
+ '1617290858',
+ '1-61729-085-8',
+ '1 61729 085-8',
+ '0007269706',
+ '0-00-726970-6',
+ '0 00 726970 6',
+ '3423214120',
+ '3-423-21412-0',
+ '3 423 21412 0',
+ '340101319X',
+ '3-401-01319-X',
+ '3 401 01319 X',
],
invalid: [
- '3423214121', '3-423-21412-1', '3 423 21412 1',
- '978-3836221191', '9783836221191',
- '123456789a', 'foo', '',
+ '3423214121',
+ '3-423-21412-1',
+ '3 423 21412 1',
+ '978-3836221191',
+ '9783836221191',
+ '123456789a',
+ 'foo',
+ '',
],
});
test({
validator: 'isISBN',
args: [13],
valid: [
- '9783836221191', '978-3-8362-2119-1', '978 3 8362 2119 1',
- '9783401013190', '978-3401013190', '978 3401013190',
- '9784873113685', '978-4-87311-368-5', '978 4 87311 368 5',
+ '9783836221191',
+ '978-3-8362-2119-1',
+ '978 3 8362 2119 1',
+ '9783401013190',
+ '978-3401013190',
+ '978 3401013190',
+ '9784873113685',
+ '978-4-87311-368-5',
+ '978 4 87311 368 5',
],
invalid: [
- '9783836221190', '978-3-8362-2119-0', '978 3 8362 2119 0',
- '3836221195', '3-8362-2119-5', '3 8362 2119 5',
- '01234567890ab', 'foo', '',
+ '9783836221190',
+ '978-3-8362-2119-0',
+ '978 3 8362 2119 0',
+ '3836221195',
+ '3-8362-2119-5',
+ '3 8362 2119 5',
+ '01234567890ab',
+ 'foo',
+ '',
],
});
test({
validator: 'isISBN',
- valid: [
- '340101319X',
- '9784873113685',
- ],
- invalid: [
- '3423214121',
- '9783836221190',
- ],
+ valid: ['340101319X', '9784873113685'],
+ invalid: ['3423214121', '9783836221190'],
});
test({
validator: 'isISBN',
args: ['foo'],
- invalid: [
- '340101319X',
- '9784873113685',
- ],
+ invalid: ['340101319X', '9784873113685'],
});
});
});