From b613c8c57ed2f75af6c3db4b91907d07c7976978 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=94=A1=E9=87=91=E9=94=8B?= Date: Mon, 30 Mar 2020 09:43:34 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 1 + docs/divide.js.html | 4 +- docs/formatBankCard.js.html | 4 +- docs/formatMoney.js.html | 16 +-- docs/index.html | 5 +- docs/index.js.html | 4 +- docs/isBankCard.js.html | 4 +- docs/isChinese.js.html | 4 +- docs/isEmail.js.html | 4 +- docs/isIPv4.js.html | 4 +- docs/isIPv6.js.html | 18 +-- docs/isIdCard.js.html | 4 +- docs/isMobile.js.html | 4 +- docs/isPassport.js.html | 4 +- docs/isPassword.js.html | 6 +- docs/isPostcode.js.html | 4 +- docs/isQQ.js.html | 4 +- docs/isSocialCreditCode.js.html | 4 +- docs/isTelephone.js.html | 4 +- docs/isUrl.js.html | 120 +++++++++++++++++++ docs/isVehicle.js.html | 4 +- docs/isWX.js.html | 4 +- docs/minus.js.html | 4 +- docs/module-Math.html | 4 +- docs/module-Processor.html | 4 +- docs/module-Validator.html | 199 ++++++++++++++++++++++++++++++-- docs/module-processor.html | 4 +- docs/module-validator.html | 199 ++++++++++++++++++++++++++++++-- docs/numberToChinese.js.html | 6 +- docs/plus.js.html | 4 +- docs/replaceChar.js.html | 4 +- docs/round.js.html | 4 +- docs/times.js.html | 4 +- 33 files changed, 577 insertions(+), 89 deletions(-) create mode 100644 docs/isUrl.js.html diff --git a/README.md b/README.md index 5ed46722..5d9d04ea 100644 --- a/README.md +++ b/README.md @@ -85,6 +85,7 @@ import formatBankCard from 'util-helpers/lib/formatBankCard' - [isChinese](https://doly-dev.github.io/util-helpers/module-Validator.html#.isChinese) - 中文 - [isIPv4](https://doly-dev.github.io/util-helpers/module-Validator.html#.isIPv4) - IPv4 - [isIPv6](https://doly-dev.github.io/util-helpers/module-Validator.html#.isIPv6) - IPv6 + - [isUrl](https://doly-dev.github.io/util-helpers/module-Validator.html#.isUrl) - URL ## 精选第三方工具库 diff --git a/docs/divide.js.html b/docs/divide.js.html index fb981fc8..6e8817ba 100644 --- a/docs/divide.js.html +++ b/docs/divide.js.html @@ -41,7 +41,7 @@ -

Home

Github repo

Modules

+

Home

Github repo

Modules

@@ -106,7 +106,7 @@

divide.js


- Documentation generated by JSDoc 3.6.3 on Sun Jan 12 2020 02:15:44 GMT+0800 (GMT+08:00) using the docdash theme. + Documentation generated by JSDoc 3.6.3 on Mon Mar 30 2020 09:43:26 GMT+0800 (GMT+08:00) using the docdash theme.
diff --git a/docs/formatBankCard.js.html b/docs/formatBankCard.js.html index 1bcd2fb2..391ce5b6 100644 --- a/docs/formatBankCard.js.html +++ b/docs/formatBankCard.js.html @@ -41,7 +41,7 @@ -

Home

Github repo

Modules

+

Home

Github repo

Modules

@@ -109,7 +109,7 @@

formatBankCard.js


- Documentation generated by JSDoc 3.6.3 on Sun Jan 12 2020 02:15:44 GMT+0800 (GMT+08:00) using the docdash theme. + Documentation generated by JSDoc 3.6.3 on Mon Mar 30 2020 09:43:26 GMT+0800 (GMT+08:00) using the docdash theme.
diff --git a/docs/formatMoney.js.html b/docs/formatMoney.js.html index e490ad29..1dcf1b38 100644 --- a/docs/formatMoney.js.html +++ b/docs/formatMoney.js.html @@ -41,7 +41,7 @@ -

Home

Github repo

Modules

+

Home

Github repo

Modules

@@ -56,20 +56,20 @@

formatMoney.js

-
import { checkBoundary, scientificToNumber } from './utils/math.util';
+            
import { checkBoundary, scientificToNumber, isScientificNumber } from './utils/math.util';
 import isNaN from './utils/type/isNaN';
 
+const reg = /^[+-]?\d*\.?\d*$/;
+
 // 检查数字或数字字符串
 function checkNumber(num) {
   if (
+    !(reg.test(num) || isScientificNumber(num)) ||
     isNaN(num) ||
     (typeof num !== 'number' && typeof num !== 'string') ||
-    num === '' ||
-    typeof Number(num) !== 'number' ||
-    num === Infinity || 
-    num === -Infinity
+    num === ''
   ) {
-    console.error(`${num} invalid parameter.`);
+    console.warn(`${num} invalid parameter.`);
     return false;
   }
 
@@ -196,7 +196,7 @@ 

formatMoney.js


- Documentation generated by JSDoc 3.6.3 on Sun Jan 12 2020 02:15:44 GMT+0800 (GMT+08:00) using the docdash theme. + Documentation generated by JSDoc 3.6.3 on Mon Mar 30 2020 09:43:26 GMT+0800 (GMT+08:00) using the docdash theme.
diff --git a/docs/index.html b/docs/index.html index 1f8b6638..5efcdb27 100644 --- a/docs/index.html +++ b/docs/index.html @@ -41,7 +41,7 @@ -

Home

Github repo

Modules

+

Home

Github repo

Modules

@@ -146,6 +146,7 @@

文档

  • isChinese - 中文
  • isIPv4 - IPv4
  • isIPv6 - IPv6
  • +
  • isUrl - URL
  • @@ -176,7 +177,7 @@

    精选第三方工具库


    - Documentation generated by JSDoc 3.6.3 on Sun Jan 12 2020 02:15:44 GMT+0800 (GMT+08:00) using the docdash theme. + Documentation generated by JSDoc 3.6.3 on Mon Mar 30 2020 09:43:26 GMT+0800 (GMT+08:00) using the docdash theme.
    diff --git a/docs/index.js.html b/docs/index.js.html index e0ab2985..d03d32d5 100644 --- a/docs/index.js.html +++ b/docs/index.js.html @@ -41,7 +41,7 @@ -

    Home

    Github repo

    Modules

    +

    Home

    Github repo

    Modules

    @@ -116,7 +116,7 @@

    index.js


    - Documentation generated by JSDoc 3.6.3 on Sun Jan 12 2020 02:15:44 GMT+0800 (GMT+08:00) using the docdash theme. + Documentation generated by JSDoc 3.6.3 on Mon Mar 30 2020 09:43:26 GMT+0800 (GMT+08:00) using the docdash theme.
    diff --git a/docs/isBankCard.js.html b/docs/isBankCard.js.html index 2abc4802..9c3c68ec 100644 --- a/docs/isBankCard.js.html +++ b/docs/isBankCard.js.html @@ -41,7 +41,7 @@ -

    Home

    Github repo

    Modules

    +

    Home

    Github repo

    Modules

    @@ -97,7 +97,7 @@

    isBankCard.js


    - Documentation generated by JSDoc 3.6.3 on Sun Jan 12 2020 02:15:44 GMT+0800 (GMT+08:00) using the docdash theme. + Documentation generated by JSDoc 3.6.3 on Mon Mar 30 2020 09:43:26 GMT+0800 (GMT+08:00) using the docdash theme.
    diff --git a/docs/isChinese.js.html b/docs/isChinese.js.html index c8d5f0c4..5bb9e294 100644 --- a/docs/isChinese.js.html +++ b/docs/isChinese.js.html @@ -41,7 +41,7 @@ -

    Home

    Github repo

    Modules

    +

    Home

    Github repo

    Modules

    @@ -157,7 +157,7 @@

    isChinese.js


    - Documentation generated by JSDoc 3.6.3 on Sun Jan 12 2020 02:15:44 GMT+0800 (GMT+08:00) using the docdash theme. + Documentation generated by JSDoc 3.6.3 on Mon Mar 30 2020 09:43:26 GMT+0800 (GMT+08:00) using the docdash theme.
    diff --git a/docs/isEmail.js.html b/docs/isEmail.js.html index a7d001f6..f949a0f3 100644 --- a/docs/isEmail.js.html +++ b/docs/isEmail.js.html @@ -41,7 +41,7 @@ -

    Home

    Github repo

    Modules

    +

    Home

    Github repo

    Modules

    @@ -94,7 +94,7 @@

    isEmail.js


    - Documentation generated by JSDoc 3.6.3 on Sun Jan 12 2020 02:15:44 GMT+0800 (GMT+08:00) using the docdash theme. + Documentation generated by JSDoc 3.6.3 on Mon Mar 30 2020 09:43:26 GMT+0800 (GMT+08:00) using the docdash theme.
    diff --git a/docs/isIPv4.js.html b/docs/isIPv4.js.html index f94c150a..531dbebd 100644 --- a/docs/isIPv4.js.html +++ b/docs/isIPv4.js.html @@ -41,7 +41,7 @@ -

    Home

    Github repo

    Modules

    +

    Home

    Github repo

    Modules

    @@ -100,7 +100,7 @@

    isIPv4.js


    - Documentation generated by JSDoc 3.6.3 on Sun Jan 12 2020 02:15:44 GMT+0800 (GMT+08:00) using the docdash theme. + Documentation generated by JSDoc 3.6.3 on Mon Mar 30 2020 09:43:26 GMT+0800 (GMT+08:00) using the docdash theme.
    diff --git a/docs/isIPv6.js.html b/docs/isIPv6.js.html index 73a3ba96..22172b2d 100644 --- a/docs/isIPv6.js.html +++ b/docs/isIPv6.js.html @@ -41,7 +41,7 @@ -

    Home

    Github repo

    Modules

    +

    Home

    Github repo

    Modules

    @@ -82,20 +82,20 @@

    isIPv6.js

    * * // 0位压缩表示法 * isIPv6('FF01::1101'); - * - * isIPv6('0:0:0:0:0:0:0:1'); * // => true - * - * // 0位压缩表示法 + * * isIPv6('::1'); - * - * isIPv6('0:0:0:0:0:0:0:0'); * // => true * - * // 0位压缩表示法 * isIPv6('::'); * // => true * + * isIPv6('0:0:0:0:0:0:0:1'); + * // => true + * + * isIPv6('0:0:0:0:0:0:0:0'); + * // => true + * * // 内嵌IPv4地址表示法 * isIPv6('::192.168.1.1'); * // => true @@ -125,7 +125,7 @@

    isIPv6.js


    - Documentation generated by JSDoc 3.6.3 on Sun Jan 12 2020 02:15:44 GMT+0800 (GMT+08:00) using the docdash theme. + Documentation generated by JSDoc 3.6.3 on Mon Mar 30 2020 09:43:26 GMT+0800 (GMT+08:00) using the docdash theme.
    diff --git a/docs/isIdCard.js.html b/docs/isIdCard.js.html index 1527537d..5cdcbfae 100644 --- a/docs/isIdCard.js.html +++ b/docs/isIdCard.js.html @@ -41,7 +41,7 @@ -

    Home

    Github repo

    Modules

    +

    Home

    Github repo

    Modules

    @@ -100,7 +100,7 @@

    isIdCard.js


    - Documentation generated by JSDoc 3.6.3 on Sun Jan 12 2020 02:15:44 GMT+0800 (GMT+08:00) using the docdash theme. + Documentation generated by JSDoc 3.6.3 on Mon Mar 30 2020 09:43:26 GMT+0800 (GMT+08:00) using the docdash theme.
    diff --git a/docs/isMobile.js.html b/docs/isMobile.js.html index 7b8960ff..e5f9eab0 100644 --- a/docs/isMobile.js.html +++ b/docs/isMobile.js.html @@ -41,7 +41,7 @@ -

    Home

    Github repo

    Modules

    +

    Home

    Github repo

    Modules

    @@ -94,7 +94,7 @@

    isMobile.js


    - Documentation generated by JSDoc 3.6.3 on Sun Jan 12 2020 02:15:44 GMT+0800 (GMT+08:00) using the docdash theme. + Documentation generated by JSDoc 3.6.3 on Mon Mar 30 2020 09:43:26 GMT+0800 (GMT+08:00) using the docdash theme.
    diff --git a/docs/isPassport.js.html b/docs/isPassport.js.html index 59bf9b88..4bab874d 100644 --- a/docs/isPassport.js.html +++ b/docs/isPassport.js.html @@ -41,7 +41,7 @@ -

    Home

    Github repo

    Modules

    +

    Home

    Github repo

    Modules

    @@ -96,7 +96,7 @@

    isPassport.js


    - Documentation generated by JSDoc 3.6.3 on Sun Jan 12 2020 02:15:44 GMT+0800 (GMT+08:00) using the docdash theme. + Documentation generated by JSDoc 3.6.3 on Mon Mar 30 2020 09:43:26 GMT+0800 (GMT+08:00) using the docdash theme.
    diff --git a/docs/isPassword.js.html b/docs/isPassword.js.html index 937a189d..29ab5452 100644 --- a/docs/isPassword.js.html +++ b/docs/isPassword.js.html @@ -41,7 +41,7 @@ -

    Home

    Github repo

    Modules

    +

    Home

    Github repo

    Modules

    @@ -90,9 +90,9 @@

    isPassword.js

    * // 仅支持 数字、字母、特殊字符,其他字符如中文字符是校验不通过的 * isPassword('_Aa一二三45678', {level: 3, ignoreCase: true}); * // => false + * * isPassword(' _Aa12345678', {level: 3, ignoreCase: true}); * // => false - * */ function isPassword(value, { level = 2, @@ -140,7 +140,7 @@

    isPassword.js


    - Documentation generated by JSDoc 3.6.3 on Sun Jan 12 2020 02:15:44 GMT+0800 (GMT+08:00) using the docdash theme. + Documentation generated by JSDoc 3.6.3 on Mon Mar 30 2020 09:43:26 GMT+0800 (GMT+08:00) using the docdash theme.
    diff --git a/docs/isPostcode.js.html b/docs/isPostcode.js.html index 3130a54c..d5fe951e 100644 --- a/docs/isPostcode.js.html +++ b/docs/isPostcode.js.html @@ -41,7 +41,7 @@ -

    Home

    Github repo

    Modules

    +

    Home

    Github repo

    Modules

    @@ -94,7 +94,7 @@

    isPostcode.js


    - Documentation generated by JSDoc 3.6.3 on Sun Jan 12 2020 02:15:44 GMT+0800 (GMT+08:00) using the docdash theme. + Documentation generated by JSDoc 3.6.3 on Mon Mar 30 2020 09:43:26 GMT+0800 (GMT+08:00) using the docdash theme.
    diff --git a/docs/isQQ.js.html b/docs/isQQ.js.html index e992be53..00e46352 100644 --- a/docs/isQQ.js.html +++ b/docs/isQQ.js.html @@ -41,7 +41,7 @@ -

    Home

    Github repo

    Modules

    +

    Home

    Github repo

    Modules

    @@ -94,7 +94,7 @@

    isQQ.js


    - Documentation generated by JSDoc 3.6.3 on Sun Jan 12 2020 02:15:44 GMT+0800 (GMT+08:00) using the docdash theme. + Documentation generated by JSDoc 3.6.3 on Mon Mar 30 2020 09:43:26 GMT+0800 (GMT+08:00) using the docdash theme.
    diff --git a/docs/isSocialCreditCode.js.html b/docs/isSocialCreditCode.js.html index 6192266d..f81d4c46 100644 --- a/docs/isSocialCreditCode.js.html +++ b/docs/isSocialCreditCode.js.html @@ -41,7 +41,7 @@ -

    Home

    Github repo

    Modules

    +

    Home

    Github repo

    Modules

    @@ -174,7 +174,7 @@

    isSocialCreditCode.js


    - Documentation generated by JSDoc 3.6.3 on Sun Jan 12 2020 02:15:44 GMT+0800 (GMT+08:00) using the docdash theme. + Documentation generated by JSDoc 3.6.3 on Mon Mar 30 2020 09:43:26 GMT+0800 (GMT+08:00) using the docdash theme.
    diff --git a/docs/isTelephone.js.html b/docs/isTelephone.js.html index ea046354..53a12a11 100644 --- a/docs/isTelephone.js.html +++ b/docs/isTelephone.js.html @@ -41,7 +41,7 @@ -

    Home

    Github repo

    Modules

    +

    Home

    Github repo

    Modules

    @@ -100,7 +100,7 @@

    isTelephone.js


    - Documentation generated by JSDoc 3.6.3 on Sun Jan 12 2020 02:15:44 GMT+0800 (GMT+08:00) using the docdash theme. + Documentation generated by JSDoc 3.6.3 on Mon Mar 30 2020 09:43:26 GMT+0800 (GMT+08:00) using the docdash theme.
    diff --git a/docs/isUrl.js.html b/docs/isUrl.js.html new file mode 100644 index 00000000..5da06622 --- /dev/null +++ b/docs/isUrl.js.html @@ -0,0 +1,120 @@ + + + + + + isUrl.js - util-helpers + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + +

    isUrl.js

    + + + + + + + +
    +
    +
    // url正则
    +const reg = /(((^https?:(?:\/\/)?)(?:[-;:&=\+\$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=\+\$,\w]+@)[A-Za-z0-9.-]+)((?:\/[\+~%\/.\w-_]*)?\??(?:[-\+=&;%@.\w_]*)#?(?:[\w]*))?)$/;
    +
    +/**
    + * 检测值是否为url
    + * 
    + * @static
    + * @alias module:Validator.isUrl
    + * @since 3.4.0
    + * @param {String} value 要检测的值
    + * @returns {Boolean} 值是否为url
    + * @example
    + *
    + * isUrl('');
    + * // => false
    + *
    + * isUrl('8.8.8.8');
    + * // => false
    + *
    + * isUrl('http://example.com');
    + * // => true
    + *
    + * isUrl('https://example.com:8080');
    + * // => true
    + *
    + * isUrl('http://www.example.com/test/123');
    + * // => true
    + *
    + * isUrl('http://www.example.com/test/123?foo=bar');
    + * // => true
    + */
    +function isUrl(value) {
    +  return reg.test(value);
    +}
    +
    +export default isUrl;
    +
    +
    + + + + + + +
    + +
    + +
    + Documentation generated by JSDoc 3.6.3 on Mon Mar 30 2020 09:43:26 GMT+0800 (GMT+08:00) using the docdash theme. +
    + + + + + + + + + + + diff --git a/docs/isVehicle.js.html b/docs/isVehicle.js.html index 9db56b9c..7732bdf1 100644 --- a/docs/isVehicle.js.html +++ b/docs/isVehicle.js.html @@ -41,7 +41,7 @@ -

    Home

    Github repo

    Modules

    +

    Home

    Github repo

    Modules

    @@ -94,7 +94,7 @@

    isVehicle.js


    - Documentation generated by JSDoc 3.6.3 on Sun Jan 12 2020 02:15:44 GMT+0800 (GMT+08:00) using the docdash theme. + Documentation generated by JSDoc 3.6.3 on Mon Mar 30 2020 09:43:26 GMT+0800 (GMT+08:00) using the docdash theme.
    diff --git a/docs/isWX.js.html b/docs/isWX.js.html index 4287f773..9b63a86e 100644 --- a/docs/isWX.js.html +++ b/docs/isWX.js.html @@ -41,7 +41,7 @@ -

    Home

    Github repo

    Modules

    +

    Home

    Github repo

    Modules

    @@ -94,7 +94,7 @@

    isWX.js


    - Documentation generated by JSDoc 3.6.3 on Sun Jan 12 2020 02:15:44 GMT+0800 (GMT+08:00) using the docdash theme. + Documentation generated by JSDoc 3.6.3 on Mon Mar 30 2020 09:43:26 GMT+0800 (GMT+08:00) using the docdash theme.
    diff --git a/docs/minus.js.html b/docs/minus.js.html index 14c466b9..3ea0c247 100644 --- a/docs/minus.js.html +++ b/docs/minus.js.html @@ -41,7 +41,7 @@ -

    Home

    Github repo

    Modules

    +

    Home

    Github repo

    Modules

    @@ -102,7 +102,7 @@

    minus.js


    - Documentation generated by JSDoc 3.6.3 on Sun Jan 12 2020 02:15:44 GMT+0800 (GMT+08:00) using the docdash theme. + Documentation generated by JSDoc 3.6.3 on Mon Mar 30 2020 09:43:26 GMT+0800 (GMT+08:00) using the docdash theme.
    diff --git a/docs/module-Math.html b/docs/module-Math.html index ed5d2bb2..7b81fb29 100644 --- a/docs/module-Math.html +++ b/docs/module-Math.html @@ -41,7 +41,7 @@ -

    Home

    Github repo

    Modules

    +

    Home

    Github repo

    Modules

    @@ -1427,7 +1427,7 @@
    Returns:

    - Documentation generated by JSDoc 3.6.3 on Sun Jan 12 2020 02:15:44 GMT+0800 (GMT+08:00) using the docdash theme. + Documentation generated by JSDoc 3.6.3 on Mon Mar 30 2020 09:43:26 GMT+0800 (GMT+08:00) using the docdash theme.
    diff --git a/docs/module-Processor.html b/docs/module-Processor.html index 7769383e..a555acc8 100644 --- a/docs/module-Processor.html +++ b/docs/module-Processor.html @@ -41,7 +41,7 @@ -

    Home

    Github repo

    Modules

    +

    Home

    Github repo

    Modules

    @@ -2001,7 +2001,7 @@
    Returns:

    - Documentation generated by JSDoc 3.6.3 on Sun Jan 12 2020 02:15:44 GMT+0800 (GMT+08:00) using the docdash theme. + Documentation generated by JSDoc 3.6.3 on Mon Mar 30 2020 09:43:26 GMT+0800 (GMT+08:00) using the docdash theme.
    diff --git a/docs/module-Validator.html b/docs/module-Validator.html index 4df3a0e9..4079efd1 100644 --- a/docs/module-Validator.html +++ b/docs/module-Validator.html @@ -41,7 +41,7 @@ -

    Home

    Github repo

    Modules

    +

    Home

    Github repo

    Modules

    @@ -1248,20 +1248,20 @@
    Example
    // 0位压缩表示法 isIPv6('FF01::1101'); - -isIPv6('0:0:0:0:0:0:0:1'); // => true -// 0位压缩表示法 isIPv6('::1'); - -isIPv6('0:0:0:0:0:0:0:0'); // => true -// 0位压缩表示法 isIPv6('::'); // => true +isIPv6('0:0:0:0:0:0:0:1'); +// => true + +isIPv6('0:0:0:0:0:0:0:0'); +// => true + // 内嵌IPv4地址表示法 isIPv6('::192.168.1.1'); // => true @@ -1803,6 +1803,7 @@
    Example
    // 仅支持 数字、字母、特殊字符,其他字符如中文字符是校验不通过的 isPassword('_Aa一二三45678', {level: 3, ignoreCase: true}); // => false + isPassword(' _Aa12345678', {level: 3, ignoreCase: true}); // => false
    @@ -2901,6 +2902,188 @@
    Returns:
    +

    (static) isUrl(value) → {Boolean}

    + + + + + + +
    + + +
    Source:
    +
    + + + + + +
    Since:
    +
    • 3.4.0
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    + 检测值是否为url +
    + + + + + + + + + +
    Example
    + +
    isUrl('');
    +// => false
    +
    +isUrl('8.8.8.8');
    +// => false
    +
    +isUrl('http://example.com');
    +// => true
    +
    +isUrl('https://example.com:8080');
    +// => true
    +
    +isUrl('http://www.example.com/test/123');
    +// => true
    +
    +isUrl('http://www.example.com/test/123?foo=bar');
    +// => true
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    value + + +String + + + + 要检测的值
    + + + + + + + + + + + + + + + + +
    Returns:
    + + +
    + 值是否为url +
    + + + +
    +
    + Type +
    +
    + +Boolean + + +
    +
    + + + + + + + + + +

    (static) isVehicle(value) → {Boolean}

    @@ -3256,7 +3439,7 @@
    Returns:

    - Documentation generated by JSDoc 3.6.3 on Sun Jan 12 2020 02:15:44 GMT+0800 (GMT+08:00) using the docdash theme. + Documentation generated by JSDoc 3.6.3 on Mon Mar 30 2020 09:43:26 GMT+0800 (GMT+08:00) using the docdash theme.
    diff --git a/docs/module-processor.html b/docs/module-processor.html index 7769383e..a555acc8 100644 --- a/docs/module-processor.html +++ b/docs/module-processor.html @@ -41,7 +41,7 @@ -

    Home

    Github repo

    Modules

    +

    Home

    Github repo

    Modules

    @@ -2001,7 +2001,7 @@
    Returns:

    - Documentation generated by JSDoc 3.6.3 on Sun Jan 12 2020 02:15:44 GMT+0800 (GMT+08:00) using the docdash theme. + Documentation generated by JSDoc 3.6.3 on Mon Mar 30 2020 09:43:26 GMT+0800 (GMT+08:00) using the docdash theme.
    diff --git a/docs/module-validator.html b/docs/module-validator.html index 4df3a0e9..4079efd1 100644 --- a/docs/module-validator.html +++ b/docs/module-validator.html @@ -41,7 +41,7 @@ -

    Home

    Github repo

    Modules

    +

    Home

    Github repo

    Modules

    @@ -1248,20 +1248,20 @@
    Example
    // 0位压缩表示法 isIPv6('FF01::1101'); - -isIPv6('0:0:0:0:0:0:0:1'); // => true -// 0位压缩表示法 isIPv6('::1'); - -isIPv6('0:0:0:0:0:0:0:0'); // => true -// 0位压缩表示法 isIPv6('::'); // => true +isIPv6('0:0:0:0:0:0:0:1'); +// => true + +isIPv6('0:0:0:0:0:0:0:0'); +// => true + // 内嵌IPv4地址表示法 isIPv6('::192.168.1.1'); // => true @@ -1803,6 +1803,7 @@
    Example
    // 仅支持 数字、字母、特殊字符,其他字符如中文字符是校验不通过的 isPassword('_Aa一二三45678', {level: 3, ignoreCase: true}); // => false + isPassword(' _Aa12345678', {level: 3, ignoreCase: true}); // => false
    @@ -2901,6 +2902,188 @@
    Returns:
    +

    (static) isUrl(value) → {Boolean}

    + + + + + + +
    + + +
    Source:
    +
    + + + + + +
    Since:
    +
    • 3.4.0
    + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    + + + + + +
    + 检测值是否为url +
    + + + + + + + + + +
    Example
    + +
    isUrl('');
    +// => false
    +
    +isUrl('8.8.8.8');
    +// => false
    +
    +isUrl('http://example.com');
    +// => true
    +
    +isUrl('https://example.com:8080');
    +// => true
    +
    +isUrl('http://www.example.com/test/123');
    +// => true
    +
    +isUrl('http://www.example.com/test/123?foo=bar');
    +// => true
    + + + + +
    Parameters:
    + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
    NameTypeDescription
    value + + +String + + + + 要检测的值
    + + + + + + + + + + + + + + + + +
    Returns:
    + + +
    + 值是否为url +
    + + + +
    +
    + Type +
    +
    + +Boolean + + +
    +
    + + + + + + + + + +

    (static) isVehicle(value) → {Boolean}

    @@ -3256,7 +3439,7 @@
    Returns:

    - Documentation generated by JSDoc 3.6.3 on Sun Jan 12 2020 02:15:44 GMT+0800 (GMT+08:00) using the docdash theme. + Documentation generated by JSDoc 3.6.3 on Mon Mar 30 2020 09:43:26 GMT+0800 (GMT+08:00) using the docdash theme.
    diff --git a/docs/numberToChinese.js.html b/docs/numberToChinese.js.html index 138d4e14..94d64c43 100644 --- a/docs/numberToChinese.js.html +++ b/docs/numberToChinese.js.html @@ -41,7 +41,7 @@ -

    Home

    Github repo

    Modules

    +

    Home

    Github repo

    Modules

    @@ -234,7 +234,7 @@

    numberToChinese.js

    } = {}) { // 非数字 或 NaN 不处理 if (typeof num !== 'number' || isNaN(num)) { - console.error(`参数错误 ${num},请传入数字`); + console.warn(`参数错误 ${num},请传入数字`); return ''; } @@ -291,7 +291,7 @@

    numberToChinese.js


    - Documentation generated by JSDoc 3.6.3 on Sun Jan 12 2020 02:15:44 GMT+0800 (GMT+08:00) using the docdash theme. + Documentation generated by JSDoc 3.6.3 on Mon Mar 30 2020 09:43:26 GMT+0800 (GMT+08:00) using the docdash theme.
    diff --git a/docs/plus.js.html b/docs/plus.js.html index d58a4fff..d1cf9640 100644 --- a/docs/plus.js.html +++ b/docs/plus.js.html @@ -41,7 +41,7 @@ -

    Home

    Github repo

    Modules

    +

    Home

    Github repo

    Modules

    @@ -102,7 +102,7 @@

    plus.js


    - Documentation generated by JSDoc 3.6.3 on Sun Jan 12 2020 02:15:44 GMT+0800 (GMT+08:00) using the docdash theme. + Documentation generated by JSDoc 3.6.3 on Mon Mar 30 2020 09:43:26 GMT+0800 (GMT+08:00) using the docdash theme.
    diff --git a/docs/replaceChar.js.html b/docs/replaceChar.js.html index af29cbbe..6a68d78b 100644 --- a/docs/replaceChar.js.html +++ b/docs/replaceChar.js.html @@ -41,7 +41,7 @@ -

    Home

    Github repo

    Modules

    +

    Home

    Github repo

    Modules

    @@ -150,7 +150,7 @@

    replaceChar.js


    - Documentation generated by JSDoc 3.6.3 on Sun Jan 12 2020 02:15:44 GMT+0800 (GMT+08:00) using the docdash theme. + Documentation generated by JSDoc 3.6.3 on Mon Mar 30 2020 09:43:26 GMT+0800 (GMT+08:00) using the docdash theme.
    diff --git a/docs/round.js.html b/docs/round.js.html index 5cf4c6f8..0eabdb9f 100644 --- a/docs/round.js.html +++ b/docs/round.js.html @@ -41,7 +41,7 @@ -

    Home

    Github repo

    Modules

    +

    Home

    Github repo

    Modules

    @@ -98,7 +98,7 @@

    round.js


    - Documentation generated by JSDoc 3.6.3 on Sun Jan 12 2020 02:15:44 GMT+0800 (GMT+08:00) using the docdash theme. + Documentation generated by JSDoc 3.6.3 on Mon Mar 30 2020 09:43:26 GMT+0800 (GMT+08:00) using the docdash theme.
    diff --git a/docs/times.js.html b/docs/times.js.html index f24543ed..6b0ee611 100644 --- a/docs/times.js.html +++ b/docs/times.js.html @@ -41,7 +41,7 @@ -

    Home

    Github repo

    Modules

    +

    Home

    Github repo

    Modules

    @@ -107,7 +107,7 @@

    times.js


    - Documentation generated by JSDoc 3.6.3 on Sun Jan 12 2020 02:15:44 GMT+0800 (GMT+08:00) using the docdash theme. + Documentation generated by JSDoc 3.6.3 on Mon Mar 30 2020 09:43:26 GMT+0800 (GMT+08:00) using the docdash theme.