z-schema 4.2.1 → 5.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +3 -2
- package/dist/ZSchema-browser-min.js +1 -1
- package/dist/ZSchema-browser-min.js.map +1 -1
- package/dist/ZSchema-browser-test.js +757 -566
- package/dist/ZSchema-browser.js +285 -126
- package/package.json +3 -3
- package/src/JsonValidation.js +3 -1
- package/src/Report.js +1 -1
- package/src/ZSchema.js +4 -4
package/dist/ZSchema-browser.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
(function(f){if(typeof exports==="object"&&typeof module!=="undefined"){module.exports=f()}else if(typeof define==="function"&&define.amd){define([],f)}else{var g;if(typeof window!=="undefined"){g=window}else if(typeof global!=="undefined"){g=global}else if(typeof self!=="undefined"){g=self}else{g=this}g.ZSchema = f()}})(function(){var define,module,exports;return (function(){function r(e,n,t){function o(i,f){if(!n[i]){if(!e[i]){var c="function"==typeof require&&require;if(!f&&c)return c(i,!0);if(u)return u(i,!0);var a=new Error("Cannot find module '"+i+"'");throw a.code="MODULE_NOT_FOUND",a}var p=n[i]={exports:{}};e[i][0].call(p.exports,function(r){var n=e[i][1][r];return o(n||r)},p,p.exports,r,e,n,t)}return n[i].exports}for(var u="function"==typeof require&&require,i=0;i<t.length;i++)o(t[i]);return o}return r})()({1:[function(require,module,exports){
|
|
2
|
-
(function (global){
|
|
2
|
+
(function (global){(function (){
|
|
3
3
|
/**
|
|
4
4
|
* lodash (Custom Build) <https://lodash.com/>
|
|
5
5
|
* Build: `lodash modularize exports="npm" -o ./`
|
|
@@ -932,9 +932,9 @@ function get(object, path, defaultValue) {
|
|
|
932
932
|
|
|
933
933
|
module.exports = get;
|
|
934
934
|
|
|
935
|
-
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
935
|
+
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
936
936
|
},{}],2:[function(require,module,exports){
|
|
937
|
-
(function (global){
|
|
937
|
+
(function (global){(function (){
|
|
938
938
|
/**
|
|
939
939
|
* Lodash (Custom Build) <https://lodash.com/>
|
|
940
940
|
* Build: `lodash modularize exports="npm" -o ./`
|
|
@@ -2784,7 +2784,7 @@ function stubFalse() {
|
|
|
2784
2784
|
|
|
2785
2785
|
module.exports = isEqual;
|
|
2786
2786
|
|
|
2787
|
-
}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
2787
|
+
}).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
|
|
2788
2788
|
},{}],3:[function(require,module,exports){
|
|
2789
2789
|
// shim for using process in browser
|
|
2790
2790
|
var process = module.exports = {};
|
|
@@ -2974,6 +2974,8 @@ process.umask = function() { return 0; };
|
|
|
2974
2974
|
},{}],4:[function(require,module,exports){
|
|
2975
2975
|
"use strict";
|
|
2976
2976
|
|
|
2977
|
+
function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
|
|
2978
|
+
|
|
2977
2979
|
Object.defineProperty(exports, "__esModule", {
|
|
2978
2980
|
value: true
|
|
2979
2981
|
});
|
|
@@ -3039,12 +3041,16 @@ var _isDecimal = _interopRequireDefault(require("./lib/isDecimal"));
|
|
|
3039
3041
|
|
|
3040
3042
|
var _isHexadecimal = _interopRequireDefault(require("./lib/isHexadecimal"));
|
|
3041
3043
|
|
|
3044
|
+
var _isOctal = _interopRequireDefault(require("./lib/isOctal"));
|
|
3045
|
+
|
|
3042
3046
|
var _isDivisibleBy = _interopRequireDefault(require("./lib/isDivisibleBy"));
|
|
3043
3047
|
|
|
3044
3048
|
var _isHexColor = _interopRequireDefault(require("./lib/isHexColor"));
|
|
3045
3049
|
|
|
3046
3050
|
var _isISRC = _interopRequireDefault(require("./lib/isISRC"));
|
|
3047
3051
|
|
|
3052
|
+
var _isBIC = _interopRequireDefault(require("./lib/isBIC"));
|
|
3053
|
+
|
|
3048
3054
|
var _isMD = _interopRequireDefault(require("./lib/isMD5"));
|
|
3049
3055
|
|
|
3050
3056
|
var _isHash = _interopRequireDefault(require("./lib/isHash"));
|
|
@@ -3125,11 +3131,15 @@ var _isWhitelisted = _interopRequireDefault(require("./lib/isWhitelisted"));
|
|
|
3125
3131
|
|
|
3126
3132
|
var _normalizeEmail = _interopRequireDefault(require("./lib/normalizeEmail"));
|
|
3127
3133
|
|
|
3128
|
-
|
|
3134
|
+
var _isSlug = _interopRequireDefault(require("./lib/isSlug"));
|
|
3135
|
+
|
|
3136
|
+
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
|
|
3137
|
+
|
|
3138
|
+
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
3129
3139
|
|
|
3130
3140
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
3131
3141
|
|
|
3132
|
-
var version = '
|
|
3142
|
+
var version = '12.2.0';
|
|
3133
3143
|
var validator = {
|
|
3134
3144
|
version: version,
|
|
3135
3145
|
toDate: _toDate.default,
|
|
@@ -3146,6 +3156,7 @@ var validator = {
|
|
|
3146
3156
|
isIPRange: _isIPRange.default,
|
|
3147
3157
|
isFQDN: _isFQDN.default,
|
|
3148
3158
|
isBoolean: _isBoolean.default,
|
|
3159
|
+
isBIC: _isBIC.default,
|
|
3149
3160
|
isAlpha: _isAlpha.default,
|
|
3150
3161
|
isAlphaLocales: _isAlpha.locales,
|
|
3151
3162
|
isAlphanumeric: _isAlphanumeric.default,
|
|
@@ -3165,6 +3176,7 @@ var validator = {
|
|
|
3165
3176
|
isFloatLocales: _isFloat.locales,
|
|
3166
3177
|
isDecimal: _isDecimal.default,
|
|
3167
3178
|
isHexadecimal: _isHexadecimal.default,
|
|
3179
|
+
isOctal: _isOctal.default,
|
|
3168
3180
|
isDivisibleBy: _isDivisibleBy.default,
|
|
3169
3181
|
isHexColor: _isHexColor.default,
|
|
3170
3182
|
isISRC: _isISRC.default,
|
|
@@ -3210,13 +3222,14 @@ var validator = {
|
|
|
3210
3222
|
blacklist: _blacklist.default,
|
|
3211
3223
|
isWhitelisted: _isWhitelisted.default,
|
|
3212
3224
|
normalizeEmail: _normalizeEmail.default,
|
|
3213
|
-
toString: toString
|
|
3225
|
+
toString: toString,
|
|
3226
|
+
isSlug: _isSlug.default
|
|
3214
3227
|
};
|
|
3215
3228
|
var _default = validator;
|
|
3216
3229
|
exports.default = _default;
|
|
3217
3230
|
module.exports = exports.default;
|
|
3218
3231
|
module.exports.default = exports.default;
|
|
3219
|
-
},{"./lib/blacklist":6,"./lib/contains":7,"./lib/equals":8,"./lib/escape":9,"./lib/isAfter":10,"./lib/isAlpha":11,"./lib/isAlphanumeric":12,"./lib/isAscii":13,"./lib/
|
|
3232
|
+
},{"./lib/blacklist":6,"./lib/contains":7,"./lib/equals":8,"./lib/escape":9,"./lib/isAfter":10,"./lib/isAlpha":11,"./lib/isAlphanumeric":12,"./lib/isAscii":13,"./lib/isBIC":14,"./lib/isBase32":15,"./lib/isBase64":16,"./lib/isBefore":17,"./lib/isBoolean":18,"./lib/isByteLength":19,"./lib/isCreditCard":20,"./lib/isCurrency":21,"./lib/isDataURI":22,"./lib/isDecimal":23,"./lib/isDivisibleBy":24,"./lib/isEmail":25,"./lib/isEmpty":26,"./lib/isFQDN":27,"./lib/isFloat":28,"./lib/isFullWidth":29,"./lib/isHalfWidth":30,"./lib/isHash":31,"./lib/isHexColor":32,"./lib/isHexadecimal":33,"./lib/isIP":34,"./lib/isIPRange":35,"./lib/isISBN":36,"./lib/isISIN":37,"./lib/isISO31661Alpha2":38,"./lib/isISO31661Alpha3":39,"./lib/isISO8601":40,"./lib/isISRC":41,"./lib/isISSN":42,"./lib/isIdentityCard":43,"./lib/isIn":44,"./lib/isInt":45,"./lib/isJSON":46,"./lib/isJWT":47,"./lib/isLatLong":48,"./lib/isLength":49,"./lib/isLowercase":50,"./lib/isMACAddress":51,"./lib/isMD5":52,"./lib/isMagnetURI":53,"./lib/isMimeType":54,"./lib/isMobilePhone":55,"./lib/isMongoId":56,"./lib/isMultibyte":57,"./lib/isNumeric":58,"./lib/isOctal":59,"./lib/isPort":60,"./lib/isPostalCode":61,"./lib/isRFC3339":62,"./lib/isSlug":63,"./lib/isSurrogatePair":64,"./lib/isURL":65,"./lib/isUUID":66,"./lib/isUppercase":67,"./lib/isVariableWidth":68,"./lib/isWhitelisted":69,"./lib/ltrim":70,"./lib/matches":71,"./lib/normalizeEmail":72,"./lib/rtrim":73,"./lib/stripLow":74,"./lib/toBoolean":75,"./lib/toDate":76,"./lib/toFloat":77,"./lib/toInt":78,"./lib/trim":79,"./lib/unescape":80,"./lib/whitelist":85}],5:[function(require,module,exports){
|
|
3220
3233
|
"use strict";
|
|
3221
3234
|
|
|
3222
3235
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -3238,7 +3251,7 @@ var alpha = {
|
|
|
3238
3251
|
'nn-NO': /^[A-ZÆØÅ]+$/i,
|
|
3239
3252
|
'hu-HU': /^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i,
|
|
3240
3253
|
'pl-PL': /^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i,
|
|
3241
|
-
'pt-PT': /^[A-
|
|
3254
|
+
'pt-PT': /^[A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,
|
|
3242
3255
|
'ru-RU': /^[А-ЯЁ]+$/i,
|
|
3243
3256
|
'sl-SI': /^[A-ZČĆĐŠŽ]+$/i,
|
|
3244
3257
|
'sk-SK': /^[A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,
|
|
@@ -3248,7 +3261,9 @@ var alpha = {
|
|
|
3248
3261
|
'tr-TR': /^[A-ZÇĞİıÖŞÜ]+$/i,
|
|
3249
3262
|
'uk-UA': /^[А-ЩЬЮЯЄIЇҐі]+$/i,
|
|
3250
3263
|
'ku-IQ': /^[ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,
|
|
3251
|
-
ar: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]
|
|
3264
|
+
ar: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,
|
|
3265
|
+
he: /^[א-ת]+$/,
|
|
3266
|
+
'fa-IR': /^['آابپتثجچهخدذرزژسشصضطظعغفقکگلمنوهی']+$/i
|
|
3252
3267
|
};
|
|
3253
3268
|
exports.alpha = alpha;
|
|
3254
3269
|
var alphanumeric = {
|
|
@@ -3266,7 +3281,7 @@ var alphanumeric = {
|
|
|
3266
3281
|
'nl-NL': /^[0-9A-ZÁÉËÏÓÖÜÚ]+$/i,
|
|
3267
3282
|
'nn-NO': /^[0-9A-ZÆØÅ]+$/i,
|
|
3268
3283
|
'pl-PL': /^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i,
|
|
3269
|
-
'pt-PT': /^[0-9A-
|
|
3284
|
+
'pt-PT': /^[0-9A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,
|
|
3270
3285
|
'ru-RU': /^[0-9А-ЯЁ]+$/i,
|
|
3271
3286
|
'sl-SI': /^[0-9A-ZČĆĐŠŽ]+$/i,
|
|
3272
3287
|
'sk-SK': /^[0-9A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,
|
|
@@ -3276,7 +3291,9 @@ var alphanumeric = {
|
|
|
3276
3291
|
'tr-TR': /^[0-9A-ZÇĞİıÖŞÜ]+$/i,
|
|
3277
3292
|
'uk-UA': /^[0-9А-ЩЬЮЯЄIЇҐі]+$/i,
|
|
3278
3293
|
'ku-IQ': /^[٠١٢٣٤٥٦٧٨٩0-9ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,
|
|
3279
|
-
ar: /^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]
|
|
3294
|
+
ar: /^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,
|
|
3295
|
+
he: /^[0-9א-ת]+$/,
|
|
3296
|
+
'fa-IR': /^['0-9آابپتثجچهخدذرزژسشصضطظعغفقکگلمنوهی۱۲۳۴۵۶۷۸۹۰']+$/i
|
|
3280
3297
|
};
|
|
3281
3298
|
exports.alphanumeric = alphanumeric;
|
|
3282
3299
|
var decimal = {
|
|
@@ -3345,7 +3362,7 @@ function blacklist(str, chars) {
|
|
|
3345
3362
|
|
|
3346
3363
|
module.exports = exports.default;
|
|
3347
3364
|
module.exports.default = exports.default;
|
|
3348
|
-
},{"./util/assertString":
|
|
3365
|
+
},{"./util/assertString":81}],7:[function(require,module,exports){
|
|
3349
3366
|
"use strict";
|
|
3350
3367
|
|
|
3351
3368
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -3366,7 +3383,7 @@ function contains(str, elem) {
|
|
|
3366
3383
|
|
|
3367
3384
|
module.exports = exports.default;
|
|
3368
3385
|
module.exports.default = exports.default;
|
|
3369
|
-
},{"./util/assertString":
|
|
3386
|
+
},{"./util/assertString":81,"./util/toString":84}],8:[function(require,module,exports){
|
|
3370
3387
|
"use strict";
|
|
3371
3388
|
|
|
3372
3389
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -3385,7 +3402,7 @@ function equals(str, comparison) {
|
|
|
3385
3402
|
|
|
3386
3403
|
module.exports = exports.default;
|
|
3387
3404
|
module.exports.default = exports.default;
|
|
3388
|
-
},{"./util/assertString":
|
|
3405
|
+
},{"./util/assertString":81}],9:[function(require,module,exports){
|
|
3389
3406
|
"use strict";
|
|
3390
3407
|
|
|
3391
3408
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -3404,7 +3421,7 @@ function escape(str) {
|
|
|
3404
3421
|
|
|
3405
3422
|
module.exports = exports.default;
|
|
3406
3423
|
module.exports.default = exports.default;
|
|
3407
|
-
},{"./util/assertString":
|
|
3424
|
+
},{"./util/assertString":81}],10:[function(require,module,exports){
|
|
3408
3425
|
"use strict";
|
|
3409
3426
|
|
|
3410
3427
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -3428,7 +3445,7 @@ function isAfter(str) {
|
|
|
3428
3445
|
|
|
3429
3446
|
module.exports = exports.default;
|
|
3430
3447
|
module.exports.default = exports.default;
|
|
3431
|
-
},{"./toDate":
|
|
3448
|
+
},{"./toDate":76,"./util/assertString":81}],11:[function(require,module,exports){
|
|
3432
3449
|
"use strict";
|
|
3433
3450
|
|
|
3434
3451
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -3456,7 +3473,7 @@ function isAlpha(str) {
|
|
|
3456
3473
|
|
|
3457
3474
|
var locales = Object.keys(_alpha.alpha);
|
|
3458
3475
|
exports.locales = locales;
|
|
3459
|
-
},{"./alpha":5,"./util/assertString":
|
|
3476
|
+
},{"./alpha":5,"./util/assertString":81}],12:[function(require,module,exports){
|
|
3460
3477
|
"use strict";
|
|
3461
3478
|
|
|
3462
3479
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -3484,7 +3501,7 @@ function isAlphanumeric(str) {
|
|
|
3484
3501
|
|
|
3485
3502
|
var locales = Object.keys(_alpha.alphanumeric);
|
|
3486
3503
|
exports.locales = locales;
|
|
3487
|
-
},{"./alpha":5,"./util/assertString":
|
|
3504
|
+
},{"./alpha":5,"./util/assertString":81}],13:[function(require,module,exports){
|
|
3488
3505
|
"use strict";
|
|
3489
3506
|
|
|
3490
3507
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -3507,7 +3524,28 @@ function isAscii(str) {
|
|
|
3507
3524
|
|
|
3508
3525
|
module.exports = exports.default;
|
|
3509
3526
|
module.exports.default = exports.default;
|
|
3510
|
-
},{"./util/assertString":
|
|
3527
|
+
},{"./util/assertString":81}],14:[function(require,module,exports){
|
|
3528
|
+
"use strict";
|
|
3529
|
+
|
|
3530
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3531
|
+
value: true
|
|
3532
|
+
});
|
|
3533
|
+
exports.default = isBIC;
|
|
3534
|
+
|
|
3535
|
+
var _assertString = _interopRequireDefault(require("./util/assertString"));
|
|
3536
|
+
|
|
3537
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
3538
|
+
|
|
3539
|
+
var isBICReg = /^[A-z]{4}[A-z]{2}\w{2}(\w{3})?$/;
|
|
3540
|
+
|
|
3541
|
+
function isBIC(str) {
|
|
3542
|
+
(0, _assertString.default)(str);
|
|
3543
|
+
return isBICReg.test(str);
|
|
3544
|
+
}
|
|
3545
|
+
|
|
3546
|
+
module.exports = exports.default;
|
|
3547
|
+
module.exports.default = exports.default;
|
|
3548
|
+
},{"./util/assertString":81}],15:[function(require,module,exports){
|
|
3511
3549
|
"use strict";
|
|
3512
3550
|
|
|
3513
3551
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -3534,7 +3572,7 @@ function isBase32(str) {
|
|
|
3534
3572
|
|
|
3535
3573
|
module.exports = exports.default;
|
|
3536
3574
|
module.exports.default = exports.default;
|
|
3537
|
-
},{"./util/assertString":
|
|
3575
|
+
},{"./util/assertString":81}],16:[function(require,module,exports){
|
|
3538
3576
|
"use strict";
|
|
3539
3577
|
|
|
3540
3578
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -3562,7 +3600,7 @@ function isBase64(str) {
|
|
|
3562
3600
|
|
|
3563
3601
|
module.exports = exports.default;
|
|
3564
3602
|
module.exports.default = exports.default;
|
|
3565
|
-
},{"./util/assertString":
|
|
3603
|
+
},{"./util/assertString":81}],17:[function(require,module,exports){
|
|
3566
3604
|
"use strict";
|
|
3567
3605
|
|
|
3568
3606
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -3586,7 +3624,7 @@ function isBefore(str) {
|
|
|
3586
3624
|
|
|
3587
3625
|
module.exports = exports.default;
|
|
3588
3626
|
module.exports.default = exports.default;
|
|
3589
|
-
},{"./toDate":
|
|
3627
|
+
},{"./toDate":76,"./util/assertString":81}],18:[function(require,module,exports){
|
|
3590
3628
|
"use strict";
|
|
3591
3629
|
|
|
3592
3630
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -3605,7 +3643,7 @@ function isBoolean(str) {
|
|
|
3605
3643
|
|
|
3606
3644
|
module.exports = exports.default;
|
|
3607
3645
|
module.exports.default = exports.default;
|
|
3608
|
-
},{"./util/assertString":
|
|
3646
|
+
},{"./util/assertString":81}],19:[function(require,module,exports){
|
|
3609
3647
|
"use strict";
|
|
3610
3648
|
|
|
3611
3649
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -3640,7 +3678,7 @@ function isByteLength(str, options) {
|
|
|
3640
3678
|
|
|
3641
3679
|
module.exports = exports.default;
|
|
3642
3680
|
module.exports.default = exports.default;
|
|
3643
|
-
},{"./util/assertString":
|
|
3681
|
+
},{"./util/assertString":81}],20:[function(require,module,exports){
|
|
3644
3682
|
"use strict";
|
|
3645
3683
|
|
|
3646
3684
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -3693,7 +3731,7 @@ function isCreditCard(str) {
|
|
|
3693
3731
|
|
|
3694
3732
|
module.exports = exports.default;
|
|
3695
3733
|
module.exports.default = exports.default;
|
|
3696
|
-
},{"./util/assertString":
|
|
3734
|
+
},{"./util/assertString":81}],21:[function(require,module,exports){
|
|
3697
3735
|
"use strict";
|
|
3698
3736
|
|
|
3699
3737
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -3783,7 +3821,7 @@ function isCurrency(str, options) {
|
|
|
3783
3821
|
|
|
3784
3822
|
module.exports = exports.default;
|
|
3785
3823
|
module.exports.default = exports.default;
|
|
3786
|
-
},{"./util/assertString":
|
|
3824
|
+
},{"./util/assertString":81,"./util/merge":83}],22:[function(require,module,exports){
|
|
3787
3825
|
"use strict";
|
|
3788
3826
|
|
|
3789
3827
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -3838,7 +3876,7 @@ function isDataURI(str) {
|
|
|
3838
3876
|
|
|
3839
3877
|
module.exports = exports.default;
|
|
3840
3878
|
module.exports.default = exports.default;
|
|
3841
|
-
},{"./util/assertString":
|
|
3879
|
+
},{"./util/assertString":81}],23:[function(require,module,exports){
|
|
3842
3880
|
"use strict";
|
|
3843
3881
|
|
|
3844
3882
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -3881,7 +3919,7 @@ function isDecimal(str, options) {
|
|
|
3881
3919
|
|
|
3882
3920
|
module.exports = exports.default;
|
|
3883
3921
|
module.exports.default = exports.default;
|
|
3884
|
-
},{"./alpha":5,"./util/assertString":
|
|
3922
|
+
},{"./alpha":5,"./util/assertString":81,"./util/includes":82,"./util/merge":83}],24:[function(require,module,exports){
|
|
3885
3923
|
"use strict";
|
|
3886
3924
|
|
|
3887
3925
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -3902,7 +3940,7 @@ function isDivisibleBy(str, num) {
|
|
|
3902
3940
|
|
|
3903
3941
|
module.exports = exports.default;
|
|
3904
3942
|
module.exports.default = exports.default;
|
|
3905
|
-
},{"./toFloat":
|
|
3943
|
+
},{"./toFloat":77,"./util/assertString":81}],25:[function(require,module,exports){
|
|
3906
3944
|
"use strict";
|
|
3907
3945
|
|
|
3908
3946
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -3926,7 +3964,7 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArra
|
|
|
3926
3964
|
|
|
3927
3965
|
function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
|
|
3928
3966
|
|
|
3929
|
-
function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
3967
|
+
function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
|
|
3930
3968
|
|
|
3931
3969
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
3932
3970
|
|
|
@@ -4100,7 +4138,7 @@ function isEmail(str, options) {
|
|
|
4100
4138
|
|
|
4101
4139
|
module.exports = exports.default;
|
|
4102
4140
|
module.exports.default = exports.default;
|
|
4103
|
-
},{"./isByteLength":
|
|
4141
|
+
},{"./isByteLength":19,"./isFQDN":27,"./isIP":34,"./util/assertString":81,"./util/merge":83}],26:[function(require,module,exports){
|
|
4104
4142
|
"use strict";
|
|
4105
4143
|
|
|
4106
4144
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4126,7 +4164,7 @@ function isEmpty(str, options) {
|
|
|
4126
4164
|
|
|
4127
4165
|
module.exports = exports.default;
|
|
4128
4166
|
module.exports.default = exports.default;
|
|
4129
|
-
},{"./util/assertString":
|
|
4167
|
+
},{"./util/assertString":81,"./util/merge":83}],27:[function(require,module,exports){
|
|
4130
4168
|
"use strict";
|
|
4131
4169
|
|
|
4132
4170
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4202,7 +4240,7 @@ function isFQDN(str, options) {
|
|
|
4202
4240
|
|
|
4203
4241
|
module.exports = exports.default;
|
|
4204
4242
|
module.exports.default = exports.default;
|
|
4205
|
-
},{"./util/assertString":
|
|
4243
|
+
},{"./util/assertString":81,"./util/merge":83}],28:[function(require,module,exports){
|
|
4206
4244
|
"use strict";
|
|
4207
4245
|
|
|
4208
4246
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4232,7 +4270,7 @@ function isFloat(str, options) {
|
|
|
4232
4270
|
|
|
4233
4271
|
var locales = Object.keys(_alpha.decimal);
|
|
4234
4272
|
exports.locales = locales;
|
|
4235
|
-
},{"./alpha":5,"./util/assertString":
|
|
4273
|
+
},{"./alpha":5,"./util/assertString":81}],29:[function(require,module,exports){
|
|
4236
4274
|
"use strict";
|
|
4237
4275
|
|
|
4238
4276
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4252,7 +4290,7 @@ function isFullWidth(str) {
|
|
|
4252
4290
|
(0, _assertString.default)(str);
|
|
4253
4291
|
return fullWidth.test(str);
|
|
4254
4292
|
}
|
|
4255
|
-
},{"./util/assertString":
|
|
4293
|
+
},{"./util/assertString":81}],30:[function(require,module,exports){
|
|
4256
4294
|
"use strict";
|
|
4257
4295
|
|
|
4258
4296
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4272,7 +4310,7 @@ function isHalfWidth(str) {
|
|
|
4272
4310
|
(0, _assertString.default)(str);
|
|
4273
4311
|
return halfWidth.test(str);
|
|
4274
4312
|
}
|
|
4275
|
-
},{"./util/assertString":
|
|
4313
|
+
},{"./util/assertString":81}],31:[function(require,module,exports){
|
|
4276
4314
|
"use strict";
|
|
4277
4315
|
|
|
4278
4316
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4302,13 +4340,13 @@ var lengths = {
|
|
|
4302
4340
|
|
|
4303
4341
|
function isHash(str, algorithm) {
|
|
4304
4342
|
(0, _assertString.default)(str);
|
|
4305
|
-
var hash = new RegExp("^[a-
|
|
4343
|
+
var hash = new RegExp("^[a-fA-F0-9]{".concat(lengths[algorithm], "}$"));
|
|
4306
4344
|
return hash.test(str);
|
|
4307
4345
|
}
|
|
4308
4346
|
|
|
4309
4347
|
module.exports = exports.default;
|
|
4310
4348
|
module.exports.default = exports.default;
|
|
4311
|
-
},{"./util/assertString":
|
|
4349
|
+
},{"./util/assertString":81}],32:[function(require,module,exports){
|
|
4312
4350
|
"use strict";
|
|
4313
4351
|
|
|
4314
4352
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4320,7 +4358,7 @@ var _assertString = _interopRequireDefault(require("./util/assertString"));
|
|
|
4320
4358
|
|
|
4321
4359
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
4322
4360
|
|
|
4323
|
-
var hexcolor = /^#?([0-9A-F]{3}|[0-9A-F]{6})$/i;
|
|
4361
|
+
var hexcolor = /^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;
|
|
4324
4362
|
|
|
4325
4363
|
function isHexColor(str) {
|
|
4326
4364
|
(0, _assertString.default)(str);
|
|
@@ -4329,7 +4367,7 @@ function isHexColor(str) {
|
|
|
4329
4367
|
|
|
4330
4368
|
module.exports = exports.default;
|
|
4331
4369
|
module.exports.default = exports.default;
|
|
4332
|
-
},{"./util/assertString":
|
|
4370
|
+
},{"./util/assertString":81}],33:[function(require,module,exports){
|
|
4333
4371
|
"use strict";
|
|
4334
4372
|
|
|
4335
4373
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4341,7 +4379,7 @@ var _assertString = _interopRequireDefault(require("./util/assertString"));
|
|
|
4341
4379
|
|
|
4342
4380
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
4343
4381
|
|
|
4344
|
-
var hexadecimal = /^[0-9A-F]+$/i;
|
|
4382
|
+
var hexadecimal = /^(0x|0h)?[0-9A-F]+$/i;
|
|
4345
4383
|
|
|
4346
4384
|
function isHexadecimal(str) {
|
|
4347
4385
|
(0, _assertString.default)(str);
|
|
@@ -4350,7 +4388,7 @@ function isHexadecimal(str) {
|
|
|
4350
4388
|
|
|
4351
4389
|
module.exports = exports.default;
|
|
4352
4390
|
module.exports.default = exports.default;
|
|
4353
|
-
},{"./util/assertString":
|
|
4391
|
+
},{"./util/assertString":81}],34:[function(require,module,exports){
|
|
4354
4392
|
"use strict";
|
|
4355
4393
|
|
|
4356
4394
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4362,6 +4400,35 @@ var _assertString = _interopRequireDefault(require("./util/assertString"));
|
|
|
4362
4400
|
|
|
4363
4401
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
4364
4402
|
|
|
4403
|
+
/**
|
|
4404
|
+
11.3. Examples
|
|
4405
|
+
|
|
4406
|
+
The following addresses
|
|
4407
|
+
|
|
4408
|
+
fe80::1234 (on the 1st link of the node)
|
|
4409
|
+
ff02::5678 (on the 5th link of the node)
|
|
4410
|
+
ff08::9abc (on the 10th organization of the node)
|
|
4411
|
+
|
|
4412
|
+
would be represented as follows:
|
|
4413
|
+
|
|
4414
|
+
fe80::1234%1
|
|
4415
|
+
ff02::5678%5
|
|
4416
|
+
ff08::9abc%10
|
|
4417
|
+
|
|
4418
|
+
(Here we assume a natural translation from a zone index to the
|
|
4419
|
+
<zone_id> part, where the Nth zone of any scope is translated into
|
|
4420
|
+
"N".)
|
|
4421
|
+
|
|
4422
|
+
If we use interface names as <zone_id>, those addresses could also be
|
|
4423
|
+
represented as follows:
|
|
4424
|
+
|
|
4425
|
+
fe80::1234%ne0
|
|
4426
|
+
ff02::5678%pvc1.3
|
|
4427
|
+
ff08::9abc%interface10
|
|
4428
|
+
|
|
4429
|
+
where the interface "ne0" belongs to the 1st link, "pvc1.3" belongs
|
|
4430
|
+
to the 5th link, and "interface10" belongs to the 10th organization.
|
|
4431
|
+
* * */
|
|
4365
4432
|
var ipv4Maybe = /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/;
|
|
4366
4433
|
var ipv6Block = /^[0-9A-F]{1,4}$/i;
|
|
4367
4434
|
|
|
@@ -4382,7 +4449,29 @@ function isIP(str) {
|
|
|
4382
4449
|
});
|
|
4383
4450
|
return parts[3] <= 255;
|
|
4384
4451
|
} else if (version === '6') {
|
|
4385
|
-
var
|
|
4452
|
+
var addressAndZone = [str]; // ipv6 addresses could have scoped architecture
|
|
4453
|
+
// according to https://tools.ietf.org/html/rfc4007#section-11
|
|
4454
|
+
|
|
4455
|
+
if (str.includes('%')) {
|
|
4456
|
+
addressAndZone = str.split('%');
|
|
4457
|
+
|
|
4458
|
+
if (addressAndZone.length !== 2) {
|
|
4459
|
+
// it must be just two parts
|
|
4460
|
+
return false;
|
|
4461
|
+
}
|
|
4462
|
+
|
|
4463
|
+
if (!addressAndZone[0].includes(':')) {
|
|
4464
|
+
// the first part must be the address
|
|
4465
|
+
return false;
|
|
4466
|
+
}
|
|
4467
|
+
|
|
4468
|
+
if (addressAndZone[1] === '') {
|
|
4469
|
+
// the second part must not be empty
|
|
4470
|
+
return false;
|
|
4471
|
+
}
|
|
4472
|
+
}
|
|
4473
|
+
|
|
4474
|
+
var blocks = addressAndZone[0].split(':');
|
|
4386
4475
|
var foundOmissionBlock = false; // marker to indicate ::
|
|
4387
4476
|
// At least some OS accept the last 32 bits of an IPv6 address
|
|
4388
4477
|
// (i.e. 2 of the blocks) in IPv4 notation, and RFC 3493 says
|
|
@@ -4437,7 +4526,7 @@ function isIP(str) {
|
|
|
4437
4526
|
|
|
4438
4527
|
module.exports = exports.default;
|
|
4439
4528
|
module.exports.default = exports.default;
|
|
4440
|
-
},{"./util/assertString":
|
|
4529
|
+
},{"./util/assertString":81}],35:[function(require,module,exports){
|
|
4441
4530
|
"use strict";
|
|
4442
4531
|
|
|
4443
4532
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4475,7 +4564,7 @@ function isIPRange(str) {
|
|
|
4475
4564
|
|
|
4476
4565
|
module.exports = exports.default;
|
|
4477
4566
|
module.exports.default = exports.default;
|
|
4478
|
-
},{"./isIP":
|
|
4567
|
+
},{"./isIP":34,"./util/assertString":81}],36:[function(require,module,exports){
|
|
4479
4568
|
"use strict";
|
|
4480
4569
|
|
|
4481
4570
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4541,7 +4630,7 @@ function isISBN(str) {
|
|
|
4541
4630
|
|
|
4542
4631
|
module.exports = exports.default;
|
|
4543
4632
|
module.exports.default = exports.default;
|
|
4544
|
-
},{"./util/assertString":
|
|
4633
|
+
},{"./util/assertString":81}],37:[function(require,module,exports){
|
|
4545
4634
|
"use strict";
|
|
4546
4635
|
|
|
4547
4636
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4594,7 +4683,7 @@ function isISIN(str) {
|
|
|
4594
4683
|
|
|
4595
4684
|
module.exports = exports.default;
|
|
4596
4685
|
module.exports.default = exports.default;
|
|
4597
|
-
},{"./util/assertString":
|
|
4686
|
+
},{"./util/assertString":81}],38:[function(require,module,exports){
|
|
4598
4687
|
"use strict";
|
|
4599
4688
|
|
|
4600
4689
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4618,7 +4707,7 @@ function isISO31661Alpha2(str) {
|
|
|
4618
4707
|
|
|
4619
4708
|
module.exports = exports.default;
|
|
4620
4709
|
module.exports.default = exports.default;
|
|
4621
|
-
},{"./util/assertString":
|
|
4710
|
+
},{"./util/assertString":81,"./util/includes":82}],39:[function(require,module,exports){
|
|
4622
4711
|
"use strict";
|
|
4623
4712
|
|
|
4624
4713
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4642,7 +4731,7 @@ function isISO31661Alpha3(str) {
|
|
|
4642
4731
|
|
|
4643
4732
|
module.exports = exports.default;
|
|
4644
4733
|
module.exports.default = exports.default;
|
|
4645
|
-
},{"./util/assertString":
|
|
4734
|
+
},{"./util/assertString":81,"./util/includes":82}],40:[function(require,module,exports){
|
|
4646
4735
|
"use strict";
|
|
4647
4736
|
|
|
4648
4737
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4700,7 +4789,7 @@ function isISO8601(str, options) {
|
|
|
4700
4789
|
|
|
4701
4790
|
module.exports = exports.default;
|
|
4702
4791
|
module.exports.default = exports.default;
|
|
4703
|
-
},{"./util/assertString":
|
|
4792
|
+
},{"./util/assertString":81}],41:[function(require,module,exports){
|
|
4704
4793
|
"use strict";
|
|
4705
4794
|
|
|
4706
4795
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4722,7 +4811,7 @@ function isISRC(str) {
|
|
|
4722
4811
|
|
|
4723
4812
|
module.exports = exports.default;
|
|
4724
4813
|
module.exports.default = exports.default;
|
|
4725
|
-
},{"./util/assertString":
|
|
4814
|
+
},{"./util/assertString":81}],42:[function(require,module,exports){
|
|
4726
4815
|
"use strict";
|
|
4727
4816
|
|
|
4728
4817
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4760,7 +4849,7 @@ function isISSN(str) {
|
|
|
4760
4849
|
|
|
4761
4850
|
module.exports = exports.default;
|
|
4762
4851
|
module.exports.default = exports.default;
|
|
4763
|
-
},{"./util/assertString":
|
|
4852
|
+
},{"./util/assertString":81}],43:[function(require,module,exports){
|
|
4764
4853
|
"use strict";
|
|
4765
4854
|
|
|
4766
4855
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4888,7 +4977,7 @@ function isIdentityCard(str, locale) {
|
|
|
4888
4977
|
|
|
4889
4978
|
module.exports = exports.default;
|
|
4890
4979
|
module.exports.default = exports.default;
|
|
4891
|
-
},{"./util/assertString":
|
|
4980
|
+
},{"./util/assertString":81}],44:[function(require,module,exports){
|
|
4892
4981
|
"use strict";
|
|
4893
4982
|
|
|
4894
4983
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4931,7 +5020,7 @@ function isIn(str, options) {
|
|
|
4931
5020
|
|
|
4932
5021
|
module.exports = exports.default;
|
|
4933
5022
|
module.exports.default = exports.default;
|
|
4934
|
-
},{"./util/assertString":
|
|
5023
|
+
},{"./util/assertString":81,"./util/toString":84}],45:[function(require,module,exports){
|
|
4935
5024
|
"use strict";
|
|
4936
5025
|
|
|
4937
5026
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4962,7 +5051,7 @@ function isInt(str, options) {
|
|
|
4962
5051
|
|
|
4963
5052
|
module.exports = exports.default;
|
|
4964
5053
|
module.exports.default = exports.default;
|
|
4965
|
-
},{"./util/assertString":
|
|
5054
|
+
},{"./util/assertString":81}],46:[function(require,module,exports){
|
|
4966
5055
|
"use strict";
|
|
4967
5056
|
|
|
4968
5057
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -4991,7 +5080,7 @@ function isJSON(str) {
|
|
|
4991
5080
|
|
|
4992
5081
|
module.exports = exports.default;
|
|
4993
5082
|
module.exports.default = exports.default;
|
|
4994
|
-
},{"./util/assertString":
|
|
5083
|
+
},{"./util/assertString":81}],47:[function(require,module,exports){
|
|
4995
5084
|
"use strict";
|
|
4996
5085
|
|
|
4997
5086
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5012,7 +5101,7 @@ function isJWT(str) {
|
|
|
5012
5101
|
|
|
5013
5102
|
module.exports = exports.default;
|
|
5014
5103
|
module.exports.default = exports.default;
|
|
5015
|
-
},{"./util/assertString":
|
|
5104
|
+
},{"./util/assertString":81}],48:[function(require,module,exports){
|
|
5016
5105
|
"use strict";
|
|
5017
5106
|
|
|
5018
5107
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5031,12 +5120,13 @@ function _default(str) {
|
|
|
5031
5120
|
(0, _assertString.default)(str);
|
|
5032
5121
|
if (!str.includes(',')) return false;
|
|
5033
5122
|
var pair = str.split(',');
|
|
5123
|
+
if (pair[0].startsWith('(') && !pair[1].endsWith(')') || pair[1].endsWith(')') && !pair[0].startsWith('(')) return false;
|
|
5034
5124
|
return lat.test(pair[0]) && long.test(pair[1]);
|
|
5035
5125
|
}
|
|
5036
5126
|
|
|
5037
5127
|
module.exports = exports.default;
|
|
5038
5128
|
module.exports.default = exports.default;
|
|
5039
|
-
},{"./util/assertString":
|
|
5129
|
+
},{"./util/assertString":81}],49:[function(require,module,exports){
|
|
5040
5130
|
"use strict";
|
|
5041
5131
|
|
|
5042
5132
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5061,7 +5151,7 @@ function isLength(str, options) {
|
|
|
5061
5151
|
max = options.max;
|
|
5062
5152
|
} else {
|
|
5063
5153
|
// backwards compatibility: isLength(str, min [, max])
|
|
5064
|
-
min = arguments[1];
|
|
5154
|
+
min = arguments[1] || 0;
|
|
5065
5155
|
max = arguments[2];
|
|
5066
5156
|
}
|
|
5067
5157
|
|
|
@@ -5072,7 +5162,7 @@ function isLength(str, options) {
|
|
|
5072
5162
|
|
|
5073
5163
|
module.exports = exports.default;
|
|
5074
5164
|
module.exports.default = exports.default;
|
|
5075
|
-
},{"./util/assertString":
|
|
5165
|
+
},{"./util/assertString":81}],50:[function(require,module,exports){
|
|
5076
5166
|
"use strict";
|
|
5077
5167
|
|
|
5078
5168
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5091,7 +5181,7 @@ function isLowercase(str) {
|
|
|
5091
5181
|
|
|
5092
5182
|
module.exports = exports.default;
|
|
5093
5183
|
module.exports.default = exports.default;
|
|
5094
|
-
},{"./util/assertString":
|
|
5184
|
+
},{"./util/assertString":81}],51:[function(require,module,exports){
|
|
5095
5185
|
"use strict";
|
|
5096
5186
|
|
|
5097
5187
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5105,6 +5195,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
5105
5195
|
|
|
5106
5196
|
var macAddress = /^([0-9a-fA-F][0-9a-fA-F]:){5}([0-9a-fA-F][0-9a-fA-F])$/;
|
|
5107
5197
|
var macAddressNoColons = /^([0-9a-fA-F]){12}$/;
|
|
5198
|
+
var macAddressWithHyphen = /^([0-9a-fA-F][0-9a-fA-F]-){5}([0-9a-fA-F][0-9a-fA-F])$/;
|
|
5199
|
+
var macAddressWithSpaces = /^([0-9a-fA-F][0-9a-fA-F]\s){5}([0-9a-fA-F][0-9a-fA-F])$/;
|
|
5108
5200
|
|
|
5109
5201
|
function isMACAddress(str, options) {
|
|
5110
5202
|
(0, _assertString.default)(str);
|
|
@@ -5113,12 +5205,12 @@ function isMACAddress(str, options) {
|
|
|
5113
5205
|
return macAddressNoColons.test(str);
|
|
5114
5206
|
}
|
|
5115
5207
|
|
|
5116
|
-
return macAddress.test(str);
|
|
5208
|
+
return macAddress.test(str) || macAddressWithHyphen.test(str) || macAddressWithSpaces.test(str);
|
|
5117
5209
|
}
|
|
5118
5210
|
|
|
5119
5211
|
module.exports = exports.default;
|
|
5120
5212
|
module.exports.default = exports.default;
|
|
5121
|
-
},{"./util/assertString":
|
|
5213
|
+
},{"./util/assertString":81}],52:[function(require,module,exports){
|
|
5122
5214
|
"use strict";
|
|
5123
5215
|
|
|
5124
5216
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5139,7 +5231,7 @@ function isMD5(str) {
|
|
|
5139
5231
|
|
|
5140
5232
|
module.exports = exports.default;
|
|
5141
5233
|
module.exports.default = exports.default;
|
|
5142
|
-
},{"./util/assertString":
|
|
5234
|
+
},{"./util/assertString":81}],53:[function(require,module,exports){
|
|
5143
5235
|
"use strict";
|
|
5144
5236
|
|
|
5145
5237
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5160,7 +5252,7 @@ function isMagnetURI(url) {
|
|
|
5160
5252
|
|
|
5161
5253
|
module.exports = exports.default;
|
|
5162
5254
|
module.exports.default = exports.default;
|
|
5163
|
-
},{"./util/assertString":
|
|
5255
|
+
},{"./util/assertString":81}],54:[function(require,module,exports){
|
|
5164
5256
|
"use strict";
|
|
5165
5257
|
|
|
5166
5258
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5212,7 +5304,7 @@ function isMimeType(str) {
|
|
|
5212
5304
|
|
|
5213
5305
|
module.exports = exports.default;
|
|
5214
5306
|
module.exports.default = exports.default;
|
|
5215
|
-
},{"./util/assertString":
|
|
5307
|
+
},{"./util/assertString":81}],55:[function(require,module,exports){
|
|
5216
5308
|
"use strict";
|
|
5217
5309
|
|
|
5218
5310
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5227,6 +5319,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
5227
5319
|
|
|
5228
5320
|
/* eslint-disable max-len */
|
|
5229
5321
|
var phones = {
|
|
5322
|
+
'am-AM': /^(\+?374|0)((10|[9|7][0-9])\d{6}$|[2-4]\d{7}$)/,
|
|
5230
5323
|
'ar-AE': /^((\+?971)|0)?5[024568]\d{7}$/,
|
|
5231
5324
|
'ar-BH': /^(\+?973)?(3|6)\d{7}$/,
|
|
5232
5325
|
'ar-DZ': /^(\+?213|0)(5|6|7)\d{8}$/,
|
|
@@ -5239,15 +5332,18 @@ var phones = {
|
|
|
5239
5332
|
'ar-TN': /^(\+?216)?[2459]\d{7}$/,
|
|
5240
5333
|
'be-BY': /^(\+?375)?(24|25|29|33|44)\d{7}$/,
|
|
5241
5334
|
'bg-BG': /^(\+?359|0)?8[789]\d{7}$/,
|
|
5242
|
-
'bn-BD': /^(\+?880|0)1[
|
|
5335
|
+
'bn-BD': /^(\+?880|0)1[13456789][0-9]{8}$/,
|
|
5243
5336
|
'cs-CZ': /^(\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,
|
|
5244
5337
|
'da-DK': /^(\+?45)?\s?\d{2}\s?\d{2}\s?\d{2}\s?\d{2}$/,
|
|
5245
5338
|
'de-DE': /^(\+49)?0?1(5[0-25-9]\d|6([23]|0\d?)|7([0-57-9]|6\d))\d{7}$/,
|
|
5339
|
+
'de-AT': /^(\+43|0)\d{1,4}\d{3,12}$/,
|
|
5246
5340
|
'el-GR': /^(\+?30|0)?(69\d{8})$/,
|
|
5247
5341
|
'en-AU': /^(\+?61|0)4\d{8}$/,
|
|
5248
5342
|
'en-GB': /^(\+?44|0)7\d{9}$/,
|
|
5343
|
+
'en-GG': /^(\+?44|0)1481\d{6}$/,
|
|
5249
5344
|
'en-GH': /^(\+233|0)(20|50|24|54|27|57|26|56|23|28)\d{7}$/,
|
|
5250
|
-
'en-HK': /^(\+?852
|
|
5345
|
+
'en-HK': /^(\+?852[-\s]?)?[456789]\d{3}[-\s]?\d{4}$/,
|
|
5346
|
+
'en-MO': /^(\+?853[-\s]?)?[6]\d{3}[-\s]?\d{4}$/,
|
|
5251
5347
|
'en-IE': /^(\+?353|0)8[356789]\d{7}$/,
|
|
5252
5348
|
'en-IN': /^(\+?91|0)?[6789]\d{9}$/,
|
|
5253
5349
|
'en-KE': /^(\+?254|0)(7|1)\d{8}$/,
|
|
@@ -5264,8 +5360,10 @@ var phones = {
|
|
|
5264
5360
|
'en-ZA': /^(\+?27|0)\d{9}$/,
|
|
5265
5361
|
'en-ZM': /^(\+?26)?09[567]\d{7}$/,
|
|
5266
5362
|
'es-CL': /^(\+?56|0)[2-9]\d{1}\d{7}$/,
|
|
5363
|
+
'es-EC': /^(\+?593|0)([2-7]|9[2-9])\d{7}$/,
|
|
5267
5364
|
'es-ES': /^(\+?34)?(6\d{1}|7[1234])\d{7}$/,
|
|
5268
5365
|
'es-MX': /^(\+?52)?(1|01)?\d{10,11}$/,
|
|
5366
|
+
'es-PA': /^(\+?507)\d{7,8}$/,
|
|
5269
5367
|
'es-PY': /^(\+?595|0)9[9876]\d{7}$/,
|
|
5270
5368
|
'es-UY': /^(\+598|0)9[1-9][\d]{6}$/,
|
|
5271
5369
|
'et-EE': /^(\+?372)?\s?(5|8[1-4])\s?([0-9]\s?){6,7}$/,
|
|
@@ -5274,17 +5372,22 @@ var phones = {
|
|
|
5274
5372
|
'fj-FJ': /^(\+?679)?\s?\d{3}\s?\d{4}$/,
|
|
5275
5373
|
'fo-FO': /^(\+?298)?\s?\d{2}\s?\d{2}\s?\d{2}$/,
|
|
5276
5374
|
'fr-FR': /^(\+?33|0)[67]\d{8}$/,
|
|
5375
|
+
'fr-GF': /^(\+?594|0|00594)[67]\d{8}$/,
|
|
5376
|
+
'fr-GP': /^(\+?590|0|00590)[67]\d{8}$/,
|
|
5377
|
+
'fr-MQ': /^(\+?596|0|00596)[67]\d{8}$/,
|
|
5378
|
+
'fr-RE': /^(\+?262|0|00262)[67]\d{8}$/,
|
|
5277
5379
|
'he-IL': /^(\+972|0)([23489]|5[012345689]|77)[1-9]\d{6}$/,
|
|
5278
5380
|
'hu-HU': /^(\+?36)(20|30|70)\d{7}$/,
|
|
5279
5381
|
'id-ID': /^(\+?62|0)8(1[123456789]|2[1238]|3[1238]|5[12356789]|7[78]|9[56789]|8[123456789])([\s?|\d]{5,11})$/,
|
|
5280
5382
|
'it-IT': /^(\+?39)?\s?3\d{2} ?\d{6,7}$/,
|
|
5281
|
-
'ja-JP': /^(
|
|
5383
|
+
'ja-JP': /^(\+81[ \-]?(\(0\))?|0)[6789]0[ \-]?\d{4}[ \-]?\d{4}$/,
|
|
5282
5384
|
'kk-KZ': /^(\+?7|8)?7\d{9}$/,
|
|
5283
5385
|
'kl-GL': /^(\+?299)?\s?\d{2}\s?\d{2}\s?\d{2}$/,
|
|
5284
5386
|
'ko-KR': /^((\+?82)[ \-]?)?0?1([0|1|6|7|8|9]{1})[ \-]?\d{3,4}[ \-]?\d{4}$/,
|
|
5285
5387
|
'lt-LT': /^(\+370|8)\d{8}$/,
|
|
5286
5388
|
'ms-MY': /^(\+?6?01){1}(([0145]{1}(\-|\s)?\d{7,8})|([236789]{1}(\s|\-)?\d{7}))$/,
|
|
5287
5389
|
'nb-NO': /^(\+?47)?[49]\d{7}$/,
|
|
5390
|
+
'ne-NP': /^(\+?977)?9[78]\d{8}$/,
|
|
5288
5391
|
'nl-BE': /^(\+?32|0)4?\d{8}$/,
|
|
5289
5392
|
'nl-NL': /^(\+?31|0)6?\d{8}$/,
|
|
5290
5393
|
'nn-NO': /^(\+?47)?[49]\d{7}$/,
|
|
@@ -5301,7 +5404,7 @@ var phones = {
|
|
|
5301
5404
|
'tr-TR': /^(\+?90|0)?5\d{9}$/,
|
|
5302
5405
|
'uk-UA': /^(\+?38|8)?0\d{9}$/,
|
|
5303
5406
|
'vi-VN': /^(\+?84|0)((3([2-9]))|(5([2689]))|(7([0|6-9]))|(8([1-6|89]))|(9([0-9])))([0-9]{7})$/,
|
|
5304
|
-
'zh-CN': /^((\+|00)86)?1([358][0-9]|4[579]|6[67]|7[
|
|
5407
|
+
'zh-CN': /^((\+|00)86)?1([358][0-9]|4[579]|6[67]|7[01235678]|9[189])[0-9]{8}$/,
|
|
5305
5408
|
'zh-TW': /^(\+?886\-?|0)?9\d{8}$/
|
|
5306
5409
|
};
|
|
5307
5410
|
/* eslint-enable max-len */
|
|
@@ -5310,6 +5413,7 @@ var phones = {
|
|
|
5310
5413
|
phones['en-CA'] = phones['en-US'];
|
|
5311
5414
|
phones['fr-BE'] = phones['nl-BE'];
|
|
5312
5415
|
phones['zh-HK'] = phones['en-HK'];
|
|
5416
|
+
phones['zh-MO'] = phones['en-MO'];
|
|
5313
5417
|
|
|
5314
5418
|
function isMobilePhone(str, locale, options) {
|
|
5315
5419
|
(0, _assertString.default)(str);
|
|
@@ -5354,7 +5458,7 @@ function isMobilePhone(str, locale, options) {
|
|
|
5354
5458
|
|
|
5355
5459
|
var locales = Object.keys(phones);
|
|
5356
5460
|
exports.locales = locales;
|
|
5357
|
-
},{"./util/assertString":
|
|
5461
|
+
},{"./util/assertString":81}],56:[function(require,module,exports){
|
|
5358
5462
|
"use strict";
|
|
5359
5463
|
|
|
5360
5464
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5375,7 +5479,7 @@ function isMongoId(str) {
|
|
|
5375
5479
|
|
|
5376
5480
|
module.exports = exports.default;
|
|
5377
5481
|
module.exports.default = exports.default;
|
|
5378
|
-
},{"./isHexadecimal":
|
|
5482
|
+
},{"./isHexadecimal":33,"./util/assertString":81}],57:[function(require,module,exports){
|
|
5379
5483
|
"use strict";
|
|
5380
5484
|
|
|
5381
5485
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5398,7 +5502,7 @@ function isMultibyte(str) {
|
|
|
5398
5502
|
|
|
5399
5503
|
module.exports = exports.default;
|
|
5400
5504
|
module.exports.default = exports.default;
|
|
5401
|
-
},{"./util/assertString":
|
|
5505
|
+
},{"./util/assertString":81}],58:[function(require,module,exports){
|
|
5402
5506
|
"use strict";
|
|
5403
5507
|
|
|
5404
5508
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5425,7 +5529,28 @@ function isNumeric(str, options) {
|
|
|
5425
5529
|
|
|
5426
5530
|
module.exports = exports.default;
|
|
5427
5531
|
module.exports.default = exports.default;
|
|
5428
|
-
},{"./util/assertString":
|
|
5532
|
+
},{"./util/assertString":81}],59:[function(require,module,exports){
|
|
5533
|
+
"use strict";
|
|
5534
|
+
|
|
5535
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5536
|
+
value: true
|
|
5537
|
+
});
|
|
5538
|
+
exports.default = isOctal;
|
|
5539
|
+
|
|
5540
|
+
var _assertString = _interopRequireDefault(require("./util/assertString"));
|
|
5541
|
+
|
|
5542
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
5543
|
+
|
|
5544
|
+
var octal = /^(0o)?[0-7]+$/i;
|
|
5545
|
+
|
|
5546
|
+
function isOctal(str) {
|
|
5547
|
+
(0, _assertString.default)(str);
|
|
5548
|
+
return octal.test(str);
|
|
5549
|
+
}
|
|
5550
|
+
|
|
5551
|
+
module.exports = exports.default;
|
|
5552
|
+
module.exports.default = exports.default;
|
|
5553
|
+
},{"./util/assertString":81}],60:[function(require,module,exports){
|
|
5429
5554
|
"use strict";
|
|
5430
5555
|
|
|
5431
5556
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5446,7 +5571,7 @@ function isPort(str) {
|
|
|
5446
5571
|
|
|
5447
5572
|
module.exports = exports.default;
|
|
5448
5573
|
module.exports.default = exports.default;
|
|
5449
|
-
},{"./isInt":
|
|
5574
|
+
},{"./isInt":45}],61:[function(require,module,exports){
|
|
5450
5575
|
"use strict";
|
|
5451
5576
|
|
|
5452
5577
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5486,8 +5611,9 @@ var patterns = {
|
|
|
5486
5611
|
HR: /^([1-5]\d{4}$)/,
|
|
5487
5612
|
HU: fourDigit,
|
|
5488
5613
|
ID: fiveDigit,
|
|
5614
|
+
IE: /^(?!.*(?:o))[A-z]\d[\dw]\s\w{4}$/i,
|
|
5489
5615
|
IL: fiveDigit,
|
|
5490
|
-
IN:
|
|
5616
|
+
IN: /^((?!10|29|35|54|55|65|66|86|87|88|89)[1-9][0-9]{5})$/,
|
|
5491
5617
|
IS: threeDigit,
|
|
5492
5618
|
IT: fiveDigit,
|
|
5493
5619
|
JP: /^\d{3}\-\d{4}$/,
|
|
@@ -5507,7 +5633,7 @@ var patterns = {
|
|
|
5507
5633
|
RO: sixDigit,
|
|
5508
5634
|
RU: sixDigit,
|
|
5509
5635
|
SA: fiveDigit,
|
|
5510
|
-
SE:
|
|
5636
|
+
SE: /^[1-9]\d{2}\s?\d{2}$/,
|
|
5511
5637
|
SI: fourDigit,
|
|
5512
5638
|
SK: /^\d{3}\s?\d{2}$/,
|
|
5513
5639
|
TN: fourDigit,
|
|
@@ -5543,7 +5669,7 @@ function _default(str, locale) {
|
|
|
5543
5669
|
|
|
5544
5670
|
throw new Error("Invalid locale '".concat(locale, "'"));
|
|
5545
5671
|
}
|
|
5546
|
-
},{"./util/assertString":
|
|
5672
|
+
},{"./util/assertString":81}],62:[function(require,module,exports){
|
|
5547
5673
|
"use strict";
|
|
5548
5674
|
|
|
5549
5675
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5577,7 +5703,28 @@ function isRFC3339(str) {
|
|
|
5577
5703
|
|
|
5578
5704
|
module.exports = exports.default;
|
|
5579
5705
|
module.exports.default = exports.default;
|
|
5580
|
-
},{"./util/assertString":
|
|
5706
|
+
},{"./util/assertString":81}],63:[function(require,module,exports){
|
|
5707
|
+
"use strict";
|
|
5708
|
+
|
|
5709
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5710
|
+
value: true
|
|
5711
|
+
});
|
|
5712
|
+
exports.default = isSlug;
|
|
5713
|
+
|
|
5714
|
+
var _assertString = _interopRequireDefault(require("./util/assertString"));
|
|
5715
|
+
|
|
5716
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
5717
|
+
|
|
5718
|
+
var charsetRegex = /^[^-_](?!.*?[-_]{2,})([a-z0-9\\-]{1,}).*[^-_]$/;
|
|
5719
|
+
|
|
5720
|
+
function isSlug(str) {
|
|
5721
|
+
(0, _assertString.default)(str);
|
|
5722
|
+
return charsetRegex.test(str);
|
|
5723
|
+
}
|
|
5724
|
+
|
|
5725
|
+
module.exports = exports.default;
|
|
5726
|
+
module.exports.default = exports.default;
|
|
5727
|
+
},{"./util/assertString":81}],64:[function(require,module,exports){
|
|
5581
5728
|
"use strict";
|
|
5582
5729
|
|
|
5583
5730
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5598,7 +5745,7 @@ function isSurrogatePair(str) {
|
|
|
5598
5745
|
|
|
5599
5746
|
module.exports = exports.default;
|
|
5600
5747
|
module.exports.default = exports.default;
|
|
5601
|
-
},{"./util/assertString":
|
|
5748
|
+
},{"./util/assertString":81}],65:[function(require,module,exports){
|
|
5602
5749
|
"use strict";
|
|
5603
5750
|
|
|
5604
5751
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5616,6 +5763,16 @@ var _merge = _interopRequireDefault(require("./util/merge"));
|
|
|
5616
5763
|
|
|
5617
5764
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
5618
5765
|
|
|
5766
|
+
/*
|
|
5767
|
+
options for isURL method
|
|
5768
|
+
|
|
5769
|
+
require_protocol - if set as true isURL will return false if protocol is not present in the URL
|
|
5770
|
+
require_valid_protocol - isURL will check if the URL's protocol is present in the protocols option
|
|
5771
|
+
protocols - valid protocols can be modified with this option
|
|
5772
|
+
require_host - if set as false isURL will not check if host is present in the URL
|
|
5773
|
+
allow_protocol_relative_urls - if set as true protocol relative URLs will be allowed
|
|
5774
|
+
|
|
5775
|
+
*/
|
|
5619
5776
|
var default_url_options = {
|
|
5620
5777
|
protocols: ['http', 'https', 'ftp'],
|
|
5621
5778
|
require_tld: true,
|
|
@@ -5751,7 +5908,7 @@ function isURL(url, options) {
|
|
|
5751
5908
|
|
|
5752
5909
|
module.exports = exports.default;
|
|
5753
5910
|
module.exports.default = exports.default;
|
|
5754
|
-
},{"./isFQDN":
|
|
5911
|
+
},{"./isFQDN":27,"./isIP":34,"./util/assertString":81,"./util/merge":83}],66:[function(require,module,exports){
|
|
5755
5912
|
"use strict";
|
|
5756
5913
|
|
|
5757
5914
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5779,7 +5936,7 @@ function isUUID(str) {
|
|
|
5779
5936
|
|
|
5780
5937
|
module.exports = exports.default;
|
|
5781
5938
|
module.exports.default = exports.default;
|
|
5782
|
-
},{"./util/assertString":
|
|
5939
|
+
},{"./util/assertString":81}],67:[function(require,module,exports){
|
|
5783
5940
|
"use strict";
|
|
5784
5941
|
|
|
5785
5942
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5798,7 +5955,7 @@ function isUppercase(str) {
|
|
|
5798
5955
|
|
|
5799
5956
|
module.exports = exports.default;
|
|
5800
5957
|
module.exports.default = exports.default;
|
|
5801
|
-
},{"./util/assertString":
|
|
5958
|
+
},{"./util/assertString":81}],68:[function(require,module,exports){
|
|
5802
5959
|
"use strict";
|
|
5803
5960
|
|
|
5804
5961
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5821,7 +5978,7 @@ function isVariableWidth(str) {
|
|
|
5821
5978
|
|
|
5822
5979
|
module.exports = exports.default;
|
|
5823
5980
|
module.exports.default = exports.default;
|
|
5824
|
-
},{"./isFullWidth":
|
|
5981
|
+
},{"./isFullWidth":29,"./isHalfWidth":30,"./util/assertString":81}],69:[function(require,module,exports){
|
|
5825
5982
|
"use strict";
|
|
5826
5983
|
|
|
5827
5984
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5847,7 +6004,7 @@ function isWhitelisted(str, chars) {
|
|
|
5847
6004
|
|
|
5848
6005
|
module.exports = exports.default;
|
|
5849
6006
|
module.exports.default = exports.default;
|
|
5850
|
-
},{"./util/assertString":
|
|
6007
|
+
},{"./util/assertString":81}],70:[function(require,module,exports){
|
|
5851
6008
|
"use strict";
|
|
5852
6009
|
|
|
5853
6010
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5868,7 +6025,7 @@ function ltrim(str, chars) {
|
|
|
5868
6025
|
|
|
5869
6026
|
module.exports = exports.default;
|
|
5870
6027
|
module.exports.default = exports.default;
|
|
5871
|
-
},{"./util/assertString":
|
|
6028
|
+
},{"./util/assertString":81}],71:[function(require,module,exports){
|
|
5872
6029
|
"use strict";
|
|
5873
6030
|
|
|
5874
6031
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -5892,7 +6049,7 @@ function matches(str, pattern, modifiers) {
|
|
|
5892
6049
|
|
|
5893
6050
|
module.exports = exports.default;
|
|
5894
6051
|
module.exports.default = exports.default;
|
|
5895
|
-
},{"./util/assertString":
|
|
6052
|
+
},{"./util/assertString":81}],72:[function(require,module,exports){
|
|
5896
6053
|
"use strict";
|
|
5897
6054
|
|
|
5898
6055
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -6044,7 +6201,7 @@ function normalizeEmail(email, options) {
|
|
|
6044
6201
|
|
|
6045
6202
|
module.exports = exports.default;
|
|
6046
6203
|
module.exports.default = exports.default;
|
|
6047
|
-
},{"./util/merge":
|
|
6204
|
+
},{"./util/merge":83}],73:[function(require,module,exports){
|
|
6048
6205
|
"use strict";
|
|
6049
6206
|
|
|
6050
6207
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -6065,7 +6222,7 @@ function rtrim(str, chars) {
|
|
|
6065
6222
|
|
|
6066
6223
|
module.exports = exports.default;
|
|
6067
6224
|
module.exports.default = exports.default;
|
|
6068
|
-
},{"./util/assertString":
|
|
6225
|
+
},{"./util/assertString":81}],74:[function(require,module,exports){
|
|
6069
6226
|
"use strict";
|
|
6070
6227
|
|
|
6071
6228
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -6087,7 +6244,7 @@ function stripLow(str, keep_new_lines) {
|
|
|
6087
6244
|
|
|
6088
6245
|
module.exports = exports.default;
|
|
6089
6246
|
module.exports.default = exports.default;
|
|
6090
|
-
},{"./blacklist":6,"./util/assertString":
|
|
6247
|
+
},{"./blacklist":6,"./util/assertString":81}],75:[function(require,module,exports){
|
|
6091
6248
|
"use strict";
|
|
6092
6249
|
|
|
6093
6250
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -6111,7 +6268,7 @@ function toBoolean(str, strict) {
|
|
|
6111
6268
|
|
|
6112
6269
|
module.exports = exports.default;
|
|
6113
6270
|
module.exports.default = exports.default;
|
|
6114
|
-
},{"./util/assertString":
|
|
6271
|
+
},{"./util/assertString":81}],76:[function(require,module,exports){
|
|
6115
6272
|
"use strict";
|
|
6116
6273
|
|
|
6117
6274
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -6131,7 +6288,7 @@ function toDate(date) {
|
|
|
6131
6288
|
|
|
6132
6289
|
module.exports = exports.default;
|
|
6133
6290
|
module.exports.default = exports.default;
|
|
6134
|
-
},{"./util/assertString":
|
|
6291
|
+
},{"./util/assertString":81}],77:[function(require,module,exports){
|
|
6135
6292
|
"use strict";
|
|
6136
6293
|
|
|
6137
6294
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -6139,18 +6296,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6139
6296
|
});
|
|
6140
6297
|
exports.default = toFloat;
|
|
6141
6298
|
|
|
6142
|
-
var
|
|
6299
|
+
var _isFloat = _interopRequireDefault(require("./isFloat"));
|
|
6143
6300
|
|
|
6144
6301
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
6145
6302
|
|
|
6146
6303
|
function toFloat(str) {
|
|
6147
|
-
(0,
|
|
6304
|
+
if (!(0, _isFloat.default)(str)) return NaN;
|
|
6148
6305
|
return parseFloat(str);
|
|
6149
6306
|
}
|
|
6150
6307
|
|
|
6151
6308
|
module.exports = exports.default;
|
|
6152
6309
|
module.exports.default = exports.default;
|
|
6153
|
-
},{"./
|
|
6310
|
+
},{"./isFloat":28}],78:[function(require,module,exports){
|
|
6154
6311
|
"use strict";
|
|
6155
6312
|
|
|
6156
6313
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -6169,7 +6326,7 @@ function toInt(str, radix) {
|
|
|
6169
6326
|
|
|
6170
6327
|
module.exports = exports.default;
|
|
6171
6328
|
module.exports.default = exports.default;
|
|
6172
|
-
},{"./util/assertString":
|
|
6329
|
+
},{"./util/assertString":81}],79:[function(require,module,exports){
|
|
6173
6330
|
"use strict";
|
|
6174
6331
|
|
|
6175
6332
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -6189,7 +6346,7 @@ function trim(str, chars) {
|
|
|
6189
6346
|
|
|
6190
6347
|
module.exports = exports.default;
|
|
6191
6348
|
module.exports.default = exports.default;
|
|
6192
|
-
},{"./ltrim":
|
|
6349
|
+
},{"./ltrim":70,"./rtrim":73}],80:[function(require,module,exports){
|
|
6193
6350
|
"use strict";
|
|
6194
6351
|
|
|
6195
6352
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -6208,7 +6365,7 @@ function unescape(str) {
|
|
|
6208
6365
|
|
|
6209
6366
|
module.exports = exports.default;
|
|
6210
6367
|
module.exports.default = exports.default;
|
|
6211
|
-
},{"./util/assertString":
|
|
6368
|
+
},{"./util/assertString":81}],81:[function(require,module,exports){
|
|
6212
6369
|
"use strict";
|
|
6213
6370
|
|
|
6214
6371
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -6242,7 +6399,7 @@ function assertString(input) {
|
|
|
6242
6399
|
|
|
6243
6400
|
module.exports = exports.default;
|
|
6244
6401
|
module.exports.default = exports.default;
|
|
6245
|
-
},{}],
|
|
6402
|
+
},{}],82:[function(require,module,exports){
|
|
6246
6403
|
"use strict";
|
|
6247
6404
|
|
|
6248
6405
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -6260,7 +6417,7 @@ var _default = includes;
|
|
|
6260
6417
|
exports.default = _default;
|
|
6261
6418
|
module.exports = exports.default;
|
|
6262
6419
|
module.exports.default = exports.default;
|
|
6263
|
-
},{}],
|
|
6420
|
+
},{}],83:[function(require,module,exports){
|
|
6264
6421
|
"use strict";
|
|
6265
6422
|
|
|
6266
6423
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -6283,7 +6440,7 @@ function merge() {
|
|
|
6283
6440
|
|
|
6284
6441
|
module.exports = exports.default;
|
|
6285
6442
|
module.exports.default = exports.default;
|
|
6286
|
-
},{}],
|
|
6443
|
+
},{}],84:[function(require,module,exports){
|
|
6287
6444
|
"use strict";
|
|
6288
6445
|
|
|
6289
6446
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -6309,7 +6466,7 @@ function toString(input) {
|
|
|
6309
6466
|
|
|
6310
6467
|
module.exports = exports.default;
|
|
6311
6468
|
module.exports.default = exports.default;
|
|
6312
|
-
},{}],
|
|
6469
|
+
},{}],85:[function(require,module,exports){
|
|
6313
6470
|
"use strict";
|
|
6314
6471
|
|
|
6315
6472
|
Object.defineProperty(exports, "__esModule", {
|
|
@@ -6328,7 +6485,7 @@ function whitelist(str, chars) {
|
|
|
6328
6485
|
|
|
6329
6486
|
module.exports = exports.default;
|
|
6330
6487
|
module.exports.default = exports.default;
|
|
6331
|
-
},{"./util/assertString":
|
|
6488
|
+
},{"./util/assertString":81}],86:[function(require,module,exports){
|
|
6332
6489
|
"use strict";
|
|
6333
6490
|
|
|
6334
6491
|
module.exports = {
|
|
@@ -6390,7 +6547,7 @@ module.exports = {
|
|
|
6390
6547
|
|
|
6391
6548
|
};
|
|
6392
6549
|
|
|
6393
|
-
},{}],
|
|
6550
|
+
},{}],87:[function(require,module,exports){
|
|
6394
6551
|
/*jshint maxlen: false*/
|
|
6395
6552
|
|
|
6396
6553
|
var validator = require("validator");
|
|
@@ -6521,7 +6678,7 @@ var FormatValidators = {
|
|
|
6521
6678
|
|
|
6522
6679
|
module.exports = FormatValidators;
|
|
6523
6680
|
|
|
6524
|
-
},{"validator":4}],
|
|
6681
|
+
},{"validator":4}],88:[function(require,module,exports){
|
|
6525
6682
|
"use strict";
|
|
6526
6683
|
|
|
6527
6684
|
var FormatValidators = require("./FormatValidators"),
|
|
@@ -6545,7 +6702,9 @@ var JsonValidators = {
|
|
|
6545
6702
|
return;
|
|
6546
6703
|
}
|
|
6547
6704
|
|
|
6548
|
-
|
|
6705
|
+
var stringMultipleOf = String(schema.multipleOf);
|
|
6706
|
+
var scale = Math.pow(10, stringMultipleOf.length - stringMultipleOf.indexOf(".") - 1);
|
|
6707
|
+
if (Utils.whatIs((json * scale) / (schema.multipleOf * scale)) !== "integer") {
|
|
6549
6708
|
report.addError("MULTIPLE_OF", [json, schema.multipleOf], null, schema);
|
|
6550
6709
|
}
|
|
6551
6710
|
},
|
|
@@ -7142,7 +7301,7 @@ exports.validate = function (report, schema, json) {
|
|
|
7142
7301
|
|
|
7143
7302
|
};
|
|
7144
7303
|
|
|
7145
|
-
},{"./FormatValidators":
|
|
7304
|
+
},{"./FormatValidators":87,"./Report":90,"./Utils":94}],89:[function(require,module,exports){
|
|
7146
7305
|
// Number.isFinite polyfill
|
|
7147
7306
|
// http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isfinite
|
|
7148
7307
|
if (typeof Number.isFinite !== "function") {
|
|
@@ -7160,8 +7319,8 @@ if (typeof Number.isFinite !== "function") {
|
|
|
7160
7319
|
};
|
|
7161
7320
|
}
|
|
7162
7321
|
|
|
7163
|
-
},{}],
|
|
7164
|
-
(function (process){
|
|
7322
|
+
},{}],90:[function(require,module,exports){
|
|
7323
|
+
(function (process){(function (){
|
|
7165
7324
|
"use strict";
|
|
7166
7325
|
|
|
7167
7326
|
var get = require("lodash.get");
|
|
@@ -7245,7 +7404,7 @@ Report.prototype.processAsyncTasks = function (timeout, callback) {
|
|
|
7245
7404
|
function finish() {
|
|
7246
7405
|
process.nextTick(function () {
|
|
7247
7406
|
var valid = self.errors.length === 0,
|
|
7248
|
-
err = valid ?
|
|
7407
|
+
err = valid ? null : self.errors;
|
|
7249
7408
|
callback(err, valid);
|
|
7250
7409
|
});
|
|
7251
7410
|
}
|
|
@@ -7462,8 +7621,8 @@ Report.prototype.addCustomError = function (errorCode, errorMessage, params, sub
|
|
|
7462
7621
|
|
|
7463
7622
|
module.exports = Report;
|
|
7464
7623
|
|
|
7465
|
-
}).call(this,require('_process'))
|
|
7466
|
-
},{"./Errors":
|
|
7624
|
+
}).call(this)}).call(this,require('_process'))
|
|
7625
|
+
},{"./Errors":86,"./Utils":94,"_process":3,"lodash.get":1}],91:[function(require,module,exports){
|
|
7467
7626
|
"use strict";
|
|
7468
7627
|
|
|
7469
7628
|
var isequal = require("lodash.isequal");
|
|
@@ -7653,7 +7812,7 @@ exports.getSchemaByUri = function (report, uri, root) {
|
|
|
7653
7812
|
|
|
7654
7813
|
exports.getRemotePath = getRemotePath;
|
|
7655
7814
|
|
|
7656
|
-
},{"./Report":
|
|
7815
|
+
},{"./Report":90,"./SchemaCompilation":92,"./SchemaValidation":93,"./Utils":94,"lodash.isequal":2}],92:[function(require,module,exports){
|
|
7657
7816
|
"use strict";
|
|
7658
7817
|
|
|
7659
7818
|
var Report = require("./Report");
|
|
@@ -7954,7 +8113,7 @@ exports.compileSchema = function (report, schema) {
|
|
|
7954
8113
|
|
|
7955
8114
|
};
|
|
7956
8115
|
|
|
7957
|
-
},{"./Report":
|
|
8116
|
+
},{"./Report":90,"./SchemaCache":91,"./Utils":94}],93:[function(require,module,exports){
|
|
7958
8117
|
"use strict";
|
|
7959
8118
|
|
|
7960
8119
|
var FormatValidators = require("./FormatValidators"),
|
|
@@ -8575,7 +8734,7 @@ exports.validateSchema = function (report, schema) {
|
|
|
8575
8734
|
return isValid;
|
|
8576
8735
|
};
|
|
8577
8736
|
|
|
8578
|
-
},{"./FormatValidators":
|
|
8737
|
+
},{"./FormatValidators":87,"./JsonValidation":88,"./Report":90,"./Utils":94}],94:[function(require,module,exports){
|
|
8579
8738
|
"use strict";
|
|
8580
8739
|
|
|
8581
8740
|
exports.jsonSymbol = Symbol.for("z-schema/json");
|
|
@@ -8851,8 +9010,8 @@ exports.ucs2decode = function (string) {
|
|
|
8851
9010
|
};
|
|
8852
9011
|
/*jshint +W016*/
|
|
8853
9012
|
|
|
8854
|
-
},{}],
|
|
8855
|
-
(function (process){
|
|
9013
|
+
},{}],95:[function(require,module,exports){
|
|
9014
|
+
(function (process){(function (){
|
|
8856
9015
|
"use strict";
|
|
8857
9016
|
|
|
8858
9017
|
require("./Polyfills");
|
|
@@ -8907,9 +9066,9 @@ var defaultOptions = {
|
|
|
8907
9066
|
strictMode: false,
|
|
8908
9067
|
// report error paths as an array of path segments to get to the offending node
|
|
8909
9068
|
reportPathAsArray: false,
|
|
8910
|
-
//
|
|
8911
|
-
breakOnFirstError:
|
|
8912
|
-
// check if schema
|
|
9069
|
+
// stop validation as soon as an error is found
|
|
9070
|
+
breakOnFirstError: false,
|
|
9071
|
+
// check if schema follows best practices and common sense
|
|
8913
9072
|
pedanticCheck: false,
|
|
8914
9073
|
// ignore unknown formats (do not report them as an error)
|
|
8915
9074
|
ignoreUnknownFormats: false,
|
|
@@ -9119,7 +9278,7 @@ ZSchema.prototype.getLastError = function () {
|
|
|
9119
9278
|
return e;
|
|
9120
9279
|
};
|
|
9121
9280
|
ZSchema.prototype.getLastErrors = function () {
|
|
9122
|
-
return this.lastReport && this.lastReport.errors.length > 0 ? this.lastReport.errors :
|
|
9281
|
+
return this.lastReport && this.lastReport.errors.length > 0 ? this.lastReport.errors : null;
|
|
9123
9282
|
};
|
|
9124
9283
|
ZSchema.prototype.getMissingReferences = function (arr) {
|
|
9125
9284
|
arr = arr || this.lastReport.errors;
|
|
@@ -9263,8 +9422,8 @@ ZSchema.jsonSymbol = Utils.jsonSymbol;
|
|
|
9263
9422
|
|
|
9264
9423
|
module.exports = ZSchema;
|
|
9265
9424
|
|
|
9266
|
-
}).call(this,require('_process'))
|
|
9267
|
-
},{"./FormatValidators":
|
|
9425
|
+
}).call(this)}).call(this,require('_process'))
|
|
9426
|
+
},{"./FormatValidators":87,"./JsonValidation":88,"./Polyfills":89,"./Report":90,"./SchemaCache":91,"./SchemaCompilation":92,"./SchemaValidation":93,"./Utils":94,"./schemas/hyper-schema.json":96,"./schemas/schema.json":97,"_process":3,"lodash.get":1}],96:[function(require,module,exports){
|
|
9268
9427
|
module.exports={
|
|
9269
9428
|
"$schema": "http://json-schema.org/draft-04/hyper-schema#",
|
|
9270
9429
|
"id": "http://json-schema.org/draft-04/hyper-schema#",
|
|
@@ -9424,7 +9583,7 @@ module.exports={
|
|
|
9424
9583
|
}
|
|
9425
9584
|
|
|
9426
9585
|
|
|
9427
|
-
},{}],
|
|
9586
|
+
},{}],97:[function(require,module,exports){
|
|
9428
9587
|
module.exports={
|
|
9429
9588
|
"id": "http://json-schema.org/draft-04/schema#",
|
|
9430
9589
|
"$schema": "http://json-schema.org/draft-04/schema#",
|
|
@@ -9577,5 +9736,5 @@ module.exports={
|
|
|
9577
9736
|
"default": {}
|
|
9578
9737
|
}
|
|
9579
9738
|
|
|
9580
|
-
},{}]},{},[
|
|
9739
|
+
},{}]},{},[86,87,88,89,90,91,92,93,94,95])(95)
|
|
9581
9740
|
});
|