z-schema 3.18.0 → 3.18.4

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.
@@ -934,6 +934,1858 @@ module.exports = get;
934
934
 
935
935
  }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
936
936
  },{}],2:[function(require,module,exports){
937
+ (function (global){
938
+ /**
939
+ * Lodash (Custom Build) <https://lodash.com/>
940
+ * Build: `lodash modularize exports="npm" -o ./`
941
+ * Copyright JS Foundation and other contributors <https://js.foundation/>
942
+ * Released under MIT license <https://lodash.com/license>
943
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
944
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
945
+ */
946
+
947
+ /** Used as the size to enable large array optimizations. */
948
+ var LARGE_ARRAY_SIZE = 200;
949
+
950
+ /** Used to stand-in for `undefined` hash values. */
951
+ var HASH_UNDEFINED = '__lodash_hash_undefined__';
952
+
953
+ /** Used to compose bitmasks for value comparisons. */
954
+ var COMPARE_PARTIAL_FLAG = 1,
955
+ COMPARE_UNORDERED_FLAG = 2;
956
+
957
+ /** Used as references for various `Number` constants. */
958
+ var MAX_SAFE_INTEGER = 9007199254740991;
959
+
960
+ /** `Object#toString` result references. */
961
+ var argsTag = '[object Arguments]',
962
+ arrayTag = '[object Array]',
963
+ asyncTag = '[object AsyncFunction]',
964
+ boolTag = '[object Boolean]',
965
+ dateTag = '[object Date]',
966
+ errorTag = '[object Error]',
967
+ funcTag = '[object Function]',
968
+ genTag = '[object GeneratorFunction]',
969
+ mapTag = '[object Map]',
970
+ numberTag = '[object Number]',
971
+ nullTag = '[object Null]',
972
+ objectTag = '[object Object]',
973
+ promiseTag = '[object Promise]',
974
+ proxyTag = '[object Proxy]',
975
+ regexpTag = '[object RegExp]',
976
+ setTag = '[object Set]',
977
+ stringTag = '[object String]',
978
+ symbolTag = '[object Symbol]',
979
+ undefinedTag = '[object Undefined]',
980
+ weakMapTag = '[object WeakMap]';
981
+
982
+ var arrayBufferTag = '[object ArrayBuffer]',
983
+ dataViewTag = '[object DataView]',
984
+ float32Tag = '[object Float32Array]',
985
+ float64Tag = '[object Float64Array]',
986
+ int8Tag = '[object Int8Array]',
987
+ int16Tag = '[object Int16Array]',
988
+ int32Tag = '[object Int32Array]',
989
+ uint8Tag = '[object Uint8Array]',
990
+ uint8ClampedTag = '[object Uint8ClampedArray]',
991
+ uint16Tag = '[object Uint16Array]',
992
+ uint32Tag = '[object Uint32Array]';
993
+
994
+ /**
995
+ * Used to match `RegExp`
996
+ * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
997
+ */
998
+ var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
999
+
1000
+ /** Used to detect host constructors (Safari). */
1001
+ var reIsHostCtor = /^\[object .+?Constructor\]$/;
1002
+
1003
+ /** Used to detect unsigned integer values. */
1004
+ var reIsUint = /^(?:0|[1-9]\d*)$/;
1005
+
1006
+ /** Used to identify `toStringTag` values of typed arrays. */
1007
+ var typedArrayTags = {};
1008
+ typedArrayTags[float32Tag] = typedArrayTags[float64Tag] =
1009
+ typedArrayTags[int8Tag] = typedArrayTags[int16Tag] =
1010
+ typedArrayTags[int32Tag] = typedArrayTags[uint8Tag] =
1011
+ typedArrayTags[uint8ClampedTag] = typedArrayTags[uint16Tag] =
1012
+ typedArrayTags[uint32Tag] = true;
1013
+ typedArrayTags[argsTag] = typedArrayTags[arrayTag] =
1014
+ typedArrayTags[arrayBufferTag] = typedArrayTags[boolTag] =
1015
+ typedArrayTags[dataViewTag] = typedArrayTags[dateTag] =
1016
+ typedArrayTags[errorTag] = typedArrayTags[funcTag] =
1017
+ typedArrayTags[mapTag] = typedArrayTags[numberTag] =
1018
+ typedArrayTags[objectTag] = typedArrayTags[regexpTag] =
1019
+ typedArrayTags[setTag] = typedArrayTags[stringTag] =
1020
+ typedArrayTags[weakMapTag] = false;
1021
+
1022
+ /** Detect free variable `global` from Node.js. */
1023
+ var freeGlobal = typeof global == 'object' && global && global.Object === Object && global;
1024
+
1025
+ /** Detect free variable `self`. */
1026
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
1027
+
1028
+ /** Used as a reference to the global object. */
1029
+ var root = freeGlobal || freeSelf || Function('return this')();
1030
+
1031
+ /** Detect free variable `exports`. */
1032
+ var freeExports = typeof exports == 'object' && exports && !exports.nodeType && exports;
1033
+
1034
+ /** Detect free variable `module`. */
1035
+ var freeModule = freeExports && typeof module == 'object' && module && !module.nodeType && module;
1036
+
1037
+ /** Detect the popular CommonJS extension `module.exports`. */
1038
+ var moduleExports = freeModule && freeModule.exports === freeExports;
1039
+
1040
+ /** Detect free variable `process` from Node.js. */
1041
+ var freeProcess = moduleExports && freeGlobal.process;
1042
+
1043
+ /** Used to access faster Node.js helpers. */
1044
+ var nodeUtil = (function() {
1045
+ try {
1046
+ return freeProcess && freeProcess.binding && freeProcess.binding('util');
1047
+ } catch (e) {}
1048
+ }());
1049
+
1050
+ /* Node.js helper references. */
1051
+ var nodeIsTypedArray = nodeUtil && nodeUtil.isTypedArray;
1052
+
1053
+ /**
1054
+ * A specialized version of `_.filter` for arrays without support for
1055
+ * iteratee shorthands.
1056
+ *
1057
+ * @private
1058
+ * @param {Array} [array] The array to iterate over.
1059
+ * @param {Function} predicate The function invoked per iteration.
1060
+ * @returns {Array} Returns the new filtered array.
1061
+ */
1062
+ function arrayFilter(array, predicate) {
1063
+ var index = -1,
1064
+ length = array == null ? 0 : array.length,
1065
+ resIndex = 0,
1066
+ result = [];
1067
+
1068
+ while (++index < length) {
1069
+ var value = array[index];
1070
+ if (predicate(value, index, array)) {
1071
+ result[resIndex++] = value;
1072
+ }
1073
+ }
1074
+ return result;
1075
+ }
1076
+
1077
+ /**
1078
+ * Appends the elements of `values` to `array`.
1079
+ *
1080
+ * @private
1081
+ * @param {Array} array The array to modify.
1082
+ * @param {Array} values The values to append.
1083
+ * @returns {Array} Returns `array`.
1084
+ */
1085
+ function arrayPush(array, values) {
1086
+ var index = -1,
1087
+ length = values.length,
1088
+ offset = array.length;
1089
+
1090
+ while (++index < length) {
1091
+ array[offset + index] = values[index];
1092
+ }
1093
+ return array;
1094
+ }
1095
+
1096
+ /**
1097
+ * A specialized version of `_.some` for arrays without support for iteratee
1098
+ * shorthands.
1099
+ *
1100
+ * @private
1101
+ * @param {Array} [array] The array to iterate over.
1102
+ * @param {Function} predicate The function invoked per iteration.
1103
+ * @returns {boolean} Returns `true` if any element passes the predicate check,
1104
+ * else `false`.
1105
+ */
1106
+ function arraySome(array, predicate) {
1107
+ var index = -1,
1108
+ length = array == null ? 0 : array.length;
1109
+
1110
+ while (++index < length) {
1111
+ if (predicate(array[index], index, array)) {
1112
+ return true;
1113
+ }
1114
+ }
1115
+ return false;
1116
+ }
1117
+
1118
+ /**
1119
+ * The base implementation of `_.times` without support for iteratee shorthands
1120
+ * or max array length checks.
1121
+ *
1122
+ * @private
1123
+ * @param {number} n The number of times to invoke `iteratee`.
1124
+ * @param {Function} iteratee The function invoked per iteration.
1125
+ * @returns {Array} Returns the array of results.
1126
+ */
1127
+ function baseTimes(n, iteratee) {
1128
+ var index = -1,
1129
+ result = Array(n);
1130
+
1131
+ while (++index < n) {
1132
+ result[index] = iteratee(index);
1133
+ }
1134
+ return result;
1135
+ }
1136
+
1137
+ /**
1138
+ * The base implementation of `_.unary` without support for storing metadata.
1139
+ *
1140
+ * @private
1141
+ * @param {Function} func The function to cap arguments for.
1142
+ * @returns {Function} Returns the new capped function.
1143
+ */
1144
+ function baseUnary(func) {
1145
+ return function(value) {
1146
+ return func(value);
1147
+ };
1148
+ }
1149
+
1150
+ /**
1151
+ * Checks if a `cache` value for `key` exists.
1152
+ *
1153
+ * @private
1154
+ * @param {Object} cache The cache to query.
1155
+ * @param {string} key The key of the entry to check.
1156
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1157
+ */
1158
+ function cacheHas(cache, key) {
1159
+ return cache.has(key);
1160
+ }
1161
+
1162
+ /**
1163
+ * Gets the value at `key` of `object`.
1164
+ *
1165
+ * @private
1166
+ * @param {Object} [object] The object to query.
1167
+ * @param {string} key The key of the property to get.
1168
+ * @returns {*} Returns the property value.
1169
+ */
1170
+ function getValue(object, key) {
1171
+ return object == null ? undefined : object[key];
1172
+ }
1173
+
1174
+ /**
1175
+ * Converts `map` to its key-value pairs.
1176
+ *
1177
+ * @private
1178
+ * @param {Object} map The map to convert.
1179
+ * @returns {Array} Returns the key-value pairs.
1180
+ */
1181
+ function mapToArray(map) {
1182
+ var index = -1,
1183
+ result = Array(map.size);
1184
+
1185
+ map.forEach(function(value, key) {
1186
+ result[++index] = [key, value];
1187
+ });
1188
+ return result;
1189
+ }
1190
+
1191
+ /**
1192
+ * Creates a unary function that invokes `func` with its argument transformed.
1193
+ *
1194
+ * @private
1195
+ * @param {Function} func The function to wrap.
1196
+ * @param {Function} transform The argument transform.
1197
+ * @returns {Function} Returns the new function.
1198
+ */
1199
+ function overArg(func, transform) {
1200
+ return function(arg) {
1201
+ return func(transform(arg));
1202
+ };
1203
+ }
1204
+
1205
+ /**
1206
+ * Converts `set` to an array of its values.
1207
+ *
1208
+ * @private
1209
+ * @param {Object} set The set to convert.
1210
+ * @returns {Array} Returns the values.
1211
+ */
1212
+ function setToArray(set) {
1213
+ var index = -1,
1214
+ result = Array(set.size);
1215
+
1216
+ set.forEach(function(value) {
1217
+ result[++index] = value;
1218
+ });
1219
+ return result;
1220
+ }
1221
+
1222
+ /** Used for built-in method references. */
1223
+ var arrayProto = Array.prototype,
1224
+ funcProto = Function.prototype,
1225
+ objectProto = Object.prototype;
1226
+
1227
+ /** Used to detect overreaching core-js shims. */
1228
+ var coreJsData = root['__core-js_shared__'];
1229
+
1230
+ /** Used to resolve the decompiled source of functions. */
1231
+ var funcToString = funcProto.toString;
1232
+
1233
+ /** Used to check objects for own properties. */
1234
+ var hasOwnProperty = objectProto.hasOwnProperty;
1235
+
1236
+ /** Used to detect methods masquerading as native. */
1237
+ var maskSrcKey = (function() {
1238
+ var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
1239
+ return uid ? ('Symbol(src)_1.' + uid) : '';
1240
+ }());
1241
+
1242
+ /**
1243
+ * Used to resolve the
1244
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
1245
+ * of values.
1246
+ */
1247
+ var nativeObjectToString = objectProto.toString;
1248
+
1249
+ /** Used to detect if a method is native. */
1250
+ var reIsNative = RegExp('^' +
1251
+ funcToString.call(hasOwnProperty).replace(reRegExpChar, '\\$&')
1252
+ .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
1253
+ );
1254
+
1255
+ /** Built-in value references. */
1256
+ var Buffer = moduleExports ? root.Buffer : undefined,
1257
+ Symbol = root.Symbol,
1258
+ Uint8Array = root.Uint8Array,
1259
+ propertyIsEnumerable = objectProto.propertyIsEnumerable,
1260
+ splice = arrayProto.splice,
1261
+ symToStringTag = Symbol ? Symbol.toStringTag : undefined;
1262
+
1263
+ /* Built-in method references for those with the same name as other `lodash` methods. */
1264
+ var nativeGetSymbols = Object.getOwnPropertySymbols,
1265
+ nativeIsBuffer = Buffer ? Buffer.isBuffer : undefined,
1266
+ nativeKeys = overArg(Object.keys, Object);
1267
+
1268
+ /* Built-in method references that are verified to be native. */
1269
+ var DataView = getNative(root, 'DataView'),
1270
+ Map = getNative(root, 'Map'),
1271
+ Promise = getNative(root, 'Promise'),
1272
+ Set = getNative(root, 'Set'),
1273
+ WeakMap = getNative(root, 'WeakMap'),
1274
+ nativeCreate = getNative(Object, 'create');
1275
+
1276
+ /** Used to detect maps, sets, and weakmaps. */
1277
+ var dataViewCtorString = toSource(DataView),
1278
+ mapCtorString = toSource(Map),
1279
+ promiseCtorString = toSource(Promise),
1280
+ setCtorString = toSource(Set),
1281
+ weakMapCtorString = toSource(WeakMap);
1282
+
1283
+ /** Used to convert symbols to primitives and strings. */
1284
+ var symbolProto = Symbol ? Symbol.prototype : undefined,
1285
+ symbolValueOf = symbolProto ? symbolProto.valueOf : undefined;
1286
+
1287
+ /**
1288
+ * Creates a hash object.
1289
+ *
1290
+ * @private
1291
+ * @constructor
1292
+ * @param {Array} [entries] The key-value pairs to cache.
1293
+ */
1294
+ function Hash(entries) {
1295
+ var index = -1,
1296
+ length = entries == null ? 0 : entries.length;
1297
+
1298
+ this.clear();
1299
+ while (++index < length) {
1300
+ var entry = entries[index];
1301
+ this.set(entry[0], entry[1]);
1302
+ }
1303
+ }
1304
+
1305
+ /**
1306
+ * Removes all key-value entries from the hash.
1307
+ *
1308
+ * @private
1309
+ * @name clear
1310
+ * @memberOf Hash
1311
+ */
1312
+ function hashClear() {
1313
+ this.__data__ = nativeCreate ? nativeCreate(null) : {};
1314
+ this.size = 0;
1315
+ }
1316
+
1317
+ /**
1318
+ * Removes `key` and its value from the hash.
1319
+ *
1320
+ * @private
1321
+ * @name delete
1322
+ * @memberOf Hash
1323
+ * @param {Object} hash The hash to modify.
1324
+ * @param {string} key The key of the value to remove.
1325
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1326
+ */
1327
+ function hashDelete(key) {
1328
+ var result = this.has(key) && delete this.__data__[key];
1329
+ this.size -= result ? 1 : 0;
1330
+ return result;
1331
+ }
1332
+
1333
+ /**
1334
+ * Gets the hash value for `key`.
1335
+ *
1336
+ * @private
1337
+ * @name get
1338
+ * @memberOf Hash
1339
+ * @param {string} key The key of the value to get.
1340
+ * @returns {*} Returns the entry value.
1341
+ */
1342
+ function hashGet(key) {
1343
+ var data = this.__data__;
1344
+ if (nativeCreate) {
1345
+ var result = data[key];
1346
+ return result === HASH_UNDEFINED ? undefined : result;
1347
+ }
1348
+ return hasOwnProperty.call(data, key) ? data[key] : undefined;
1349
+ }
1350
+
1351
+ /**
1352
+ * Checks if a hash value for `key` exists.
1353
+ *
1354
+ * @private
1355
+ * @name has
1356
+ * @memberOf Hash
1357
+ * @param {string} key The key of the entry to check.
1358
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1359
+ */
1360
+ function hashHas(key) {
1361
+ var data = this.__data__;
1362
+ return nativeCreate ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
1363
+ }
1364
+
1365
+ /**
1366
+ * Sets the hash `key` to `value`.
1367
+ *
1368
+ * @private
1369
+ * @name set
1370
+ * @memberOf Hash
1371
+ * @param {string} key The key of the value to set.
1372
+ * @param {*} value The value to set.
1373
+ * @returns {Object} Returns the hash instance.
1374
+ */
1375
+ function hashSet(key, value) {
1376
+ var data = this.__data__;
1377
+ this.size += this.has(key) ? 0 : 1;
1378
+ data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED : value;
1379
+ return this;
1380
+ }
1381
+
1382
+ // Add methods to `Hash`.
1383
+ Hash.prototype.clear = hashClear;
1384
+ Hash.prototype['delete'] = hashDelete;
1385
+ Hash.prototype.get = hashGet;
1386
+ Hash.prototype.has = hashHas;
1387
+ Hash.prototype.set = hashSet;
1388
+
1389
+ /**
1390
+ * Creates an list cache object.
1391
+ *
1392
+ * @private
1393
+ * @constructor
1394
+ * @param {Array} [entries] The key-value pairs to cache.
1395
+ */
1396
+ function ListCache(entries) {
1397
+ var index = -1,
1398
+ length = entries == null ? 0 : entries.length;
1399
+
1400
+ this.clear();
1401
+ while (++index < length) {
1402
+ var entry = entries[index];
1403
+ this.set(entry[0], entry[1]);
1404
+ }
1405
+ }
1406
+
1407
+ /**
1408
+ * Removes all key-value entries from the list cache.
1409
+ *
1410
+ * @private
1411
+ * @name clear
1412
+ * @memberOf ListCache
1413
+ */
1414
+ function listCacheClear() {
1415
+ this.__data__ = [];
1416
+ this.size = 0;
1417
+ }
1418
+
1419
+ /**
1420
+ * Removes `key` and its value from the list cache.
1421
+ *
1422
+ * @private
1423
+ * @name delete
1424
+ * @memberOf ListCache
1425
+ * @param {string} key The key of the value to remove.
1426
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1427
+ */
1428
+ function listCacheDelete(key) {
1429
+ var data = this.__data__,
1430
+ index = assocIndexOf(data, key);
1431
+
1432
+ if (index < 0) {
1433
+ return false;
1434
+ }
1435
+ var lastIndex = data.length - 1;
1436
+ if (index == lastIndex) {
1437
+ data.pop();
1438
+ } else {
1439
+ splice.call(data, index, 1);
1440
+ }
1441
+ --this.size;
1442
+ return true;
1443
+ }
1444
+
1445
+ /**
1446
+ * Gets the list cache value for `key`.
1447
+ *
1448
+ * @private
1449
+ * @name get
1450
+ * @memberOf ListCache
1451
+ * @param {string} key The key of the value to get.
1452
+ * @returns {*} Returns the entry value.
1453
+ */
1454
+ function listCacheGet(key) {
1455
+ var data = this.__data__,
1456
+ index = assocIndexOf(data, key);
1457
+
1458
+ return index < 0 ? undefined : data[index][1];
1459
+ }
1460
+
1461
+ /**
1462
+ * Checks if a list cache value for `key` exists.
1463
+ *
1464
+ * @private
1465
+ * @name has
1466
+ * @memberOf ListCache
1467
+ * @param {string} key The key of the entry to check.
1468
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1469
+ */
1470
+ function listCacheHas(key) {
1471
+ return assocIndexOf(this.__data__, key) > -1;
1472
+ }
1473
+
1474
+ /**
1475
+ * Sets the list cache `key` to `value`.
1476
+ *
1477
+ * @private
1478
+ * @name set
1479
+ * @memberOf ListCache
1480
+ * @param {string} key The key of the value to set.
1481
+ * @param {*} value The value to set.
1482
+ * @returns {Object} Returns the list cache instance.
1483
+ */
1484
+ function listCacheSet(key, value) {
1485
+ var data = this.__data__,
1486
+ index = assocIndexOf(data, key);
1487
+
1488
+ if (index < 0) {
1489
+ ++this.size;
1490
+ data.push([key, value]);
1491
+ } else {
1492
+ data[index][1] = value;
1493
+ }
1494
+ return this;
1495
+ }
1496
+
1497
+ // Add methods to `ListCache`.
1498
+ ListCache.prototype.clear = listCacheClear;
1499
+ ListCache.prototype['delete'] = listCacheDelete;
1500
+ ListCache.prototype.get = listCacheGet;
1501
+ ListCache.prototype.has = listCacheHas;
1502
+ ListCache.prototype.set = listCacheSet;
1503
+
1504
+ /**
1505
+ * Creates a map cache object to store key-value pairs.
1506
+ *
1507
+ * @private
1508
+ * @constructor
1509
+ * @param {Array} [entries] The key-value pairs to cache.
1510
+ */
1511
+ function MapCache(entries) {
1512
+ var index = -1,
1513
+ length = entries == null ? 0 : entries.length;
1514
+
1515
+ this.clear();
1516
+ while (++index < length) {
1517
+ var entry = entries[index];
1518
+ this.set(entry[0], entry[1]);
1519
+ }
1520
+ }
1521
+
1522
+ /**
1523
+ * Removes all key-value entries from the map.
1524
+ *
1525
+ * @private
1526
+ * @name clear
1527
+ * @memberOf MapCache
1528
+ */
1529
+ function mapCacheClear() {
1530
+ this.size = 0;
1531
+ this.__data__ = {
1532
+ 'hash': new Hash,
1533
+ 'map': new (Map || ListCache),
1534
+ 'string': new Hash
1535
+ };
1536
+ }
1537
+
1538
+ /**
1539
+ * Removes `key` and its value from the map.
1540
+ *
1541
+ * @private
1542
+ * @name delete
1543
+ * @memberOf MapCache
1544
+ * @param {string} key The key of the value to remove.
1545
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1546
+ */
1547
+ function mapCacheDelete(key) {
1548
+ var result = getMapData(this, key)['delete'](key);
1549
+ this.size -= result ? 1 : 0;
1550
+ return result;
1551
+ }
1552
+
1553
+ /**
1554
+ * Gets the map value for `key`.
1555
+ *
1556
+ * @private
1557
+ * @name get
1558
+ * @memberOf MapCache
1559
+ * @param {string} key The key of the value to get.
1560
+ * @returns {*} Returns the entry value.
1561
+ */
1562
+ function mapCacheGet(key) {
1563
+ return getMapData(this, key).get(key);
1564
+ }
1565
+
1566
+ /**
1567
+ * Checks if a map value for `key` exists.
1568
+ *
1569
+ * @private
1570
+ * @name has
1571
+ * @memberOf MapCache
1572
+ * @param {string} key The key of the entry to check.
1573
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1574
+ */
1575
+ function mapCacheHas(key) {
1576
+ return getMapData(this, key).has(key);
1577
+ }
1578
+
1579
+ /**
1580
+ * Sets the map `key` to `value`.
1581
+ *
1582
+ * @private
1583
+ * @name set
1584
+ * @memberOf MapCache
1585
+ * @param {string} key The key of the value to set.
1586
+ * @param {*} value The value to set.
1587
+ * @returns {Object} Returns the map cache instance.
1588
+ */
1589
+ function mapCacheSet(key, value) {
1590
+ var data = getMapData(this, key),
1591
+ size = data.size;
1592
+
1593
+ data.set(key, value);
1594
+ this.size += data.size == size ? 0 : 1;
1595
+ return this;
1596
+ }
1597
+
1598
+ // Add methods to `MapCache`.
1599
+ MapCache.prototype.clear = mapCacheClear;
1600
+ MapCache.prototype['delete'] = mapCacheDelete;
1601
+ MapCache.prototype.get = mapCacheGet;
1602
+ MapCache.prototype.has = mapCacheHas;
1603
+ MapCache.prototype.set = mapCacheSet;
1604
+
1605
+ /**
1606
+ *
1607
+ * Creates an array cache object to store unique values.
1608
+ *
1609
+ * @private
1610
+ * @constructor
1611
+ * @param {Array} [values] The values to cache.
1612
+ */
1613
+ function SetCache(values) {
1614
+ var index = -1,
1615
+ length = values == null ? 0 : values.length;
1616
+
1617
+ this.__data__ = new MapCache;
1618
+ while (++index < length) {
1619
+ this.add(values[index]);
1620
+ }
1621
+ }
1622
+
1623
+ /**
1624
+ * Adds `value` to the array cache.
1625
+ *
1626
+ * @private
1627
+ * @name add
1628
+ * @memberOf SetCache
1629
+ * @alias push
1630
+ * @param {*} value The value to cache.
1631
+ * @returns {Object} Returns the cache instance.
1632
+ */
1633
+ function setCacheAdd(value) {
1634
+ this.__data__.set(value, HASH_UNDEFINED);
1635
+ return this;
1636
+ }
1637
+
1638
+ /**
1639
+ * Checks if `value` is in the array cache.
1640
+ *
1641
+ * @private
1642
+ * @name has
1643
+ * @memberOf SetCache
1644
+ * @param {*} value The value to search for.
1645
+ * @returns {number} Returns `true` if `value` is found, else `false`.
1646
+ */
1647
+ function setCacheHas(value) {
1648
+ return this.__data__.has(value);
1649
+ }
1650
+
1651
+ // Add methods to `SetCache`.
1652
+ SetCache.prototype.add = SetCache.prototype.push = setCacheAdd;
1653
+ SetCache.prototype.has = setCacheHas;
1654
+
1655
+ /**
1656
+ * Creates a stack cache object to store key-value pairs.
1657
+ *
1658
+ * @private
1659
+ * @constructor
1660
+ * @param {Array} [entries] The key-value pairs to cache.
1661
+ */
1662
+ function Stack(entries) {
1663
+ var data = this.__data__ = new ListCache(entries);
1664
+ this.size = data.size;
1665
+ }
1666
+
1667
+ /**
1668
+ * Removes all key-value entries from the stack.
1669
+ *
1670
+ * @private
1671
+ * @name clear
1672
+ * @memberOf Stack
1673
+ */
1674
+ function stackClear() {
1675
+ this.__data__ = new ListCache;
1676
+ this.size = 0;
1677
+ }
1678
+
1679
+ /**
1680
+ * Removes `key` and its value from the stack.
1681
+ *
1682
+ * @private
1683
+ * @name delete
1684
+ * @memberOf Stack
1685
+ * @param {string} key The key of the value to remove.
1686
+ * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1687
+ */
1688
+ function stackDelete(key) {
1689
+ var data = this.__data__,
1690
+ result = data['delete'](key);
1691
+
1692
+ this.size = data.size;
1693
+ return result;
1694
+ }
1695
+
1696
+ /**
1697
+ * Gets the stack value for `key`.
1698
+ *
1699
+ * @private
1700
+ * @name get
1701
+ * @memberOf Stack
1702
+ * @param {string} key The key of the value to get.
1703
+ * @returns {*} Returns the entry value.
1704
+ */
1705
+ function stackGet(key) {
1706
+ return this.__data__.get(key);
1707
+ }
1708
+
1709
+ /**
1710
+ * Checks if a stack value for `key` exists.
1711
+ *
1712
+ * @private
1713
+ * @name has
1714
+ * @memberOf Stack
1715
+ * @param {string} key The key of the entry to check.
1716
+ * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1717
+ */
1718
+ function stackHas(key) {
1719
+ return this.__data__.has(key);
1720
+ }
1721
+
1722
+ /**
1723
+ * Sets the stack `key` to `value`.
1724
+ *
1725
+ * @private
1726
+ * @name set
1727
+ * @memberOf Stack
1728
+ * @param {string} key The key of the value to set.
1729
+ * @param {*} value The value to set.
1730
+ * @returns {Object} Returns the stack cache instance.
1731
+ */
1732
+ function stackSet(key, value) {
1733
+ var data = this.__data__;
1734
+ if (data instanceof ListCache) {
1735
+ var pairs = data.__data__;
1736
+ if (!Map || (pairs.length < LARGE_ARRAY_SIZE - 1)) {
1737
+ pairs.push([key, value]);
1738
+ this.size = ++data.size;
1739
+ return this;
1740
+ }
1741
+ data = this.__data__ = new MapCache(pairs);
1742
+ }
1743
+ data.set(key, value);
1744
+ this.size = data.size;
1745
+ return this;
1746
+ }
1747
+
1748
+ // Add methods to `Stack`.
1749
+ Stack.prototype.clear = stackClear;
1750
+ Stack.prototype['delete'] = stackDelete;
1751
+ Stack.prototype.get = stackGet;
1752
+ Stack.prototype.has = stackHas;
1753
+ Stack.prototype.set = stackSet;
1754
+
1755
+ /**
1756
+ * Creates an array of the enumerable property names of the array-like `value`.
1757
+ *
1758
+ * @private
1759
+ * @param {*} value The value to query.
1760
+ * @param {boolean} inherited Specify returning inherited property names.
1761
+ * @returns {Array} Returns the array of property names.
1762
+ */
1763
+ function arrayLikeKeys(value, inherited) {
1764
+ var isArr = isArray(value),
1765
+ isArg = !isArr && isArguments(value),
1766
+ isBuff = !isArr && !isArg && isBuffer(value),
1767
+ isType = !isArr && !isArg && !isBuff && isTypedArray(value),
1768
+ skipIndexes = isArr || isArg || isBuff || isType,
1769
+ result = skipIndexes ? baseTimes(value.length, String) : [],
1770
+ length = result.length;
1771
+
1772
+ for (var key in value) {
1773
+ if ((inherited || hasOwnProperty.call(value, key)) &&
1774
+ !(skipIndexes && (
1775
+ // Safari 9 has enumerable `arguments.length` in strict mode.
1776
+ key == 'length' ||
1777
+ // Node.js 0.10 has enumerable non-index properties on buffers.
1778
+ (isBuff && (key == 'offset' || key == 'parent')) ||
1779
+ // PhantomJS 2 has enumerable non-index properties on typed arrays.
1780
+ (isType && (key == 'buffer' || key == 'byteLength' || key == 'byteOffset')) ||
1781
+ // Skip index properties.
1782
+ isIndex(key, length)
1783
+ ))) {
1784
+ result.push(key);
1785
+ }
1786
+ }
1787
+ return result;
1788
+ }
1789
+
1790
+ /**
1791
+ * Gets the index at which the `key` is found in `array` of key-value pairs.
1792
+ *
1793
+ * @private
1794
+ * @param {Array} array The array to inspect.
1795
+ * @param {*} key The key to search for.
1796
+ * @returns {number} Returns the index of the matched value, else `-1`.
1797
+ */
1798
+ function assocIndexOf(array, key) {
1799
+ var length = array.length;
1800
+ while (length--) {
1801
+ if (eq(array[length][0], key)) {
1802
+ return length;
1803
+ }
1804
+ }
1805
+ return -1;
1806
+ }
1807
+
1808
+ /**
1809
+ * The base implementation of `getAllKeys` and `getAllKeysIn` which uses
1810
+ * `keysFunc` and `symbolsFunc` to get the enumerable property names and
1811
+ * symbols of `object`.
1812
+ *
1813
+ * @private
1814
+ * @param {Object} object The object to query.
1815
+ * @param {Function} keysFunc The function to get the keys of `object`.
1816
+ * @param {Function} symbolsFunc The function to get the symbols of `object`.
1817
+ * @returns {Array} Returns the array of property names and symbols.
1818
+ */
1819
+ function baseGetAllKeys(object, keysFunc, symbolsFunc) {
1820
+ var result = keysFunc(object);
1821
+ return isArray(object) ? result : arrayPush(result, symbolsFunc(object));
1822
+ }
1823
+
1824
+ /**
1825
+ * The base implementation of `getTag` without fallbacks for buggy environments.
1826
+ *
1827
+ * @private
1828
+ * @param {*} value The value to query.
1829
+ * @returns {string} Returns the `toStringTag`.
1830
+ */
1831
+ function baseGetTag(value) {
1832
+ if (value == null) {
1833
+ return value === undefined ? undefinedTag : nullTag;
1834
+ }
1835
+ return (symToStringTag && symToStringTag in Object(value))
1836
+ ? getRawTag(value)
1837
+ : objectToString(value);
1838
+ }
1839
+
1840
+ /**
1841
+ * The base implementation of `_.isArguments`.
1842
+ *
1843
+ * @private
1844
+ * @param {*} value The value to check.
1845
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
1846
+ */
1847
+ function baseIsArguments(value) {
1848
+ return isObjectLike(value) && baseGetTag(value) == argsTag;
1849
+ }
1850
+
1851
+ /**
1852
+ * The base implementation of `_.isEqual` which supports partial comparisons
1853
+ * and tracks traversed objects.
1854
+ *
1855
+ * @private
1856
+ * @param {*} value The value to compare.
1857
+ * @param {*} other The other value to compare.
1858
+ * @param {boolean} bitmask The bitmask flags.
1859
+ * 1 - Unordered comparison
1860
+ * 2 - Partial comparison
1861
+ * @param {Function} [customizer] The function to customize comparisons.
1862
+ * @param {Object} [stack] Tracks traversed `value` and `other` objects.
1863
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
1864
+ */
1865
+ function baseIsEqual(value, other, bitmask, customizer, stack) {
1866
+ if (value === other) {
1867
+ return true;
1868
+ }
1869
+ if (value == null || other == null || (!isObjectLike(value) && !isObjectLike(other))) {
1870
+ return value !== value && other !== other;
1871
+ }
1872
+ return baseIsEqualDeep(value, other, bitmask, customizer, baseIsEqual, stack);
1873
+ }
1874
+
1875
+ /**
1876
+ * A specialized version of `baseIsEqual` for arrays and objects which performs
1877
+ * deep comparisons and tracks traversed objects enabling objects with circular
1878
+ * references to be compared.
1879
+ *
1880
+ * @private
1881
+ * @param {Object} object The object to compare.
1882
+ * @param {Object} other The other object to compare.
1883
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
1884
+ * @param {Function} customizer The function to customize comparisons.
1885
+ * @param {Function} equalFunc The function to determine equivalents of values.
1886
+ * @param {Object} [stack] Tracks traversed `object` and `other` objects.
1887
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
1888
+ */
1889
+ function baseIsEqualDeep(object, other, bitmask, customizer, equalFunc, stack) {
1890
+ var objIsArr = isArray(object),
1891
+ othIsArr = isArray(other),
1892
+ objTag = objIsArr ? arrayTag : getTag(object),
1893
+ othTag = othIsArr ? arrayTag : getTag(other);
1894
+
1895
+ objTag = objTag == argsTag ? objectTag : objTag;
1896
+ othTag = othTag == argsTag ? objectTag : othTag;
1897
+
1898
+ var objIsObj = objTag == objectTag,
1899
+ othIsObj = othTag == objectTag,
1900
+ isSameTag = objTag == othTag;
1901
+
1902
+ if (isSameTag && isBuffer(object)) {
1903
+ if (!isBuffer(other)) {
1904
+ return false;
1905
+ }
1906
+ objIsArr = true;
1907
+ objIsObj = false;
1908
+ }
1909
+ if (isSameTag && !objIsObj) {
1910
+ stack || (stack = new Stack);
1911
+ return (objIsArr || isTypedArray(object))
1912
+ ? equalArrays(object, other, bitmask, customizer, equalFunc, stack)
1913
+ : equalByTag(object, other, objTag, bitmask, customizer, equalFunc, stack);
1914
+ }
1915
+ if (!(bitmask & COMPARE_PARTIAL_FLAG)) {
1916
+ var objIsWrapped = objIsObj && hasOwnProperty.call(object, '__wrapped__'),
1917
+ othIsWrapped = othIsObj && hasOwnProperty.call(other, '__wrapped__');
1918
+
1919
+ if (objIsWrapped || othIsWrapped) {
1920
+ var objUnwrapped = objIsWrapped ? object.value() : object,
1921
+ othUnwrapped = othIsWrapped ? other.value() : other;
1922
+
1923
+ stack || (stack = new Stack);
1924
+ return equalFunc(objUnwrapped, othUnwrapped, bitmask, customizer, stack);
1925
+ }
1926
+ }
1927
+ if (!isSameTag) {
1928
+ return false;
1929
+ }
1930
+ stack || (stack = new Stack);
1931
+ return equalObjects(object, other, bitmask, customizer, equalFunc, stack);
1932
+ }
1933
+
1934
+ /**
1935
+ * The base implementation of `_.isNative` without bad shim checks.
1936
+ *
1937
+ * @private
1938
+ * @param {*} value The value to check.
1939
+ * @returns {boolean} Returns `true` if `value` is a native function,
1940
+ * else `false`.
1941
+ */
1942
+ function baseIsNative(value) {
1943
+ if (!isObject(value) || isMasked(value)) {
1944
+ return false;
1945
+ }
1946
+ var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
1947
+ return pattern.test(toSource(value));
1948
+ }
1949
+
1950
+ /**
1951
+ * The base implementation of `_.isTypedArray` without Node.js optimizations.
1952
+ *
1953
+ * @private
1954
+ * @param {*} value The value to check.
1955
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
1956
+ */
1957
+ function baseIsTypedArray(value) {
1958
+ return isObjectLike(value) &&
1959
+ isLength(value.length) && !!typedArrayTags[baseGetTag(value)];
1960
+ }
1961
+
1962
+ /**
1963
+ * The base implementation of `_.keys` which doesn't treat sparse arrays as dense.
1964
+ *
1965
+ * @private
1966
+ * @param {Object} object The object to query.
1967
+ * @returns {Array} Returns the array of property names.
1968
+ */
1969
+ function baseKeys(object) {
1970
+ if (!isPrototype(object)) {
1971
+ return nativeKeys(object);
1972
+ }
1973
+ var result = [];
1974
+ for (var key in Object(object)) {
1975
+ if (hasOwnProperty.call(object, key) && key != 'constructor') {
1976
+ result.push(key);
1977
+ }
1978
+ }
1979
+ return result;
1980
+ }
1981
+
1982
+ /**
1983
+ * A specialized version of `baseIsEqualDeep` for arrays with support for
1984
+ * partial deep comparisons.
1985
+ *
1986
+ * @private
1987
+ * @param {Array} array The array to compare.
1988
+ * @param {Array} other The other array to compare.
1989
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
1990
+ * @param {Function} customizer The function to customize comparisons.
1991
+ * @param {Function} equalFunc The function to determine equivalents of values.
1992
+ * @param {Object} stack Tracks traversed `array` and `other` objects.
1993
+ * @returns {boolean} Returns `true` if the arrays are equivalent, else `false`.
1994
+ */
1995
+ function equalArrays(array, other, bitmask, customizer, equalFunc, stack) {
1996
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
1997
+ arrLength = array.length,
1998
+ othLength = other.length;
1999
+
2000
+ if (arrLength != othLength && !(isPartial && othLength > arrLength)) {
2001
+ return false;
2002
+ }
2003
+ // Assume cyclic values are equal.
2004
+ var stacked = stack.get(array);
2005
+ if (stacked && stack.get(other)) {
2006
+ return stacked == other;
2007
+ }
2008
+ var index = -1,
2009
+ result = true,
2010
+ seen = (bitmask & COMPARE_UNORDERED_FLAG) ? new SetCache : undefined;
2011
+
2012
+ stack.set(array, other);
2013
+ stack.set(other, array);
2014
+
2015
+ // Ignore non-index properties.
2016
+ while (++index < arrLength) {
2017
+ var arrValue = array[index],
2018
+ othValue = other[index];
2019
+
2020
+ if (customizer) {
2021
+ var compared = isPartial
2022
+ ? customizer(othValue, arrValue, index, other, array, stack)
2023
+ : customizer(arrValue, othValue, index, array, other, stack);
2024
+ }
2025
+ if (compared !== undefined) {
2026
+ if (compared) {
2027
+ continue;
2028
+ }
2029
+ result = false;
2030
+ break;
2031
+ }
2032
+ // Recursively compare arrays (susceptible to call stack limits).
2033
+ if (seen) {
2034
+ if (!arraySome(other, function(othValue, othIndex) {
2035
+ if (!cacheHas(seen, othIndex) &&
2036
+ (arrValue === othValue || equalFunc(arrValue, othValue, bitmask, customizer, stack))) {
2037
+ return seen.push(othIndex);
2038
+ }
2039
+ })) {
2040
+ result = false;
2041
+ break;
2042
+ }
2043
+ } else if (!(
2044
+ arrValue === othValue ||
2045
+ equalFunc(arrValue, othValue, bitmask, customizer, stack)
2046
+ )) {
2047
+ result = false;
2048
+ break;
2049
+ }
2050
+ }
2051
+ stack['delete'](array);
2052
+ stack['delete'](other);
2053
+ return result;
2054
+ }
2055
+
2056
+ /**
2057
+ * A specialized version of `baseIsEqualDeep` for comparing objects of
2058
+ * the same `toStringTag`.
2059
+ *
2060
+ * **Note:** This function only supports comparing values with tags of
2061
+ * `Boolean`, `Date`, `Error`, `Number`, `RegExp`, or `String`.
2062
+ *
2063
+ * @private
2064
+ * @param {Object} object The object to compare.
2065
+ * @param {Object} other The other object to compare.
2066
+ * @param {string} tag The `toStringTag` of the objects to compare.
2067
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
2068
+ * @param {Function} customizer The function to customize comparisons.
2069
+ * @param {Function} equalFunc The function to determine equivalents of values.
2070
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
2071
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
2072
+ */
2073
+ function equalByTag(object, other, tag, bitmask, customizer, equalFunc, stack) {
2074
+ switch (tag) {
2075
+ case dataViewTag:
2076
+ if ((object.byteLength != other.byteLength) ||
2077
+ (object.byteOffset != other.byteOffset)) {
2078
+ return false;
2079
+ }
2080
+ object = object.buffer;
2081
+ other = other.buffer;
2082
+
2083
+ case arrayBufferTag:
2084
+ if ((object.byteLength != other.byteLength) ||
2085
+ !equalFunc(new Uint8Array(object), new Uint8Array(other))) {
2086
+ return false;
2087
+ }
2088
+ return true;
2089
+
2090
+ case boolTag:
2091
+ case dateTag:
2092
+ case numberTag:
2093
+ // Coerce booleans to `1` or `0` and dates to milliseconds.
2094
+ // Invalid dates are coerced to `NaN`.
2095
+ return eq(+object, +other);
2096
+
2097
+ case errorTag:
2098
+ return object.name == other.name && object.message == other.message;
2099
+
2100
+ case regexpTag:
2101
+ case stringTag:
2102
+ // Coerce regexes to strings and treat strings, primitives and objects,
2103
+ // as equal. See http://www.ecma-international.org/ecma-262/7.0/#sec-regexp.prototype.tostring
2104
+ // for more details.
2105
+ return object == (other + '');
2106
+
2107
+ case mapTag:
2108
+ var convert = mapToArray;
2109
+
2110
+ case setTag:
2111
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG;
2112
+ convert || (convert = setToArray);
2113
+
2114
+ if (object.size != other.size && !isPartial) {
2115
+ return false;
2116
+ }
2117
+ // Assume cyclic values are equal.
2118
+ var stacked = stack.get(object);
2119
+ if (stacked) {
2120
+ return stacked == other;
2121
+ }
2122
+ bitmask |= COMPARE_UNORDERED_FLAG;
2123
+
2124
+ // Recursively compare objects (susceptible to call stack limits).
2125
+ stack.set(object, other);
2126
+ var result = equalArrays(convert(object), convert(other), bitmask, customizer, equalFunc, stack);
2127
+ stack['delete'](object);
2128
+ return result;
2129
+
2130
+ case symbolTag:
2131
+ if (symbolValueOf) {
2132
+ return symbolValueOf.call(object) == symbolValueOf.call(other);
2133
+ }
2134
+ }
2135
+ return false;
2136
+ }
2137
+
2138
+ /**
2139
+ * A specialized version of `baseIsEqualDeep` for objects with support for
2140
+ * partial deep comparisons.
2141
+ *
2142
+ * @private
2143
+ * @param {Object} object The object to compare.
2144
+ * @param {Object} other The other object to compare.
2145
+ * @param {number} bitmask The bitmask flags. See `baseIsEqual` for more details.
2146
+ * @param {Function} customizer The function to customize comparisons.
2147
+ * @param {Function} equalFunc The function to determine equivalents of values.
2148
+ * @param {Object} stack Tracks traversed `object` and `other` objects.
2149
+ * @returns {boolean} Returns `true` if the objects are equivalent, else `false`.
2150
+ */
2151
+ function equalObjects(object, other, bitmask, customizer, equalFunc, stack) {
2152
+ var isPartial = bitmask & COMPARE_PARTIAL_FLAG,
2153
+ objProps = getAllKeys(object),
2154
+ objLength = objProps.length,
2155
+ othProps = getAllKeys(other),
2156
+ othLength = othProps.length;
2157
+
2158
+ if (objLength != othLength && !isPartial) {
2159
+ return false;
2160
+ }
2161
+ var index = objLength;
2162
+ while (index--) {
2163
+ var key = objProps[index];
2164
+ if (!(isPartial ? key in other : hasOwnProperty.call(other, key))) {
2165
+ return false;
2166
+ }
2167
+ }
2168
+ // Assume cyclic values are equal.
2169
+ var stacked = stack.get(object);
2170
+ if (stacked && stack.get(other)) {
2171
+ return stacked == other;
2172
+ }
2173
+ var result = true;
2174
+ stack.set(object, other);
2175
+ stack.set(other, object);
2176
+
2177
+ var skipCtor = isPartial;
2178
+ while (++index < objLength) {
2179
+ key = objProps[index];
2180
+ var objValue = object[key],
2181
+ othValue = other[key];
2182
+
2183
+ if (customizer) {
2184
+ var compared = isPartial
2185
+ ? customizer(othValue, objValue, key, other, object, stack)
2186
+ : customizer(objValue, othValue, key, object, other, stack);
2187
+ }
2188
+ // Recursively compare objects (susceptible to call stack limits).
2189
+ if (!(compared === undefined
2190
+ ? (objValue === othValue || equalFunc(objValue, othValue, bitmask, customizer, stack))
2191
+ : compared
2192
+ )) {
2193
+ result = false;
2194
+ break;
2195
+ }
2196
+ skipCtor || (skipCtor = key == 'constructor');
2197
+ }
2198
+ if (result && !skipCtor) {
2199
+ var objCtor = object.constructor,
2200
+ othCtor = other.constructor;
2201
+
2202
+ // Non `Object` object instances with different constructors are not equal.
2203
+ if (objCtor != othCtor &&
2204
+ ('constructor' in object && 'constructor' in other) &&
2205
+ !(typeof objCtor == 'function' && objCtor instanceof objCtor &&
2206
+ typeof othCtor == 'function' && othCtor instanceof othCtor)) {
2207
+ result = false;
2208
+ }
2209
+ }
2210
+ stack['delete'](object);
2211
+ stack['delete'](other);
2212
+ return result;
2213
+ }
2214
+
2215
+ /**
2216
+ * Creates an array of own enumerable property names and symbols of `object`.
2217
+ *
2218
+ * @private
2219
+ * @param {Object} object The object to query.
2220
+ * @returns {Array} Returns the array of property names and symbols.
2221
+ */
2222
+ function getAllKeys(object) {
2223
+ return baseGetAllKeys(object, keys, getSymbols);
2224
+ }
2225
+
2226
+ /**
2227
+ * Gets the data for `map`.
2228
+ *
2229
+ * @private
2230
+ * @param {Object} map The map to query.
2231
+ * @param {string} key The reference key.
2232
+ * @returns {*} Returns the map data.
2233
+ */
2234
+ function getMapData(map, key) {
2235
+ var data = map.__data__;
2236
+ return isKeyable(key)
2237
+ ? data[typeof key == 'string' ? 'string' : 'hash']
2238
+ : data.map;
2239
+ }
2240
+
2241
+ /**
2242
+ * Gets the native function at `key` of `object`.
2243
+ *
2244
+ * @private
2245
+ * @param {Object} object The object to query.
2246
+ * @param {string} key The key of the method to get.
2247
+ * @returns {*} Returns the function if it's native, else `undefined`.
2248
+ */
2249
+ function getNative(object, key) {
2250
+ var value = getValue(object, key);
2251
+ return baseIsNative(value) ? value : undefined;
2252
+ }
2253
+
2254
+ /**
2255
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
2256
+ *
2257
+ * @private
2258
+ * @param {*} value The value to query.
2259
+ * @returns {string} Returns the raw `toStringTag`.
2260
+ */
2261
+ function getRawTag(value) {
2262
+ var isOwn = hasOwnProperty.call(value, symToStringTag),
2263
+ tag = value[symToStringTag];
2264
+
2265
+ try {
2266
+ value[symToStringTag] = undefined;
2267
+ var unmasked = true;
2268
+ } catch (e) {}
2269
+
2270
+ var result = nativeObjectToString.call(value);
2271
+ if (unmasked) {
2272
+ if (isOwn) {
2273
+ value[symToStringTag] = tag;
2274
+ } else {
2275
+ delete value[symToStringTag];
2276
+ }
2277
+ }
2278
+ return result;
2279
+ }
2280
+
2281
+ /**
2282
+ * Creates an array of the own enumerable symbols of `object`.
2283
+ *
2284
+ * @private
2285
+ * @param {Object} object The object to query.
2286
+ * @returns {Array} Returns the array of symbols.
2287
+ */
2288
+ var getSymbols = !nativeGetSymbols ? stubArray : function(object) {
2289
+ if (object == null) {
2290
+ return [];
2291
+ }
2292
+ object = Object(object);
2293
+ return arrayFilter(nativeGetSymbols(object), function(symbol) {
2294
+ return propertyIsEnumerable.call(object, symbol);
2295
+ });
2296
+ };
2297
+
2298
+ /**
2299
+ * Gets the `toStringTag` of `value`.
2300
+ *
2301
+ * @private
2302
+ * @param {*} value The value to query.
2303
+ * @returns {string} Returns the `toStringTag`.
2304
+ */
2305
+ var getTag = baseGetTag;
2306
+
2307
+ // Fallback for data views, maps, sets, and weak maps in IE 11 and promises in Node.js < 6.
2308
+ if ((DataView && getTag(new DataView(new ArrayBuffer(1))) != dataViewTag) ||
2309
+ (Map && getTag(new Map) != mapTag) ||
2310
+ (Promise && getTag(Promise.resolve()) != promiseTag) ||
2311
+ (Set && getTag(new Set) != setTag) ||
2312
+ (WeakMap && getTag(new WeakMap) != weakMapTag)) {
2313
+ getTag = function(value) {
2314
+ var result = baseGetTag(value),
2315
+ Ctor = result == objectTag ? value.constructor : undefined,
2316
+ ctorString = Ctor ? toSource(Ctor) : '';
2317
+
2318
+ if (ctorString) {
2319
+ switch (ctorString) {
2320
+ case dataViewCtorString: return dataViewTag;
2321
+ case mapCtorString: return mapTag;
2322
+ case promiseCtorString: return promiseTag;
2323
+ case setCtorString: return setTag;
2324
+ case weakMapCtorString: return weakMapTag;
2325
+ }
2326
+ }
2327
+ return result;
2328
+ };
2329
+ }
2330
+
2331
+ /**
2332
+ * Checks if `value` is a valid array-like index.
2333
+ *
2334
+ * @private
2335
+ * @param {*} value The value to check.
2336
+ * @param {number} [length=MAX_SAFE_INTEGER] The upper bounds of a valid index.
2337
+ * @returns {boolean} Returns `true` if `value` is a valid index, else `false`.
2338
+ */
2339
+ function isIndex(value, length) {
2340
+ length = length == null ? MAX_SAFE_INTEGER : length;
2341
+ return !!length &&
2342
+ (typeof value == 'number' || reIsUint.test(value)) &&
2343
+ (value > -1 && value % 1 == 0 && value < length);
2344
+ }
2345
+
2346
+ /**
2347
+ * Checks if `value` is suitable for use as unique object key.
2348
+ *
2349
+ * @private
2350
+ * @param {*} value The value to check.
2351
+ * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
2352
+ */
2353
+ function isKeyable(value) {
2354
+ var type = typeof value;
2355
+ return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
2356
+ ? (value !== '__proto__')
2357
+ : (value === null);
2358
+ }
2359
+
2360
+ /**
2361
+ * Checks if `func` has its source masked.
2362
+ *
2363
+ * @private
2364
+ * @param {Function} func The function to check.
2365
+ * @returns {boolean} Returns `true` if `func` is masked, else `false`.
2366
+ */
2367
+ function isMasked(func) {
2368
+ return !!maskSrcKey && (maskSrcKey in func);
2369
+ }
2370
+
2371
+ /**
2372
+ * Checks if `value` is likely a prototype object.
2373
+ *
2374
+ * @private
2375
+ * @param {*} value The value to check.
2376
+ * @returns {boolean} Returns `true` if `value` is a prototype, else `false`.
2377
+ */
2378
+ function isPrototype(value) {
2379
+ var Ctor = value && value.constructor,
2380
+ proto = (typeof Ctor == 'function' && Ctor.prototype) || objectProto;
2381
+
2382
+ return value === proto;
2383
+ }
2384
+
2385
+ /**
2386
+ * Converts `value` to a string using `Object.prototype.toString`.
2387
+ *
2388
+ * @private
2389
+ * @param {*} value The value to convert.
2390
+ * @returns {string} Returns the converted string.
2391
+ */
2392
+ function objectToString(value) {
2393
+ return nativeObjectToString.call(value);
2394
+ }
2395
+
2396
+ /**
2397
+ * Converts `func` to its source code.
2398
+ *
2399
+ * @private
2400
+ * @param {Function} func The function to convert.
2401
+ * @returns {string} Returns the source code.
2402
+ */
2403
+ function toSource(func) {
2404
+ if (func != null) {
2405
+ try {
2406
+ return funcToString.call(func);
2407
+ } catch (e) {}
2408
+ try {
2409
+ return (func + '');
2410
+ } catch (e) {}
2411
+ }
2412
+ return '';
2413
+ }
2414
+
2415
+ /**
2416
+ * Performs a
2417
+ * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
2418
+ * comparison between two values to determine if they are equivalent.
2419
+ *
2420
+ * @static
2421
+ * @memberOf _
2422
+ * @since 4.0.0
2423
+ * @category Lang
2424
+ * @param {*} value The value to compare.
2425
+ * @param {*} other The other value to compare.
2426
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
2427
+ * @example
2428
+ *
2429
+ * var object = { 'a': 1 };
2430
+ * var other = { 'a': 1 };
2431
+ *
2432
+ * _.eq(object, object);
2433
+ * // => true
2434
+ *
2435
+ * _.eq(object, other);
2436
+ * // => false
2437
+ *
2438
+ * _.eq('a', 'a');
2439
+ * // => true
2440
+ *
2441
+ * _.eq('a', Object('a'));
2442
+ * // => false
2443
+ *
2444
+ * _.eq(NaN, NaN);
2445
+ * // => true
2446
+ */
2447
+ function eq(value, other) {
2448
+ return value === other || (value !== value && other !== other);
2449
+ }
2450
+
2451
+ /**
2452
+ * Checks if `value` is likely an `arguments` object.
2453
+ *
2454
+ * @static
2455
+ * @memberOf _
2456
+ * @since 0.1.0
2457
+ * @category Lang
2458
+ * @param {*} value The value to check.
2459
+ * @returns {boolean} Returns `true` if `value` is an `arguments` object,
2460
+ * else `false`.
2461
+ * @example
2462
+ *
2463
+ * _.isArguments(function() { return arguments; }());
2464
+ * // => true
2465
+ *
2466
+ * _.isArguments([1, 2, 3]);
2467
+ * // => false
2468
+ */
2469
+ var isArguments = baseIsArguments(function() { return arguments; }()) ? baseIsArguments : function(value) {
2470
+ return isObjectLike(value) && hasOwnProperty.call(value, 'callee') &&
2471
+ !propertyIsEnumerable.call(value, 'callee');
2472
+ };
2473
+
2474
+ /**
2475
+ * Checks if `value` is classified as an `Array` object.
2476
+ *
2477
+ * @static
2478
+ * @memberOf _
2479
+ * @since 0.1.0
2480
+ * @category Lang
2481
+ * @param {*} value The value to check.
2482
+ * @returns {boolean} Returns `true` if `value` is an array, else `false`.
2483
+ * @example
2484
+ *
2485
+ * _.isArray([1, 2, 3]);
2486
+ * // => true
2487
+ *
2488
+ * _.isArray(document.body.children);
2489
+ * // => false
2490
+ *
2491
+ * _.isArray('abc');
2492
+ * // => false
2493
+ *
2494
+ * _.isArray(_.noop);
2495
+ * // => false
2496
+ */
2497
+ var isArray = Array.isArray;
2498
+
2499
+ /**
2500
+ * Checks if `value` is array-like. A value is considered array-like if it's
2501
+ * not a function and has a `value.length` that's an integer greater than or
2502
+ * equal to `0` and less than or equal to `Number.MAX_SAFE_INTEGER`.
2503
+ *
2504
+ * @static
2505
+ * @memberOf _
2506
+ * @since 4.0.0
2507
+ * @category Lang
2508
+ * @param {*} value The value to check.
2509
+ * @returns {boolean} Returns `true` if `value` is array-like, else `false`.
2510
+ * @example
2511
+ *
2512
+ * _.isArrayLike([1, 2, 3]);
2513
+ * // => true
2514
+ *
2515
+ * _.isArrayLike(document.body.children);
2516
+ * // => true
2517
+ *
2518
+ * _.isArrayLike('abc');
2519
+ * // => true
2520
+ *
2521
+ * _.isArrayLike(_.noop);
2522
+ * // => false
2523
+ */
2524
+ function isArrayLike(value) {
2525
+ return value != null && isLength(value.length) && !isFunction(value);
2526
+ }
2527
+
2528
+ /**
2529
+ * Checks if `value` is a buffer.
2530
+ *
2531
+ * @static
2532
+ * @memberOf _
2533
+ * @since 4.3.0
2534
+ * @category Lang
2535
+ * @param {*} value The value to check.
2536
+ * @returns {boolean} Returns `true` if `value` is a buffer, else `false`.
2537
+ * @example
2538
+ *
2539
+ * _.isBuffer(new Buffer(2));
2540
+ * // => true
2541
+ *
2542
+ * _.isBuffer(new Uint8Array(2));
2543
+ * // => false
2544
+ */
2545
+ var isBuffer = nativeIsBuffer || stubFalse;
2546
+
2547
+ /**
2548
+ * Performs a deep comparison between two values to determine if they are
2549
+ * equivalent.
2550
+ *
2551
+ * **Note:** This method supports comparing arrays, array buffers, booleans,
2552
+ * date objects, error objects, maps, numbers, `Object` objects, regexes,
2553
+ * sets, strings, symbols, and typed arrays. `Object` objects are compared
2554
+ * by their own, not inherited, enumerable properties. Functions and DOM
2555
+ * nodes are compared by strict equality, i.e. `===`.
2556
+ *
2557
+ * @static
2558
+ * @memberOf _
2559
+ * @since 0.1.0
2560
+ * @category Lang
2561
+ * @param {*} value The value to compare.
2562
+ * @param {*} other The other value to compare.
2563
+ * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
2564
+ * @example
2565
+ *
2566
+ * var object = { 'a': 1 };
2567
+ * var other = { 'a': 1 };
2568
+ *
2569
+ * _.isEqual(object, other);
2570
+ * // => true
2571
+ *
2572
+ * object === other;
2573
+ * // => false
2574
+ */
2575
+ function isEqual(value, other) {
2576
+ return baseIsEqual(value, other);
2577
+ }
2578
+
2579
+ /**
2580
+ * Checks if `value` is classified as a `Function` object.
2581
+ *
2582
+ * @static
2583
+ * @memberOf _
2584
+ * @since 0.1.0
2585
+ * @category Lang
2586
+ * @param {*} value The value to check.
2587
+ * @returns {boolean} Returns `true` if `value` is a function, else `false`.
2588
+ * @example
2589
+ *
2590
+ * _.isFunction(_);
2591
+ * // => true
2592
+ *
2593
+ * _.isFunction(/abc/);
2594
+ * // => false
2595
+ */
2596
+ function isFunction(value) {
2597
+ if (!isObject(value)) {
2598
+ return false;
2599
+ }
2600
+ // The use of `Object#toString` avoids issues with the `typeof` operator
2601
+ // in Safari 9 which returns 'object' for typed arrays and other constructors.
2602
+ var tag = baseGetTag(value);
2603
+ return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
2604
+ }
2605
+
2606
+ /**
2607
+ * Checks if `value` is a valid array-like length.
2608
+ *
2609
+ * **Note:** This method is loosely based on
2610
+ * [`ToLength`](http://ecma-international.org/ecma-262/7.0/#sec-tolength).
2611
+ *
2612
+ * @static
2613
+ * @memberOf _
2614
+ * @since 4.0.0
2615
+ * @category Lang
2616
+ * @param {*} value The value to check.
2617
+ * @returns {boolean} Returns `true` if `value` is a valid length, else `false`.
2618
+ * @example
2619
+ *
2620
+ * _.isLength(3);
2621
+ * // => true
2622
+ *
2623
+ * _.isLength(Number.MIN_VALUE);
2624
+ * // => false
2625
+ *
2626
+ * _.isLength(Infinity);
2627
+ * // => false
2628
+ *
2629
+ * _.isLength('3');
2630
+ * // => false
2631
+ */
2632
+ function isLength(value) {
2633
+ return typeof value == 'number' &&
2634
+ value > -1 && value % 1 == 0 && value <= MAX_SAFE_INTEGER;
2635
+ }
2636
+
2637
+ /**
2638
+ * Checks if `value` is the
2639
+ * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
2640
+ * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
2641
+ *
2642
+ * @static
2643
+ * @memberOf _
2644
+ * @since 0.1.0
2645
+ * @category Lang
2646
+ * @param {*} value The value to check.
2647
+ * @returns {boolean} Returns `true` if `value` is an object, else `false`.
2648
+ * @example
2649
+ *
2650
+ * _.isObject({});
2651
+ * // => true
2652
+ *
2653
+ * _.isObject([1, 2, 3]);
2654
+ * // => true
2655
+ *
2656
+ * _.isObject(_.noop);
2657
+ * // => true
2658
+ *
2659
+ * _.isObject(null);
2660
+ * // => false
2661
+ */
2662
+ function isObject(value) {
2663
+ var type = typeof value;
2664
+ return value != null && (type == 'object' || type == 'function');
2665
+ }
2666
+
2667
+ /**
2668
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
2669
+ * and has a `typeof` result of "object".
2670
+ *
2671
+ * @static
2672
+ * @memberOf _
2673
+ * @since 4.0.0
2674
+ * @category Lang
2675
+ * @param {*} value The value to check.
2676
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
2677
+ * @example
2678
+ *
2679
+ * _.isObjectLike({});
2680
+ * // => true
2681
+ *
2682
+ * _.isObjectLike([1, 2, 3]);
2683
+ * // => true
2684
+ *
2685
+ * _.isObjectLike(_.noop);
2686
+ * // => false
2687
+ *
2688
+ * _.isObjectLike(null);
2689
+ * // => false
2690
+ */
2691
+ function isObjectLike(value) {
2692
+ return value != null && typeof value == 'object';
2693
+ }
2694
+
2695
+ /**
2696
+ * Checks if `value` is classified as a typed array.
2697
+ *
2698
+ * @static
2699
+ * @memberOf _
2700
+ * @since 3.0.0
2701
+ * @category Lang
2702
+ * @param {*} value The value to check.
2703
+ * @returns {boolean} Returns `true` if `value` is a typed array, else `false`.
2704
+ * @example
2705
+ *
2706
+ * _.isTypedArray(new Uint8Array);
2707
+ * // => true
2708
+ *
2709
+ * _.isTypedArray([]);
2710
+ * // => false
2711
+ */
2712
+ var isTypedArray = nodeIsTypedArray ? baseUnary(nodeIsTypedArray) : baseIsTypedArray;
2713
+
2714
+ /**
2715
+ * Creates an array of the own enumerable property names of `object`.
2716
+ *
2717
+ * **Note:** Non-object values are coerced to objects. See the
2718
+ * [ES spec](http://ecma-international.org/ecma-262/7.0/#sec-object.keys)
2719
+ * for more details.
2720
+ *
2721
+ * @static
2722
+ * @since 0.1.0
2723
+ * @memberOf _
2724
+ * @category Object
2725
+ * @param {Object} object The object to query.
2726
+ * @returns {Array} Returns the array of property names.
2727
+ * @example
2728
+ *
2729
+ * function Foo() {
2730
+ * this.a = 1;
2731
+ * this.b = 2;
2732
+ * }
2733
+ *
2734
+ * Foo.prototype.c = 3;
2735
+ *
2736
+ * _.keys(new Foo);
2737
+ * // => ['a', 'b'] (iteration order is not guaranteed)
2738
+ *
2739
+ * _.keys('hi');
2740
+ * // => ['0', '1']
2741
+ */
2742
+ function keys(object) {
2743
+ return isArrayLike(object) ? arrayLikeKeys(object) : baseKeys(object);
2744
+ }
2745
+
2746
+ /**
2747
+ * This method returns a new empty array.
2748
+ *
2749
+ * @static
2750
+ * @memberOf _
2751
+ * @since 4.13.0
2752
+ * @category Util
2753
+ * @returns {Array} Returns the new empty array.
2754
+ * @example
2755
+ *
2756
+ * var arrays = _.times(2, _.stubArray);
2757
+ *
2758
+ * console.log(arrays);
2759
+ * // => [[], []]
2760
+ *
2761
+ * console.log(arrays[0] === arrays[1]);
2762
+ * // => false
2763
+ */
2764
+ function stubArray() {
2765
+ return [];
2766
+ }
2767
+
2768
+ /**
2769
+ * This method returns `false`.
2770
+ *
2771
+ * @static
2772
+ * @memberOf _
2773
+ * @since 4.13.0
2774
+ * @category Util
2775
+ * @returns {boolean} Returns `false`.
2776
+ * @example
2777
+ *
2778
+ * _.times(2, _.stubFalse);
2779
+ * // => [false, false]
2780
+ */
2781
+ function stubFalse() {
2782
+ return false;
2783
+ }
2784
+
2785
+ module.exports = isEqual;
2786
+
2787
+ }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
2788
+ },{}],3:[function(require,module,exports){
937
2789
  // shim for using process in browser
938
2790
  var process = module.exports = {};
939
2791
 
@@ -1104,6 +2956,10 @@ process.off = noop;
1104
2956
  process.removeListener = noop;
1105
2957
  process.removeAllListeners = noop;
1106
2958
  process.emit = noop;
2959
+ process.prependListener = noop;
2960
+ process.prependOnceListener = noop;
2961
+
2962
+ process.listeners = function (name) { return [] }
1107
2963
 
1108
2964
  process.binding = function (name) {
1109
2965
  throw new Error('process.binding is not supported');
@@ -1115,7 +2971,7 @@ process.chdir = function (dir) {
1115
2971
  };
1116
2972
  process.umask = function() { return 0; };
1117
2973
 
1118
- },{}],3:[function(require,module,exports){
2974
+ },{}],4:[function(require,module,exports){
1119
2975
  'use strict';
1120
2976
 
1121
2977
  Object.defineProperty(exports, "__esModule", {
@@ -1242,17 +3098,25 @@ var _isHexColor = require('./lib/isHexColor');
1242
3098
 
1243
3099
  var _isHexColor2 = _interopRequireDefault(_isHexColor);
1244
3100
 
3101
+ var _isISRC = require('./lib/isISRC');
3102
+
3103
+ var _isISRC2 = _interopRequireDefault(_isISRC);
3104
+
1245
3105
  var _isMD = require('./lib/isMD5');
1246
3106
 
1247
3107
  var _isMD2 = _interopRequireDefault(_isMD);
1248
3108
 
3109
+ var _isHash = require('./lib/isHash');
3110
+
3111
+ var _isHash2 = _interopRequireDefault(_isHash);
3112
+
1249
3113
  var _isJSON = require('./lib/isJSON');
1250
3114
 
1251
3115
  var _isJSON2 = _interopRequireDefault(_isJSON);
1252
3116
 
1253
- var _isNull = require('./lib/isNull');
3117
+ var _isEmpty = require('./lib/isEmpty');
1254
3118
 
1255
- var _isNull2 = _interopRequireDefault(_isNull);
3119
+ var _isEmpty2 = _interopRequireDefault(_isEmpty);
1256
3120
 
1257
3121
  var _isLength = require('./lib/isLength');
1258
3122
 
@@ -1270,10 +3134,6 @@ var _isMongoId = require('./lib/isMongoId');
1270
3134
 
1271
3135
  var _isMongoId2 = _interopRequireDefault(_isMongoId);
1272
3136
 
1273
- var _isDate = require('./lib/isDate');
1274
-
1275
- var _isDate2 = _interopRequireDefault(_isDate);
1276
-
1277
3137
  var _isAfter = require('./lib/isAfter');
1278
3138
 
1279
3139
  var _isAfter2 = _interopRequireDefault(_isAfter);
@@ -1298,6 +3158,10 @@ var _isISBN = require('./lib/isISBN');
1298
3158
 
1299
3159
  var _isISBN2 = _interopRequireDefault(_isISBN);
1300
3160
 
3161
+ var _isISSN = require('./lib/isISSN');
3162
+
3163
+ var _isISSN2 = _interopRequireDefault(_isISSN);
3164
+
1301
3165
  var _isMobilePhone = require('./lib/isMobilePhone');
1302
3166
 
1303
3167
  var _isMobilePhone2 = _interopRequireDefault(_isMobilePhone);
@@ -1318,6 +3182,14 @@ var _isDataURI = require('./lib/isDataURI');
1318
3182
 
1319
3183
  var _isDataURI2 = _interopRequireDefault(_isDataURI);
1320
3184
 
3185
+ var _isLatLong = require('./lib/isLatLong');
3186
+
3187
+ var _isLatLong2 = _interopRequireDefault(_isLatLong);
3188
+
3189
+ var _isPostalCode = require('./lib/isPostalCode');
3190
+
3191
+ var _isPostalCode2 = _interopRequireDefault(_isPostalCode);
3192
+
1321
3193
  var _ltrim = require('./lib/ltrim');
1322
3194
 
1323
3195
  var _ltrim2 = _interopRequireDefault(_ltrim);
@@ -1364,37 +3236,71 @@ var _toString2 = _interopRequireDefault(_toString);
1364
3236
 
1365
3237
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1366
3238
 
1367
- var version = '5.7.0';
3239
+ var version = '8.2.0';
1368
3240
 
1369
3241
  var validator = {
1370
3242
  version: version,
1371
3243
  toDate: _toDate2.default,
1372
- toFloat: _toFloat2.default, toInt: _toInt2.default,
3244
+ toFloat: _toFloat2.default,
3245
+ toInt: _toInt2.default,
1373
3246
  toBoolean: _toBoolean2.default,
1374
- equals: _equals2.default, contains: _contains2.default, matches: _matches2.default,
1375
- isEmail: _isEmail2.default, isURL: _isURL2.default, isMACAddress: _isMACAddress2.default, isIP: _isIP2.default, isFQDN: _isFQDN2.default,
3247
+ equals: _equals2.default,
3248
+ contains: _contains2.default,
3249
+ matches: _matches2.default,
3250
+ isEmail: _isEmail2.default,
3251
+ isURL: _isURL2.default,
3252
+ isMACAddress: _isMACAddress2.default,
3253
+ isIP: _isIP2.default,
3254
+ isFQDN: _isFQDN2.default,
1376
3255
  isBoolean: _isBoolean2.default,
1377
- isAlpha: _isAlpha2.default, isAlphanumeric: _isAlphanumeric2.default, isNumeric: _isNumeric2.default, isLowercase: _isLowercase2.default, isUppercase: _isUppercase2.default,
1378
- isAscii: _isAscii2.default, isFullWidth: _isFullWidth2.default, isHalfWidth: _isHalfWidth2.default, isVariableWidth: _isVariableWidth2.default,
1379
- isMultibyte: _isMultibyte2.default, isSurrogatePair: _isSurrogatePair2.default,
1380
- isInt: _isInt2.default, isFloat: _isFloat2.default, isDecimal: _isDecimal2.default, isHexadecimal: _isHexadecimal2.default, isDivisibleBy: _isDivisibleBy2.default,
3256
+ isAlpha: _isAlpha2.default,
3257
+ isAlphanumeric: _isAlphanumeric2.default,
3258
+ isNumeric: _isNumeric2.default,
3259
+ isLowercase: _isLowercase2.default,
3260
+ isUppercase: _isUppercase2.default,
3261
+ isAscii: _isAscii2.default,
3262
+ isFullWidth: _isFullWidth2.default,
3263
+ isHalfWidth: _isHalfWidth2.default,
3264
+ isVariableWidth: _isVariableWidth2.default,
3265
+ isMultibyte: _isMultibyte2.default,
3266
+ isSurrogatePair: _isSurrogatePair2.default,
3267
+ isInt: _isInt2.default,
3268
+ isFloat: _isFloat2.default,
3269
+ isDecimal: _isDecimal2.default,
3270
+ isHexadecimal: _isHexadecimal2.default,
3271
+ isDivisibleBy: _isDivisibleBy2.default,
1381
3272
  isHexColor: _isHexColor2.default,
3273
+ isISRC: _isISRC2.default,
1382
3274
  isMD5: _isMD2.default,
3275
+ isHash: _isHash2.default,
1383
3276
  isJSON: _isJSON2.default,
1384
- isNull: _isNull2.default,
1385
- isLength: _isLength2.default, isByteLength: _isByteLength2.default,
1386
- isUUID: _isUUID2.default, isMongoId: _isMongoId2.default,
1387
- isDate: _isDate2.default, isAfter: _isAfter2.default, isBefore: _isBefore2.default,
3277
+ isEmpty: _isEmpty2.default,
3278
+ isLength: _isLength2.default,
3279
+ isByteLength: _isByteLength2.default,
3280
+ isUUID: _isUUID2.default,
3281
+ isMongoId: _isMongoId2.default,
3282
+ isAfter: _isAfter2.default,
3283
+ isBefore: _isBefore2.default,
1388
3284
  isIn: _isIn2.default,
1389
3285
  isCreditCard: _isCreditCard2.default,
1390
- isISIN: _isISIN2.default, isISBN: _isISBN2.default,
3286
+ isISIN: _isISIN2.default,
3287
+ isISBN: _isISBN2.default,
3288
+ isISSN: _isISSN2.default,
1391
3289
  isMobilePhone: _isMobilePhone2.default,
3290
+ isPostalCode: _isPostalCode2.default,
1392
3291
  isCurrency: _isCurrency2.default,
1393
3292
  isISO8601: _isISO2.default,
1394
- isBase64: _isBase2.default, isDataURI: _isDataURI2.default,
1395
- ltrim: _ltrim2.default, rtrim: _rtrim2.default, trim: _trim2.default,
1396
- escape: _escape2.default, unescape: _unescape2.default, stripLow: _stripLow2.default,
1397
- whitelist: _whitelist2.default, blacklist: _blacklist2.default,
3293
+ isBase64: _isBase2.default,
3294
+ isDataURI: _isDataURI2.default,
3295
+ isLatLong: _isLatLong2.default,
3296
+ ltrim: _ltrim2.default,
3297
+ rtrim: _rtrim2.default,
3298
+ trim: _trim2.default,
3299
+ escape: _escape2.default,
3300
+ unescape: _unescape2.default,
3301
+ stripLow: _stripLow2.default,
3302
+ whitelist: _whitelist2.default,
3303
+ blacklist: _blacklist2.default,
1398
3304
  isWhitelisted: _isWhitelisted2.default,
1399
3305
  normalizeEmail: _normalizeEmail2.default,
1400
3306
  toString: _toString2.default
@@ -1402,7 +3308,7 @@ var validator = {
1402
3308
 
1403
3309
  exports.default = validator;
1404
3310
  module.exports = exports['default'];
1405
- },{"./lib/blacklist":5,"./lib/contains":6,"./lib/equals":7,"./lib/escape":8,"./lib/isAfter":9,"./lib/isAlpha":10,"./lib/isAlphanumeric":11,"./lib/isAscii":12,"./lib/isBase64":13,"./lib/isBefore":14,"./lib/isBoolean":15,"./lib/isByteLength":16,"./lib/isCreditCard":17,"./lib/isCurrency":18,"./lib/isDataURI":19,"./lib/isDate":20,"./lib/isDecimal":21,"./lib/isDivisibleBy":22,"./lib/isEmail":23,"./lib/isFQDN":24,"./lib/isFloat":25,"./lib/isFullWidth":26,"./lib/isHalfWidth":27,"./lib/isHexColor":28,"./lib/isHexadecimal":29,"./lib/isIP":30,"./lib/isISBN":31,"./lib/isISIN":32,"./lib/isISO8601":33,"./lib/isIn":34,"./lib/isInt":35,"./lib/isJSON":36,"./lib/isLength":37,"./lib/isLowercase":38,"./lib/isMACAddress":39,"./lib/isMD5":40,"./lib/isMobilePhone":41,"./lib/isMongoId":42,"./lib/isMultibyte":43,"./lib/isNull":44,"./lib/isNumeric":45,"./lib/isSurrogatePair":46,"./lib/isURL":47,"./lib/isUUID":48,"./lib/isUppercase":49,"./lib/isVariableWidth":50,"./lib/isWhitelisted":51,"./lib/ltrim":52,"./lib/matches":53,"./lib/normalizeEmail":54,"./lib/rtrim":55,"./lib/stripLow":56,"./lib/toBoolean":57,"./lib/toDate":58,"./lib/toFloat":59,"./lib/toInt":60,"./lib/trim":61,"./lib/unescape":62,"./lib/util/toString":65,"./lib/whitelist":66}],4:[function(require,module,exports){
3311
+ },{"./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/isBase64":14,"./lib/isBefore":15,"./lib/isBoolean":16,"./lib/isByteLength":17,"./lib/isCreditCard":18,"./lib/isCurrency":19,"./lib/isDataURI":20,"./lib/isDecimal":21,"./lib/isDivisibleBy":22,"./lib/isEmail":23,"./lib/isEmpty":24,"./lib/isFQDN":25,"./lib/isFloat":26,"./lib/isFullWidth":27,"./lib/isHalfWidth":28,"./lib/isHash":29,"./lib/isHexColor":30,"./lib/isHexadecimal":31,"./lib/isIP":32,"./lib/isISBN":33,"./lib/isISIN":34,"./lib/isISO8601":35,"./lib/isISRC":36,"./lib/isISSN":37,"./lib/isIn":38,"./lib/isInt":39,"./lib/isJSON":40,"./lib/isLatLong":41,"./lib/isLength":42,"./lib/isLowercase":43,"./lib/isMACAddress":44,"./lib/isMD5":45,"./lib/isMobilePhone":46,"./lib/isMongoId":47,"./lib/isMultibyte":48,"./lib/isNumeric":49,"./lib/isPostalCode":50,"./lib/isSurrogatePair":51,"./lib/isURL":52,"./lib/isUUID":53,"./lib/isUppercase":54,"./lib/isVariableWidth":55,"./lib/isWhitelisted":56,"./lib/ltrim":57,"./lib/matches":58,"./lib/normalizeEmail":59,"./lib/rtrim":60,"./lib/stripLow":61,"./lib/toBoolean":62,"./lib/toDate":63,"./lib/toFloat":64,"./lib/toInt":65,"./lib/trim":66,"./lib/unescape":67,"./lib/util/toString":70,"./lib/whitelist":71}],5:[function(require,module,exports){
1406
3312
  'use strict';
1407
3313
 
1408
3314
  Object.defineProperty(exports, "__esModule", {
@@ -1411,34 +3317,46 @@ Object.defineProperty(exports, "__esModule", {
1411
3317
  var alpha = exports.alpha = {
1412
3318
  'en-US': /^[A-Z]+$/i,
1413
3319
  'cs-CZ': /^[A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,
3320
+ 'da-DK': /^[A-ZÆØÅ]+$/i,
1414
3321
  'de-DE': /^[A-ZÄÖÜß]+$/i,
1415
3322
  'es-ES': /^[A-ZÁÉÍÑÓÚÜ]+$/i,
1416
3323
  'fr-FR': /^[A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,
1417
- 'nl-NL': /^[A-ZÉËÏÓÖÜ]+$/i,
3324
+ 'it-IT': /^[A-ZÀÉÈÌÎÓÒÙ]+$/i,
3325
+ 'nb-NO': /^[A-ZÆØÅ]+$/i,
3326
+ 'nl-NL': /^[A-ZÁÉËÏÓÖÜÚ]+$/i,
3327
+ 'nn-NO': /^[A-ZÆØÅ]+$/i,
1418
3328
  'hu-HU': /^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i,
1419
3329
  'pl-PL': /^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i,
1420
3330
  'pt-PT': /^[A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]+$/i,
1421
3331
  'ru-RU': /^[А-ЯЁ]+$/i,
1422
3332
  'sr-RS@latin': /^[A-ZČĆŽŠĐ]+$/i,
1423
3333
  'sr-RS': /^[А-ЯЂЈЉЊЋЏ]+$/i,
3334
+ 'sv-SE': /^[A-ZÅÄÖ]+$/i,
1424
3335
  'tr-TR': /^[A-ZÇĞİıÖŞÜ]+$/i,
3336
+ 'uk-UA': /^[А-ЩЬЮЯЄIЇҐ]+$/i,
1425
3337
  ar: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/
1426
3338
  };
1427
3339
 
1428
3340
  var alphanumeric = exports.alphanumeric = {
1429
3341
  'en-US': /^[0-9A-Z]+$/i,
1430
3342
  'cs-CZ': /^[0-9A-ZÁČĎÉĚÍŇÓŘŠŤÚŮÝŽ]+$/i,
3343
+ 'da-DK': /^[0-9A-ZÆØÅ]+$/i,
1431
3344
  'de-DE': /^[0-9A-ZÄÖÜß]+$/i,
1432
3345
  'es-ES': /^[0-9A-ZÁÉÍÑÓÚÜ]+$/i,
1433
3346
  'fr-FR': /^[0-9A-ZÀÂÆÇÉÈÊËÏÎÔŒÙÛÜŸ]+$/i,
3347
+ 'it-IT': /^[0-9A-ZÀÉÈÌÎÓÒÙ]+$/i,
1434
3348
  'hu-HU': /^[0-9A-ZÁÉÍÓÖŐÚÜŰ]+$/i,
1435
- 'nl-NL': /^[0-9A-ZÉËÏÓÖÜ]+$/i,
3349
+ 'nb-NO': /^[0-9A-ZÆØÅ]+$/i,
3350
+ 'nl-NL': /^[0-9A-ZÁÉËÏÓÖÜÚ]+$/i,
3351
+ 'nn-NO': /^[0-9A-ZÆØÅ]+$/i,
1436
3352
  'pl-PL': /^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i,
1437
3353
  'pt-PT': /^[0-9A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]+$/i,
1438
3354
  'ru-RU': /^[0-9А-ЯЁ]+$/i,
1439
3355
  'sr-RS@latin': /^[0-9A-ZČĆŽŠĐ]+$/i,
1440
3356
  'sr-RS': /^[0-9А-ЯЂЈЉЊЋЏ]+$/i,
3357
+ 'sv-SE': /^[0-9A-ZÅÄÖ]+$/i,
1441
3358
  'tr-TR': /^[0-9A-ZÇĞİıÖŞÜ]+$/i,
3359
+ 'uk-UA': /^[0-9А-ЩЬЮЯЄIЇҐ]+$/i,
1442
3360
  ar: /^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/
1443
3361
  };
1444
3362
 
@@ -1461,7 +3379,7 @@ for (var _locale, _i = 0; _i < arabicLocales.length; _i++) {
1461
3379
  alpha[_locale] = alpha.ar;
1462
3380
  alphanumeric[_locale] = alphanumeric.ar;
1463
3381
  }
1464
- },{}],5:[function(require,module,exports){
3382
+ },{}],6:[function(require,module,exports){
1465
3383
  'use strict';
1466
3384
 
1467
3385
  Object.defineProperty(exports, "__esModule", {
@@ -1480,7 +3398,7 @@ function blacklist(str, chars) {
1480
3398
  return str.replace(new RegExp('[' + chars + ']+', 'g'), '');
1481
3399
  }
1482
3400
  module.exports = exports['default'];
1483
- },{"./util/assertString":63}],6:[function(require,module,exports){
3401
+ },{"./util/assertString":68}],7:[function(require,module,exports){
1484
3402
  'use strict';
1485
3403
 
1486
3404
  Object.defineProperty(exports, "__esModule", {
@@ -1503,7 +3421,7 @@ function contains(str, elem) {
1503
3421
  return str.indexOf((0, _toString2.default)(elem)) >= 0;
1504
3422
  }
1505
3423
  module.exports = exports['default'];
1506
- },{"./util/assertString":63,"./util/toString":65}],7:[function(require,module,exports){
3424
+ },{"./util/assertString":68,"./util/toString":70}],8:[function(require,module,exports){
1507
3425
  'use strict';
1508
3426
 
1509
3427
  Object.defineProperty(exports, "__esModule", {
@@ -1522,11 +3440,11 @@ function equals(str, comparison) {
1522
3440
  return str === comparison;
1523
3441
  }
1524
3442
  module.exports = exports['default'];
1525
- },{"./util/assertString":63}],8:[function(require,module,exports){
3443
+ },{"./util/assertString":68}],9:[function(require,module,exports){
1526
3444
  'use strict';
1527
3445
 
1528
3446
  Object.defineProperty(exports, "__esModule", {
1529
- value: true
3447
+ value: true
1530
3448
  });
1531
3449
  exports.default = escape;
1532
3450
 
@@ -1537,11 +3455,11 @@ var _assertString2 = _interopRequireDefault(_assertString);
1537
3455
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1538
3456
 
1539
3457
  function escape(str) {
1540
- (0, _assertString2.default)(str);
1541
- return str.replace(/&/g, '&amp;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/\//g, '&#x2F;').replace(/`/g, '&#96;');
3458
+ (0, _assertString2.default)(str);
3459
+ return str.replace(/&/g, '&amp;').replace(/"/g, '&quot;').replace(/'/g, '&#x27;').replace(/</g, '&lt;').replace(/>/g, '&gt;').replace(/\//g, '&#x2F;').replace(/\\/g, '&#x5C;').replace(/`/g, '&#96;');
1542
3460
  }
1543
3461
  module.exports = exports['default'];
1544
- },{"./util/assertString":63}],9:[function(require,module,exports){
3462
+ },{"./util/assertString":68}],10:[function(require,module,exports){
1545
3463
  'use strict';
1546
3464
 
1547
3465
  Object.defineProperty(exports, "__esModule", {
@@ -1560,7 +3478,7 @@ var _toDate2 = _interopRequireDefault(_toDate);
1560
3478
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1561
3479
 
1562
3480
  function isAfter(str) {
1563
- var date = arguments.length <= 1 || arguments[1] === undefined ? String(new Date()) : arguments[1];
3481
+ var date = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : String(new Date());
1564
3482
 
1565
3483
  (0, _assertString2.default)(str);
1566
3484
  var comparison = (0, _toDate2.default)(date);
@@ -1568,7 +3486,7 @@ function isAfter(str) {
1568
3486
  return !!(original && comparison && original > comparison);
1569
3487
  }
1570
3488
  module.exports = exports['default'];
1571
- },{"./toDate":58,"./util/assertString":63}],10:[function(require,module,exports){
3489
+ },{"./toDate":63,"./util/assertString":68}],11:[function(require,module,exports){
1572
3490
  'use strict';
1573
3491
 
1574
3492
  Object.defineProperty(exports, "__esModule", {
@@ -1585,7 +3503,7 @@ var _alpha = require('./alpha');
1585
3503
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1586
3504
 
1587
3505
  function isAlpha(str) {
1588
- var locale = arguments.length <= 1 || arguments[1] === undefined ? 'en-US' : arguments[1];
3506
+ var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'en-US';
1589
3507
 
1590
3508
  (0, _assertString2.default)(str);
1591
3509
  if (locale in _alpha.alpha) {
@@ -1594,7 +3512,7 @@ function isAlpha(str) {
1594
3512
  throw new Error('Invalid locale \'' + locale + '\'');
1595
3513
  }
1596
3514
  module.exports = exports['default'];
1597
- },{"./alpha":4,"./util/assertString":63}],11:[function(require,module,exports){
3515
+ },{"./alpha":5,"./util/assertString":68}],12:[function(require,module,exports){
1598
3516
  'use strict';
1599
3517
 
1600
3518
  Object.defineProperty(exports, "__esModule", {
@@ -1611,7 +3529,7 @@ var _alpha = require('./alpha');
1611
3529
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1612
3530
 
1613
3531
  function isAlphanumeric(str) {
1614
- var locale = arguments.length <= 1 || arguments[1] === undefined ? 'en-US' : arguments[1];
3532
+ var locale = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'en-US';
1615
3533
 
1616
3534
  (0, _assertString2.default)(str);
1617
3535
  if (locale in _alpha.alphanumeric) {
@@ -1620,7 +3538,7 @@ function isAlphanumeric(str) {
1620
3538
  throw new Error('Invalid locale \'' + locale + '\'');
1621
3539
  }
1622
3540
  module.exports = exports['default'];
1623
- },{"./alpha":4,"./util/assertString":63}],12:[function(require,module,exports){
3541
+ },{"./alpha":5,"./util/assertString":68}],13:[function(require,module,exports){
1624
3542
  'use strict';
1625
3543
 
1626
3544
  Object.defineProperty(exports, "__esModule", {
@@ -1643,7 +3561,7 @@ function isAscii(str) {
1643
3561
  return ascii.test(str);
1644
3562
  }
1645
3563
  module.exports = exports['default'];
1646
- },{"./util/assertString":63}],13:[function(require,module,exports){
3564
+ },{"./util/assertString":68}],14:[function(require,module,exports){
1647
3565
  'use strict';
1648
3566
 
1649
3567
  Object.defineProperty(exports, "__esModule", {
@@ -1669,7 +3587,7 @@ function isBase64(str) {
1669
3587
  return firstPaddingChar === -1 || firstPaddingChar === len - 1 || firstPaddingChar === len - 2 && str[len - 1] === '=';
1670
3588
  }
1671
3589
  module.exports = exports['default'];
1672
- },{"./util/assertString":63}],14:[function(require,module,exports){
3590
+ },{"./util/assertString":68}],15:[function(require,module,exports){
1673
3591
  'use strict';
1674
3592
 
1675
3593
  Object.defineProperty(exports, "__esModule", {
@@ -1688,7 +3606,7 @@ var _toDate2 = _interopRequireDefault(_toDate);
1688
3606
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1689
3607
 
1690
3608
  function isBefore(str) {
1691
- var date = arguments.length <= 1 || arguments[1] === undefined ? String(new Date()) : arguments[1];
3609
+ var date = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : String(new Date());
1692
3610
 
1693
3611
  (0, _assertString2.default)(str);
1694
3612
  var comparison = (0, _toDate2.default)(date);
@@ -1696,7 +3614,7 @@ function isBefore(str) {
1696
3614
  return !!(original && comparison && original < comparison);
1697
3615
  }
1698
3616
  module.exports = exports['default'];
1699
- },{"./toDate":58,"./util/assertString":63}],15:[function(require,module,exports){
3617
+ },{"./toDate":63,"./util/assertString":68}],16:[function(require,module,exports){
1700
3618
  'use strict';
1701
3619
 
1702
3620
  Object.defineProperty(exports, "__esModule", {
@@ -1715,14 +3633,14 @@ function isBoolean(str) {
1715
3633
  return ['true', 'false', '1', '0'].indexOf(str) >= 0;
1716
3634
  }
1717
3635
  module.exports = exports['default'];
1718
- },{"./util/assertString":63}],16:[function(require,module,exports){
3636
+ },{"./util/assertString":68}],17:[function(require,module,exports){
1719
3637
  'use strict';
1720
3638
 
1721
3639
  Object.defineProperty(exports, "__esModule", {
1722
3640
  value: true
1723
3641
  });
1724
3642
 
1725
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
3643
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
1726
3644
 
1727
3645
  exports.default = isByteLength;
1728
3646
 
@@ -1749,7 +3667,7 @@ function isByteLength(str, options) {
1749
3667
  return len >= min && (typeof max === 'undefined' || len <= max);
1750
3668
  }
1751
3669
  module.exports = exports['default'];
1752
- },{"./util/assertString":63}],17:[function(require,module,exports){
3670
+ },{"./util/assertString":68}],18:[function(require,module,exports){
1753
3671
  'use strict';
1754
3672
 
1755
3673
  Object.defineProperty(exports, "__esModule", {
@@ -1764,12 +3682,12 @@ var _assertString2 = _interopRequireDefault(_assertString);
1764
3682
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1765
3683
 
1766
3684
  /* eslint-disable max-len */
1767
- var creditCard = /^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11})|62[0-9]{14}$/;
3685
+ var creditCard = /^(?:4[0-9]{12}(?:[0-9]{3})?|5[1-5][0-9]{14}|(222[1-9]|22[3-9][0-9]|2[3-6][0-9]{2}|27[01][0-9]|2720)[0-9]{12}|6(?:011|5[0-9][0-9])[0-9]{12}|3[47][0-9]{13}|3(?:0[0-5]|[68][0-9])[0-9]{11}|(?:2131|1800|35\d{3})\d{11}|62[0-9]{14})$/;
1768
3686
  /* eslint-enable max-len */
1769
3687
 
1770
3688
  function isCreditCard(str) {
1771
3689
  (0, _assertString2.default)(str);
1772
- var sanitized = str.replace(/[^0-9]+/g, '');
3690
+ var sanitized = str.replace(/[- ]+/g, '');
1773
3691
  if (!creditCard.test(sanitized)) {
1774
3692
  return false;
1775
3693
  }
@@ -1795,7 +3713,7 @@ function isCreditCard(str) {
1795
3713
  return !!(sum % 10 === 0 ? sanitized : false);
1796
3714
  }
1797
3715
  module.exports = exports['default'];
1798
- },{"./util/assertString":63}],18:[function(require,module,exports){
3716
+ },{"./util/assertString":68}],19:[function(require,module,exports){
1799
3717
  'use strict';
1800
3718
 
1801
3719
  Object.defineProperty(exports, "__esModule", {
@@ -1814,14 +3732,18 @@ var _assertString2 = _interopRequireDefault(_assertString);
1814
3732
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1815
3733
 
1816
3734
  function currencyRegex(options) {
3735
+ var decimal_digits = '\\d{' + options.digits_after_decimal[0] + '}';
3736
+ options.digits_after_decimal.forEach(function (digit, index) {
3737
+ if (index !== 0) decimal_digits = decimal_digits + '|\\d{' + digit + '}';
3738
+ });
1817
3739
  var symbol = '(\\' + options.symbol.replace(/\./g, '\\.') + ')' + (options.require_symbol ? '' : '?'),
1818
3740
  negative = '-?',
1819
3741
  whole_dollar_amount_without_sep = '[1-9]\\d*',
1820
3742
  whole_dollar_amount_with_sep = '[1-9]\\d{0,2}(\\' + options.thousands_separator + '\\d{3})*',
1821
3743
  valid_whole_dollar_amounts = ['0', whole_dollar_amount_without_sep, whole_dollar_amount_with_sep],
1822
3744
  whole_dollar_amount = '(' + valid_whole_dollar_amounts.join('|') + ')?',
1823
- decimal_amount = '(\\' + options.decimal_separator + '\\d{2})?';
1824
- var pattern = whole_dollar_amount + decimal_amount;
3745
+ decimal_amount = '(\\' + options.decimal_separator + '(' + decimal_digits + '))' + (options.require_decimal ? '' : '?');
3746
+ var pattern = whole_dollar_amount + (options.allow_decimal || options.require_decimal ? decimal_amount : '');
1825
3747
 
1826
3748
  // default is negative sign before symbol, but there are two other options (besides parens)
1827
3749
  if (options.allow_negatives && !options.parens_for_negatives) {
@@ -1855,12 +3777,9 @@ function currencyRegex(options) {
1855
3777
  }
1856
3778
  }
1857
3779
 
1858
- /* eslint-disable prefer-template */
1859
- return new RegExp('^' +
1860
3780
  // ensure there's a dollar and/or decimal amount, and that
1861
3781
  // it doesn't start with a space or a negative sign followed by a space
1862
- '(?!-? )(?=.*\\d)' + pattern + '$');
1863
- /* eslint-enable prefer-template */
3782
+ return new RegExp('^(?!-? )(?=.*\\d)' + pattern + '$');
1864
3783
  }
1865
3784
 
1866
3785
  var default_currency_options = {
@@ -1875,6 +3794,9 @@ var default_currency_options = {
1875
3794
  allow_negative_sign_placeholder: false,
1876
3795
  thousands_separator: ',',
1877
3796
  decimal_separator: '.',
3797
+ allow_decimal: true,
3798
+ require_decimal: false,
3799
+ digits_after_decimal: [2],
1878
3800
  allow_space_after_digits: false
1879
3801
  };
1880
3802
 
@@ -1884,7 +3806,7 @@ function isCurrency(str, options) {
1884
3806
  return currencyRegex(options).test(str);
1885
3807
  }
1886
3808
  module.exports = exports['default'];
1887
- },{"./util/assertString":63,"./util/merge":64}],19:[function(require,module,exports){
3809
+ },{"./util/assertString":68,"./util/merge":69}],20:[function(require,module,exports){
1888
3810
  'use strict';
1889
3811
 
1890
3812
  Object.defineProperty(exports, "__esModule", {
@@ -1905,108 +3827,7 @@ function isDataURI(str) {
1905
3827
  return dataURI.test(str);
1906
3828
  }
1907
3829
  module.exports = exports['default'];
1908
- },{"./util/assertString":63}],20:[function(require,module,exports){
1909
- 'use strict';
1910
-
1911
- Object.defineProperty(exports, "__esModule", {
1912
- value: true
1913
- });
1914
- exports.default = isDate;
1915
-
1916
- var _assertString = require('./util/assertString');
1917
-
1918
- var _assertString2 = _interopRequireDefault(_assertString);
1919
-
1920
- var _isISO = require('./isISO8601');
1921
-
1922
- function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
1923
-
1924
- function getTimezoneOffset(str) {
1925
- var iso8601Parts = str.match(_isISO.iso8601);
1926
- var timezone = void 0,
1927
- sign = void 0,
1928
- hours = void 0,
1929
- minutes = void 0;
1930
- if (!iso8601Parts) {
1931
- str = str.toLowerCase();
1932
- timezone = str.match(/(?:\s|gmt\s*)(-|\+)(\d{1,4})(\s|$)/);
1933
- if (!timezone) {
1934
- return str.indexOf('gmt') !== -1 ? 0 : null;
1935
- }
1936
- sign = timezone[1];
1937
- var offset = timezone[2];
1938
- if (offset.length === 3) {
1939
- offset = '0' + offset;
1940
- }
1941
- if (offset.length <= 2) {
1942
- hours = 0;
1943
- minutes = parseInt(offset, 10);
1944
- } else {
1945
- hours = parseInt(offset.slice(0, 2), 10);
1946
- minutes = parseInt(offset.slice(2, 4), 10);
1947
- }
1948
- } else {
1949
- timezone = iso8601Parts[21];
1950
- if (!timezone) {
1951
- // if no hour/minute was provided, the date is GMT
1952
- return !iso8601Parts[12] ? 0 : null;
1953
- }
1954
- if (timezone === 'z' || timezone === 'Z') {
1955
- return 0;
1956
- }
1957
- sign = iso8601Parts[22];
1958
- if (timezone.indexOf(':') !== -1) {
1959
- hours = parseInt(iso8601Parts[23], 10);
1960
- minutes = parseInt(iso8601Parts[24], 10);
1961
- } else {
1962
- hours = 0;
1963
- minutes = parseInt(iso8601Parts[23], 10);
1964
- }
1965
- }
1966
- return (hours * 60 + minutes) * (sign === '-' ? 1 : -1);
1967
- }
1968
-
1969
- function isDate(str) {
1970
- (0, _assertString2.default)(str);
1971
- var normalizedDate = new Date(Date.parse(str));
1972
- if (isNaN(normalizedDate)) {
1973
- return false;
1974
- }
1975
-
1976
- // normalizedDate is in the user's timezone. Apply the input
1977
- // timezone offset to the date so that the year and day match
1978
- // the input
1979
- var timezoneOffset = getTimezoneOffset(str);
1980
- if (timezoneOffset !== null) {
1981
- var timezoneDifference = normalizedDate.getTimezoneOffset() - timezoneOffset;
1982
- normalizedDate = new Date(normalizedDate.getTime() + 60000 * timezoneDifference);
1983
- }
1984
-
1985
- var day = String(normalizedDate.getDate());
1986
- var dayOrYear = void 0,
1987
- dayOrYearMatches = void 0,
1988
- year = void 0;
1989
- // check for valid double digits that could be late days
1990
- // check for all matches since a string like '12/23' is a valid date
1991
- // ignore everything with nearby colons
1992
- dayOrYearMatches = str.match(/(^|[^:\d])[23]\d([^T:\d]|$)/g);
1993
- if (!dayOrYearMatches) {
1994
- return true;
1995
- }
1996
- dayOrYear = dayOrYearMatches.map(function (digitString) {
1997
- return digitString.match(/\d+/g)[0];
1998
- }).join('/');
1999
-
2000
- year = String(normalizedDate.getFullYear()).slice(-2);
2001
- if (dayOrYear === day || dayOrYear === year) {
2002
- return true;
2003
- } else if (dayOrYear === '' + day / year || dayOrYear === '' + year / day) {
2004
- return true;
2005
- }
2006
- return false;
2007
- }
2008
- module.exports = exports['default'];
2009
- },{"./isISO8601":33,"./util/assertString":63}],21:[function(require,module,exports){
3830
+ },{"./util/assertString":68}],21:[function(require,module,exports){
2010
3831
  'use strict';
2011
3832
 
2012
3833
  Object.defineProperty(exports, "__esModule", {
@@ -2027,7 +3848,7 @@ function isDecimal(str) {
2027
3848
  return str !== '' && decimal.test(str);
2028
3849
  }
2029
3850
  module.exports = exports['default'];
2030
- },{"./util/assertString":63}],22:[function(require,module,exports){
3851
+ },{"./util/assertString":68}],22:[function(require,module,exports){
2031
3852
  'use strict';
2032
3853
 
2033
3854
  Object.defineProperty(exports, "__esModule", {
@@ -2050,7 +3871,7 @@ function isDivisibleBy(str, num) {
2050
3871
  return (0, _toFloat2.default)(str) % parseInt(num, 10) === 0;
2051
3872
  }
2052
3873
  module.exports = exports['default'];
2053
- },{"./toFloat":59,"./util/assertString":63}],23:[function(require,module,exports){
3874
+ },{"./toFloat":64,"./util/assertString":68}],23:[function(require,module,exports){
2054
3875
  'use strict';
2055
3876
 
2056
3877
  Object.defineProperty(exports, "__esModule", {
@@ -2078,13 +3899,14 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
2078
3899
 
2079
3900
  var default_email_options = {
2080
3901
  allow_display_name: false,
3902
+ require_display_name: false,
2081
3903
  allow_utf8_local_part: true,
2082
3904
  require_tld: true
2083
3905
  };
2084
3906
 
2085
3907
  /* eslint-disable max-len */
2086
3908
  /* eslint-disable no-control-regex */
2087
- var displayName = /^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF\s]*<(.+)>$/i;
3909
+ var displayName = /^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\,\.\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF\s]*<(.+)>$/i;
2088
3910
  var emailUserPart = /^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~]+$/i;
2089
3911
  var quotedEmailUser = /^([\s\x01-\x08\x0b\x0c\x0e-\x1f\x7f\x21\x23-\x5b\x5d-\x7e]|(\\[\x01-\x09\x0b\x0c\x0d-\x7f]))*$/i;
2090
3912
  var emailUserUtf8Part = /^[a-z\d!#\$%&'\*\+\-\/=\?\^_`{\|}~\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+$/i;
@@ -2096,10 +3918,12 @@ function isEmail(str, options) {
2096
3918
  (0, _assertString2.default)(str);
2097
3919
  options = (0, _merge2.default)(options, default_email_options);
2098
3920
 
2099
- if (options.allow_display_name) {
3921
+ if (options.require_display_name || options.allow_display_name) {
2100
3922
  var display_email = str.match(displayName);
2101
3923
  if (display_email) {
2102
3924
  str = display_email[1];
3925
+ } else if (options.require_display_name) {
3926
+ return false;
2103
3927
  }
2104
3928
  }
2105
3929
 
@@ -2112,7 +3936,7 @@ function isEmail(str, options) {
2112
3936
  user = user.replace(/\./g, '').toLowerCase();
2113
3937
  }
2114
3938
 
2115
- if (!(0, _isByteLength2.default)(user, { max: 64 }) || !(0, _isByteLength2.default)(domain, { max: 256 })) {
3939
+ if (!(0, _isByteLength2.default)(user, { max: 64 }) || !(0, _isByteLength2.default)(domain, { max: 254 })) {
2116
3940
  return false;
2117
3941
  }
2118
3942
 
@@ -2137,7 +3961,26 @@ function isEmail(str, options) {
2137
3961
  return true;
2138
3962
  }
2139
3963
  module.exports = exports['default'];
2140
- },{"./isByteLength":16,"./isFQDN":24,"./util/assertString":63,"./util/merge":64}],24:[function(require,module,exports){
3964
+ },{"./isByteLength":17,"./isFQDN":25,"./util/assertString":68,"./util/merge":69}],24:[function(require,module,exports){
3965
+ 'use strict';
3966
+
3967
+ Object.defineProperty(exports, "__esModule", {
3968
+ value: true
3969
+ });
3970
+ exports.default = isEmpty;
3971
+
3972
+ var _assertString = require('./util/assertString');
3973
+
3974
+ var _assertString2 = _interopRequireDefault(_assertString);
3975
+
3976
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
3977
+
3978
+ function isEmpty(str) {
3979
+ (0, _assertString2.default)(str);
3980
+ return str.length === 0;
3981
+ }
3982
+ module.exports = exports['default'];
3983
+ },{"./util/assertString":68}],25:[function(require,module,exports){
2141
3984
  'use strict';
2142
3985
 
2143
3986
  Object.defineProperty(exports, "__esModule", {
@@ -2175,6 +4018,10 @@ function isFDQN(str, options) {
2175
4018
  if (!parts.length || !/^([a-z\u00a1-\uffff]{2,}|xn[a-z0-9-]{2,})$/i.test(tld)) {
2176
4019
  return false;
2177
4020
  }
4021
+ // disallow spaces
4022
+ if (/[\s\u2002-\u200B\u202F\u205F\u3000\uFEFF\uDB40\uDC20]/.test(tld)) {
4023
+ return false;
4024
+ }
2178
4025
  }
2179
4026
  for (var part, i = 0; i < parts.length; i++) {
2180
4027
  part = parts[i];
@@ -2184,8 +4031,8 @@ function isFDQN(str, options) {
2184
4031
  if (!/^[a-z\u00a1-\uffff0-9-]+$/i.test(part)) {
2185
4032
  return false;
2186
4033
  }
4034
+ // disallow full-width chars
2187
4035
  if (/[\uff01-\uff5e]/.test(part)) {
2188
- // disallow full-width chars
2189
4036
  return false;
2190
4037
  }
2191
4038
  if (part[0] === '-' || part[part.length - 1] === '-') {
@@ -2195,7 +4042,7 @@ function isFDQN(str, options) {
2195
4042
  return true;
2196
4043
  }
2197
4044
  module.exports = exports['default'];
2198
- },{"./util/assertString":63,"./util/merge":64}],25:[function(require,module,exports){
4045
+ },{"./util/assertString":68,"./util/merge":69}],26:[function(require,module,exports){
2199
4046
  'use strict';
2200
4047
 
2201
4048
  Object.defineProperty(exports, "__esModule", {
@@ -2209,7 +4056,7 @@ var _assertString2 = _interopRequireDefault(_assertString);
2209
4056
 
2210
4057
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2211
4058
 
2212
- var float = /^(?:[-+]?(?:[0-9]+))?(?:\.[0-9]*)?(?:[eE][\+\-]?(?:[0-9]+))?$/;
4059
+ var float = /^(?:[-+])?(?:[0-9]+)?(?:\.[0-9]*)?(?:[eE][\+\-]?(?:[0-9]+))?$/;
2213
4060
 
2214
4061
  function isFloat(str, options) {
2215
4062
  (0, _assertString2.default)(str);
@@ -2217,10 +4064,10 @@ function isFloat(str, options) {
2217
4064
  if (str === '' || str === '.') {
2218
4065
  return false;
2219
4066
  }
2220
- return float.test(str) && (!options.hasOwnProperty('min') || str >= options.min) && (!options.hasOwnProperty('max') || str <= options.max);
4067
+ return float.test(str) && (!options.hasOwnProperty('min') || str >= options.min) && (!options.hasOwnProperty('max') || str <= options.max) && (!options.hasOwnProperty('lt') || str < options.lt) && (!options.hasOwnProperty('gt') || str > options.gt);
2221
4068
  }
2222
4069
  module.exports = exports['default'];
2223
- },{"./util/assertString":63}],26:[function(require,module,exports){
4070
+ },{"./util/assertString":68}],27:[function(require,module,exports){
2224
4071
  'use strict';
2225
4072
 
2226
4073
  Object.defineProperty(exports, "__esModule", {
@@ -2241,7 +4088,7 @@ function isFullWidth(str) {
2241
4088
  (0, _assertString2.default)(str);
2242
4089
  return fullWidth.test(str);
2243
4090
  }
2244
- },{"./util/assertString":63}],27:[function(require,module,exports){
4091
+ },{"./util/assertString":68}],28:[function(require,module,exports){
2245
4092
  'use strict';
2246
4093
 
2247
4094
  Object.defineProperty(exports, "__esModule", {
@@ -2262,7 +4109,43 @@ function isHalfWidth(str) {
2262
4109
  (0, _assertString2.default)(str);
2263
4110
  return halfWidth.test(str);
2264
4111
  }
2265
- },{"./util/assertString":63}],28:[function(require,module,exports){
4112
+ },{"./util/assertString":68}],29:[function(require,module,exports){
4113
+ 'use strict';
4114
+
4115
+ Object.defineProperty(exports, "__esModule", {
4116
+ value: true
4117
+ });
4118
+ exports.default = isHash;
4119
+
4120
+ var _assertString = require('./util/assertString');
4121
+
4122
+ var _assertString2 = _interopRequireDefault(_assertString);
4123
+
4124
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
4125
+
4126
+ var lengths = {
4127
+ md5: 32,
4128
+ md4: 32,
4129
+ sha1: 40,
4130
+ sha256: 64,
4131
+ sha384: 96,
4132
+ sha512: 128,
4133
+ ripemd128: 32,
4134
+ ripemd160: 40,
4135
+ tiger128: 32,
4136
+ tiger160: 40,
4137
+ tiger192: 48,
4138
+ crc32: 8,
4139
+ crc32b: 8
4140
+ };
4141
+
4142
+ function isHash(str, algorithm) {
4143
+ (0, _assertString2.default)(str);
4144
+ var hash = new RegExp('^[a-f0-9]{' + lengths[algorithm] + '}$');
4145
+ return hash.test(str);
4146
+ }
4147
+ module.exports = exports['default'];
4148
+ },{"./util/assertString":68}],30:[function(require,module,exports){
2266
4149
  'use strict';
2267
4150
 
2268
4151
  Object.defineProperty(exports, "__esModule", {
@@ -2283,7 +4166,7 @@ function isHexColor(str) {
2283
4166
  return hexcolor.test(str);
2284
4167
  }
2285
4168
  module.exports = exports['default'];
2286
- },{"./util/assertString":63}],29:[function(require,module,exports){
4169
+ },{"./util/assertString":68}],31:[function(require,module,exports){
2287
4170
  'use strict';
2288
4171
 
2289
4172
  Object.defineProperty(exports, "__esModule", {
@@ -2304,7 +4187,7 @@ function isHexadecimal(str) {
2304
4187
  return hexadecimal.test(str);
2305
4188
  }
2306
4189
  module.exports = exports['default'];
2307
- },{"./util/assertString":63}],30:[function(require,module,exports){
4190
+ },{"./util/assertString":68}],32:[function(require,module,exports){
2308
4191
  'use strict';
2309
4192
 
2310
4193
  Object.defineProperty(exports, "__esModule", {
@@ -2322,7 +4205,7 @@ var ipv4Maybe = /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/;
2322
4205
  var ipv6Block = /^[0-9A-F]{1,4}$/i;
2323
4206
 
2324
4207
  function isIP(str) {
2325
- var version = arguments.length <= 1 || arguments[1] === undefined ? '' : arguments[1];
4208
+ var version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
2326
4209
 
2327
4210
  (0, _assertString2.default)(str);
2328
4211
  version = String(version);
@@ -2386,7 +4269,7 @@ function isIP(str) {
2386
4269
  return false;
2387
4270
  }
2388
4271
  module.exports = exports['default'];
2389
- },{"./util/assertString":63}],31:[function(require,module,exports){
4272
+ },{"./util/assertString":68}],33:[function(require,module,exports){
2390
4273
  'use strict';
2391
4274
 
2392
4275
  Object.defineProperty(exports, "__esModule", {
@@ -2405,7 +4288,7 @@ var isbn13Maybe = /^(?:[0-9]{13})$/;
2405
4288
  var factor = [1, 3];
2406
4289
 
2407
4290
  function isISBN(str) {
2408
- var version = arguments.length <= 1 || arguments[1] === undefined ? '' : arguments[1];
4291
+ var version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : '';
2409
4292
 
2410
4293
  (0, _assertString2.default)(str);
2411
4294
  version = String(version);
@@ -2444,7 +4327,7 @@ function isISBN(str) {
2444
4327
  return false;
2445
4328
  }
2446
4329
  module.exports = exports['default'];
2447
- },{"./util/assertString":63}],32:[function(require,module,exports){
4330
+ },{"./util/assertString":68}],34:[function(require,module,exports){
2448
4331
  'use strict';
2449
4332
 
2450
4333
  Object.defineProperty(exports, "__esModule", {
@@ -2493,18 +4376,13 @@ function isISIN(str) {
2493
4376
  return parseInt(str.substr(str.length - 1), 10) === (10000 - sum) % 10;
2494
4377
  }
2495
4378
  module.exports = exports['default'];
2496
- },{"./util/assertString":63}],33:[function(require,module,exports){
4379
+ },{"./util/assertString":68}],35:[function(require,module,exports){
2497
4380
  'use strict';
2498
4381
 
2499
4382
  Object.defineProperty(exports, "__esModule", {
2500
4383
  value: true
2501
4384
  });
2502
- exports.iso8601 = undefined;
2503
-
2504
- exports.default = function (str) {
2505
- (0, _assertString2.default)(str);
2506
- return iso8601.test(str);
2507
- };
4385
+ exports.default = isISO8601;
2508
4386
 
2509
4387
  var _assertString = require('./util/assertString');
2510
4388
 
@@ -2514,16 +4392,103 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
2514
4392
 
2515
4393
  /* eslint-disable max-len */
2516
4394
  // from http://goo.gl/0ejHHW
2517
- var iso8601 = exports.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-2])(-?[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)?)?)?)?$/;
4395
+ var 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-2])(-?[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)?)?)?)?$/;
2518
4396
  /* eslint-enable max-len */
2519
- },{"./util/assertString":63}],34:[function(require,module,exports){
4397
+
4398
+ function isISO8601(str) {
4399
+ (0, _assertString2.default)(str);
4400
+ return iso8601.test(str);
4401
+ }
4402
+ module.exports = exports['default'];
4403
+ },{"./util/assertString":68}],36:[function(require,module,exports){
4404
+ 'use strict';
4405
+
4406
+ Object.defineProperty(exports, "__esModule", {
4407
+ value: true
4408
+ });
4409
+ exports.default = isISRC;
4410
+
4411
+ var _assertString = require('./util/assertString');
4412
+
4413
+ var _assertString2 = _interopRequireDefault(_assertString);
4414
+
4415
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
4416
+
4417
+ // see http://isrc.ifpi.org/en/isrc-standard/code-syntax
4418
+ var isrc = /^[A-Z]{2}[0-9A-Z]{3}\d{2}\d{5}$/;
4419
+
4420
+ function isISRC(str) {
4421
+ (0, _assertString2.default)(str);
4422
+ return isrc.test(str);
4423
+ }
4424
+ module.exports = exports['default'];
4425
+ },{"./util/assertString":68}],37:[function(require,module,exports){
4426
+ 'use strict';
4427
+
4428
+ Object.defineProperty(exports, "__esModule", {
4429
+ value: true
4430
+ });
4431
+ exports.default = isISSN;
4432
+
4433
+ var _assertString = require('./util/assertString');
4434
+
4435
+ var _assertString2 = _interopRequireDefault(_assertString);
4436
+
4437
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
4438
+
4439
+ var issn = '^\\d{4}-?\\d{3}[\\dX]$';
4440
+
4441
+ function isISSN(str) {
4442
+ var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
4443
+
4444
+ (0, _assertString2.default)(str);
4445
+ var testIssn = issn;
4446
+ testIssn = options.require_hyphen ? testIssn.replace('?', '') : testIssn;
4447
+ testIssn = options.case_sensitive ? new RegExp(testIssn) : new RegExp(testIssn, 'i');
4448
+ if (!testIssn.test(str)) {
4449
+ return false;
4450
+ }
4451
+ var issnDigits = str.replace('-', '');
4452
+ var position = 8;
4453
+ var checksum = 0;
4454
+ var _iteratorNormalCompletion = true;
4455
+ var _didIteratorError = false;
4456
+ var _iteratorError = undefined;
4457
+
4458
+ try {
4459
+ for (var _iterator = issnDigits[Symbol.iterator](), _step; !(_iteratorNormalCompletion = (_step = _iterator.next()).done); _iteratorNormalCompletion = true) {
4460
+ var digit = _step.value;
4461
+
4462
+ var digitValue = digit.toUpperCase() === 'X' ? 10 : +digit;
4463
+ checksum += digitValue * position;
4464
+ --position;
4465
+ }
4466
+ } catch (err) {
4467
+ _didIteratorError = true;
4468
+ _iteratorError = err;
4469
+ } finally {
4470
+ try {
4471
+ if (!_iteratorNormalCompletion && _iterator.return) {
4472
+ _iterator.return();
4473
+ }
4474
+ } finally {
4475
+ if (_didIteratorError) {
4476
+ throw _iteratorError;
4477
+ }
4478
+ }
4479
+ }
4480
+
4481
+ return checksum % 11 === 0;
4482
+ }
4483
+ module.exports = exports['default'];
4484
+ },{"./util/assertString":68}],38:[function(require,module,exports){
2520
4485
  'use strict';
2521
4486
 
2522
4487
  Object.defineProperty(exports, "__esModule", {
2523
4488
  value: true
2524
4489
  });
2525
4490
 
2526
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
4491
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
2527
4492
 
2528
4493
  exports.default = isIn;
2529
4494
 
@@ -2556,7 +4521,7 @@ function isIn(str, options) {
2556
4521
  return false;
2557
4522
  }
2558
4523
  module.exports = exports['default'];
2559
- },{"./util/assertString":63,"./util/toString":65}],35:[function(require,module,exports){
4524
+ },{"./util/assertString":68,"./util/toString":70}],39:[function(require,module,exports){
2560
4525
  'use strict';
2561
4526
 
2562
4527
  Object.defineProperty(exports, "__esModule", {
@@ -2579,23 +4544,25 @@ function isInt(str, options) {
2579
4544
 
2580
4545
  // Get the regex to use for testing, based on whether
2581
4546
  // leading zeroes are allowed or not.
2582
- var regex = options.hasOwnProperty('allow_leading_zeroes') && options.allow_leading_zeroes ? intLeadingZeroes : int;
4547
+ var regex = options.hasOwnProperty('allow_leading_zeroes') && !options.allow_leading_zeroes ? int : intLeadingZeroes;
2583
4548
 
2584
- // Check min/max
4549
+ // Check min/max/lt/gt
2585
4550
  var minCheckPassed = !options.hasOwnProperty('min') || str >= options.min;
2586
4551
  var maxCheckPassed = !options.hasOwnProperty('max') || str <= options.max;
4552
+ var ltCheckPassed = !options.hasOwnProperty('lt') || str < options.lt;
4553
+ var gtCheckPassed = !options.hasOwnProperty('gt') || str > options.gt;
2587
4554
 
2588
- return regex.test(str) && minCheckPassed && maxCheckPassed;
4555
+ return regex.test(str) && minCheckPassed && maxCheckPassed && ltCheckPassed && gtCheckPassed;
2589
4556
  }
2590
4557
  module.exports = exports['default'];
2591
- },{"./util/assertString":63}],36:[function(require,module,exports){
4558
+ },{"./util/assertString":68}],40:[function(require,module,exports){
2592
4559
  'use strict';
2593
4560
 
2594
4561
  Object.defineProperty(exports, "__esModule", {
2595
4562
  value: true
2596
4563
  });
2597
4564
 
2598
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
4565
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
2599
4566
 
2600
4567
  exports.default = isJSON;
2601
4568
 
@@ -2614,14 +4581,38 @@ function isJSON(str) {
2614
4581
  return false;
2615
4582
  }
2616
4583
  module.exports = exports['default'];
2617
- },{"./util/assertString":63}],37:[function(require,module,exports){
4584
+ },{"./util/assertString":68}],41:[function(require,module,exports){
4585
+ 'use strict';
4586
+
4587
+ Object.defineProperty(exports, "__esModule", {
4588
+ value: true
4589
+ });
4590
+
4591
+ exports.default = function (str) {
4592
+ (0, _assertString2.default)(str);
4593
+ if (!str.includes(',')) return false;
4594
+ var pair = str.split(',');
4595
+ return lat.test(pair[0]) && long.test(pair[1]);
4596
+ };
4597
+
4598
+ var _assertString = require('./util/assertString');
4599
+
4600
+ var _assertString2 = _interopRequireDefault(_assertString);
4601
+
4602
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
4603
+
4604
+ var lat = /^\(?[+-]?(90(\.0+)?|[1-8]?\d(\.\d+)?)$/;
4605
+ var long = /^\s?[+-]?(180(\.0+)?|1[0-7]\d(\.\d+)?|\d{1,2}(\.\d+)?)\)?$/;
4606
+
4607
+ module.exports = exports['default'];
4608
+ },{"./util/assertString":68}],42:[function(require,module,exports){
2618
4609
  'use strict';
2619
4610
 
2620
4611
  Object.defineProperty(exports, "__esModule", {
2621
4612
  value: true
2622
4613
  });
2623
4614
 
2624
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
4615
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
2625
4616
 
2626
4617
  exports.default = isLength;
2627
4618
 
@@ -2649,7 +4640,7 @@ function isLength(str, options) {
2649
4640
  return len >= min && (typeof max === 'undefined' || len <= max);
2650
4641
  }
2651
4642
  module.exports = exports['default'];
2652
- },{"./util/assertString":63}],38:[function(require,module,exports){
4643
+ },{"./util/assertString":68}],43:[function(require,module,exports){
2653
4644
  'use strict';
2654
4645
 
2655
4646
  Object.defineProperty(exports, "__esModule", {
@@ -2668,7 +4659,7 @@ function isLowercase(str) {
2668
4659
  return str === str.toLowerCase();
2669
4660
  }
2670
4661
  module.exports = exports['default'];
2671
- },{"./util/assertString":63}],39:[function(require,module,exports){
4662
+ },{"./util/assertString":68}],44:[function(require,module,exports){
2672
4663
  'use strict';
2673
4664
 
2674
4665
  Object.defineProperty(exports, "__esModule", {
@@ -2689,7 +4680,7 @@ function isMACAddress(str) {
2689
4680
  return macAddress.test(str);
2690
4681
  }
2691
4682
  module.exports = exports['default'];
2692
- },{"./util/assertString":63}],40:[function(require,module,exports){
4683
+ },{"./util/assertString":68}],45:[function(require,module,exports){
2693
4684
  'use strict';
2694
4685
 
2695
4686
  Object.defineProperty(exports, "__esModule", {
@@ -2710,7 +4701,7 @@ function isMD5(str) {
2710
4701
  return md5.test(str);
2711
4702
  }
2712
4703
  module.exports = exports['default'];
2713
- },{"./util/assertString":63}],41:[function(require,module,exports){
4704
+ },{"./util/assertString":68}],46:[function(require,module,exports){
2714
4705
  'use strict';
2715
4706
 
2716
4707
  Object.defineProperty(exports, "__esModule", {
@@ -2726,11 +4717,15 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
2726
4717
 
2727
4718
  /* eslint-disable max-len */
2728
4719
  var phones = {
4720
+ 'ar-AE': /^((\+?971)|0)?5[024568]\d{7}$/,
2729
4721
  'ar-DZ': /^(\+?213|0)(5|6|7)\d{8}$/,
4722
+ 'ar-EG': /^((\+?20)|0)?1[012]\d{8}$/,
4723
+ 'ar-JO': /^(\+?962|0)?7[789]\d{7}$/,
2730
4724
  'ar-SY': /^(!?(\+?963)|0)?9\d{8}$/,
2731
4725
  'ar-SA': /^(!?(\+?966)|0)?5\d{8}$/,
2732
4726
  'en-US': /^(\+?1)?[2-9]\d{2}[2-9](?!11)\d{6}$/,
2733
4727
  'cs-CZ': /^(\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,
4728
+ 'sk-SK': /^(\+?421)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,
2734
4729
  'de-DE': /^(\+?49[ \.\-])?([\(]{1}[0-9]{1,6}[\)])?([0-9 \.\-\/]{3,20})((x|ext|extension)[ ]?[0-9]{1,4})?$/,
2735
4730
  'da-DK': /^(\+?45)?(\d{8})$/,
2736
4731
  'el-GR': /^(\+?30)?(69\d{8})$/,
@@ -2738,14 +4733,24 @@ var phones = {
2738
4733
  'en-GB': /^(\+?44|0)7\d{9}$/,
2739
4734
  'en-HK': /^(\+?852\-?)?[569]\d{3}\-?\d{4}$/,
2740
4735
  'en-IN': /^(\+?91|0)?[789]\d{9}$/,
4736
+ 'en-KE': /^(\+?254|0)?[7]\d{8}$/,
4737
+ 'en-NG': /^(\+?234|0)?[789]\d{9}$/,
2741
4738
  'en-NZ': /^(\+?64|0)2\d{7,9}$/,
4739
+ 'en-UG': /^(\+?256|0)?[7]\d{8}$/,
4740
+ 'en-RW': /^(\+?250|0)?[7]\d{8}$/,
4741
+ 'en-TZ': /^(\+?255|0)?[67]\d{8}$/,
2742
4742
  'en-ZA': /^(\+?27|0)\d{9}$/,
2743
4743
  'en-ZM': /^(\+?26)?09[567]\d{7}$/,
2744
4744
  'es-ES': /^(\+?34)?(6\d{1}|7[1234])\d{7}$/,
2745
- 'fi-FI': /^(\+?358|0)\s?(4(0|1|2|4|5)?|50)\s?(\d\s?){4,8}\d$/,
4745
+ 'fi-FI': /^(\+?358|0)\s?(4(0|1|2|4|5|6)?|50)\s?(\d\s?){4,8}\d$/,
4746
+ 'fa-IR': /^(\+?98[\-\s]?|0)9[0-39]\d[\-\s]?\d{3}[\-\s]?\d{4}$/,
2746
4747
  'fr-FR': /^(\+?33|0)[67]\d{8}$/,
4748
+ 'he-IL': /^(\+972|0)([23489]|5[0248]|77)[1-9]\d{6}/,
2747
4749
  'hu-HU': /^(\+?36)(20|30|70)\d{7}$/,
4750
+ 'lt-LT': /^(\+370|8)\d{8}$/,
4751
+ 'id-ID': /^(\+?62|0[1-9])[\s|\d]+$/,
2748
4752
  'it-IT': /^(\+?39)?\s?3\d{2} ?\d{6,7}$/,
4753
+ 'ko-KR': /^((\+?82)[ \-]?)?0?1([0|1|6|7|8|9]{1})[ \-]?\d{3,4}[ \-]?\d{4}$/,
2749
4754
  'ja-JP': /^(\+?81|0)\d{1,4}[ \-]?\d{1,4}[ \-]?\d{4}$/,
2750
4755
  'ms-MY': /^(\+?6?01){1}(([145]{1}(\-|\s)?\d{7,8})|([236789]{1}(\s|\-)?\d{7}))$/,
2751
4756
  'nb-NO': /^(\+?47)?[49]\d{7}$/,
@@ -2754,6 +4759,8 @@ var phones = {
2754
4759
  'pl-PL': /^(\+?48)? ?[5-8]\d ?\d{3} ?\d{2} ?\d{2}$/,
2755
4760
  'pt-BR': /^(\+?55|0)\-?[1-9]{2}\-?[2-9]{1}\d{3,4}\-?\d{4}$/,
2756
4761
  'pt-PT': /^(\+?351)?9[1236]\d{7}$/,
4762
+ 'ro-RO': /^(\+?4?0)\s?7\d{2}(\/|\s|\.|\-)?\d{3}(\s|\.|\-)?\d{3}$/,
4763
+ 'en-PK': /^((\+92)|(0092))-{0,1}\d{3}-{0,1}\d{7}$|^\d{11}$|^\d{4}-\d{7}$/,
2757
4764
  'ru-RU': /^(\+?7|8)?9\d{9}$/,
2758
4765
  'sr-RS': /^(\+3816|06)[- \d]{5,9}$/,
2759
4766
  'tr-TR': /^(\+?90|0)?5\d{9}$/,
@@ -2766,16 +4773,27 @@ var phones = {
2766
4773
  // aliases
2767
4774
  phones['en-CA'] = phones['en-US'];
2768
4775
  phones['fr-BE'] = phones['nl-BE'];
4776
+ phones['zh-HK'] = phones['en-HK'];
2769
4777
 
2770
4778
  function isMobilePhone(str, locale) {
2771
4779
  (0, _assertString2.default)(str);
2772
4780
  if (locale in phones) {
2773
4781
  return phones[locale].test(str);
4782
+ } else if (locale === 'any') {
4783
+ for (var key in phones) {
4784
+ if (phones.hasOwnProperty(key)) {
4785
+ var phone = phones[key];
4786
+ if (phone.test(str)) {
4787
+ return true;
4788
+ }
4789
+ }
4790
+ }
4791
+ return false;
2774
4792
  }
2775
- return false;
4793
+ throw new Error('Invalid locale \'' + locale + '\'');
2776
4794
  }
2777
4795
  module.exports = exports['default'];
2778
- },{"./util/assertString":63}],42:[function(require,module,exports){
4796
+ },{"./util/assertString":68}],47:[function(require,module,exports){
2779
4797
  'use strict';
2780
4798
 
2781
4799
  Object.defineProperty(exports, "__esModule", {
@@ -2798,7 +4816,7 @@ function isMongoId(str) {
2798
4816
  return (0, _isHexadecimal2.default)(str) && str.length === 24;
2799
4817
  }
2800
4818
  module.exports = exports['default'];
2801
- },{"./isHexadecimal":29,"./util/assertString":63}],43:[function(require,module,exports){
4819
+ },{"./isHexadecimal":31,"./util/assertString":68}],48:[function(require,module,exports){
2802
4820
  'use strict';
2803
4821
 
2804
4822
  Object.defineProperty(exports, "__esModule", {
@@ -2821,13 +4839,13 @@ function isMultibyte(str) {
2821
4839
  return multibyte.test(str);
2822
4840
  }
2823
4841
  module.exports = exports['default'];
2824
- },{"./util/assertString":63}],44:[function(require,module,exports){
4842
+ },{"./util/assertString":68}],49:[function(require,module,exports){
2825
4843
  'use strict';
2826
4844
 
2827
4845
  Object.defineProperty(exports, "__esModule", {
2828
4846
  value: true
2829
4847
  });
2830
- exports.default = isNull;
4848
+ exports.default = isNumeric;
2831
4849
 
2832
4850
  var _assertString = require('./util/assertString');
2833
4851
 
@@ -2835,18 +4853,38 @@ var _assertString2 = _interopRequireDefault(_assertString);
2835
4853
 
2836
4854
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2837
4855
 
2838
- function isNull(str) {
4856
+ var numeric = /^[-+]?[0-9]+$/;
4857
+
4858
+ function isNumeric(str) {
2839
4859
  (0, _assertString2.default)(str);
2840
- return str.length === 0;
4860
+ return numeric.test(str);
2841
4861
  }
2842
4862
  module.exports = exports['default'];
2843
- },{"./util/assertString":63}],45:[function(require,module,exports){
4863
+ },{"./util/assertString":68}],50:[function(require,module,exports){
2844
4864
  'use strict';
2845
4865
 
2846
4866
  Object.defineProperty(exports, "__esModule", {
2847
4867
  value: true
2848
4868
  });
2849
- exports.default = isNumeric;
4869
+ exports.locales = undefined;
4870
+
4871
+ exports.default = function (str, locale) {
4872
+ (0, _assertString2.default)(str);
4873
+ if (locale in patterns) {
4874
+ return patterns[locale].test(str);
4875
+ } else if (locale === 'any') {
4876
+ for (var key in patterns) {
4877
+ if (patterns.hasOwnProperty(key)) {
4878
+ var pattern = patterns[key];
4879
+ if (pattern.test(str)) {
4880
+ return true;
4881
+ }
4882
+ }
4883
+ }
4884
+ return false;
4885
+ }
4886
+ throw new Error('Invalid locale \'' + locale + '\'');
4887
+ };
2850
4888
 
2851
4889
  var _assertString = require('./util/assertString');
2852
4890
 
@@ -2854,14 +4892,51 @@ var _assertString2 = _interopRequireDefault(_assertString);
2854
4892
 
2855
4893
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
2856
4894
 
2857
- var numeric = /^[-+]?[0-9]+$/;
4895
+ // common patterns
4896
+ var threeDigit = /^\d{3}$/;
4897
+ var fourDigit = /^\d{4}$/;
4898
+ var fiveDigit = /^\d{5}$/;
4899
+ var sixDigit = /^\d{6}$/;
4900
+
4901
+ var patterns = {
4902
+ AT: fourDigit,
4903
+ AU: sixDigit,
4904
+ BE: fourDigit,
4905
+ CA: /^[ABCEGHJKLMNPRSTVXY]\d[ABCEGHJ-NPRSTV-Z][\s\-]?\d[ABCEGHJ-NPRSTV-Z]\d$/i,
4906
+ CH: fourDigit,
4907
+ CZ: /^\d{3}\s?\d{2}$/,
4908
+ DE: fiveDigit,
4909
+ DK: fourDigit,
4910
+ DZ: fiveDigit,
4911
+ ES: fiveDigit,
4912
+ FI: fiveDigit,
4913
+ FR: /^\d{2}\s?\d{3}$/,
4914
+ GB: /^(gir\s?0aa|[a-z]{1,2}\d[\da-z]?\s?(\d[a-z]{2})?)$/i,
4915
+ GR: /^\d{3}\s?\d{2}$/,
4916
+ IL: fiveDigit,
4917
+ IN: sixDigit,
4918
+ IS: threeDigit,
4919
+ IT: fiveDigit,
4920
+ JP: /^\d{3}\-\d{4}$/,
4921
+ KE: fiveDigit,
4922
+ LI: /^(948[5-9]|949[0-7])$/,
4923
+ MX: fiveDigit,
4924
+ NL: /^\d{4}\s?[a-z]{2}$/i,
4925
+ NO: fourDigit,
4926
+ PL: /^\d{2}\-\d{3}$/,
4927
+ PT: /^\d{4}(\-\d{3})?$/,
4928
+ RO: sixDigit,
4929
+ RU: sixDigit,
4930
+ SA: fiveDigit,
4931
+ SE: /^\d{3}\s?\d{2}$/,
4932
+ TW: /^\d{3}(\d{2})?$/,
4933
+ US: /^\d{5}(-\d{4})?$/,
4934
+ ZA: fourDigit,
4935
+ ZM: fiveDigit
4936
+ };
2858
4937
 
2859
- function isNumeric(str) {
2860
- (0, _assertString2.default)(str);
2861
- return numeric.test(str);
2862
- }
2863
- module.exports = exports['default'];
2864
- },{"./util/assertString":63}],46:[function(require,module,exports){
4938
+ var locales = exports.locales = Object.keys(patterns);
4939
+ },{"./util/assertString":68}],51:[function(require,module,exports){
2865
4940
  'use strict';
2866
4941
 
2867
4942
  Object.defineProperty(exports, "__esModule", {
@@ -2882,7 +4957,7 @@ function isSurrogatePair(str) {
2882
4957
  return surrogatePair.test(str);
2883
4958
  }
2884
4959
  module.exports = exports['default'];
2885
- },{"./util/assertString":63}],47:[function(require,module,exports){
4960
+ },{"./util/assertString":68}],52:[function(require,module,exports){
2886
4961
  'use strict';
2887
4962
 
2888
4963
  Object.defineProperty(exports, "__esModule", {
@@ -2937,7 +5012,7 @@ function checkHost(host, matches) {
2937
5012
 
2938
5013
  function isURL(url, options) {
2939
5014
  (0, _assertString2.default)(url);
2940
- if (!url || url.length >= 2083 || /\s/.test(url)) {
5015
+ if (!url || url.length >= 2083 || /[\s<>]/.test(url)) {
2941
5016
  return false;
2942
5017
  }
2943
5018
  if (url.indexOf('mailto:') === 0) {
@@ -2972,6 +5047,10 @@ function isURL(url, options) {
2972
5047
  }
2973
5048
  url = split.join('://');
2974
5049
 
5050
+ if (url === '') {
5051
+ return false;
5052
+ }
5053
+
2975
5054
  split = url.split('/');
2976
5055
  url = split.shift();
2977
5056
 
@@ -2988,7 +5067,8 @@ function isURL(url, options) {
2988
5067
  }
2989
5068
  hostname = split.join('@');
2990
5069
 
2991
- port_str = ipv6 = null;
5070
+ port_str = null;
5071
+ ipv6 = null;
2992
5072
  var ipv6_match = hostname.match(wrapped_ipv6);
2993
5073
  if (ipv6_match) {
2994
5074
  host = '';
@@ -3009,7 +5089,7 @@ function isURL(url, options) {
3009
5089
  }
3010
5090
  }
3011
5091
 
3012
- if (!(0, _isIP2.default)(host) && !(0, _isFQDN2.default)(host, options) && (!ipv6 || !(0, _isIP2.default)(ipv6, 6)) && host !== 'localhost') {
5092
+ if (!(0, _isIP2.default)(host) && !(0, _isFQDN2.default)(host, options) && (!ipv6 || !(0, _isIP2.default)(ipv6, 6))) {
3013
5093
  return false;
3014
5094
  }
3015
5095
 
@@ -3025,7 +5105,7 @@ function isURL(url, options) {
3025
5105
  return true;
3026
5106
  }
3027
5107
  module.exports = exports['default'];
3028
- },{"./isFQDN":24,"./isIP":30,"./util/assertString":63,"./util/merge":64}],48:[function(require,module,exports){
5108
+ },{"./isFQDN":25,"./isIP":32,"./util/assertString":68,"./util/merge":69}],53:[function(require,module,exports){
3029
5109
  'use strict';
3030
5110
 
3031
5111
  Object.defineProperty(exports, "__esModule", {
@@ -3047,14 +5127,14 @@ var uuid = {
3047
5127
  };
3048
5128
 
3049
5129
  function isUUID(str) {
3050
- var version = arguments.length <= 1 || arguments[1] === undefined ? 'all' : arguments[1];
5130
+ var version = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'all';
3051
5131
 
3052
5132
  (0, _assertString2.default)(str);
3053
5133
  var pattern = uuid[version];
3054
5134
  return pattern && pattern.test(str);
3055
5135
  }
3056
5136
  module.exports = exports['default'];
3057
- },{"./util/assertString":63}],49:[function(require,module,exports){
5137
+ },{"./util/assertString":68}],54:[function(require,module,exports){
3058
5138
  'use strict';
3059
5139
 
3060
5140
  Object.defineProperty(exports, "__esModule", {
@@ -3073,7 +5153,7 @@ function isUppercase(str) {
3073
5153
  return str === str.toUpperCase();
3074
5154
  }
3075
5155
  module.exports = exports['default'];
3076
- },{"./util/assertString":63}],50:[function(require,module,exports){
5156
+ },{"./util/assertString":68}],55:[function(require,module,exports){
3077
5157
  'use strict';
3078
5158
 
3079
5159
  Object.defineProperty(exports, "__esModule", {
@@ -3096,7 +5176,7 @@ function isVariableWidth(str) {
3096
5176
  return _isFullWidth.fullWidth.test(str) && _isHalfWidth.halfWidth.test(str);
3097
5177
  }
3098
5178
  module.exports = exports['default'];
3099
- },{"./isFullWidth":26,"./isHalfWidth":27,"./util/assertString":63}],51:[function(require,module,exports){
5179
+ },{"./isFullWidth":27,"./isHalfWidth":28,"./util/assertString":68}],56:[function(require,module,exports){
3100
5180
  'use strict';
3101
5181
 
3102
5182
  Object.defineProperty(exports, "__esModule", {
@@ -3120,7 +5200,7 @@ function isWhitelisted(str, chars) {
3120
5200
  return true;
3121
5201
  }
3122
5202
  module.exports = exports['default'];
3123
- },{"./util/assertString":63}],52:[function(require,module,exports){
5203
+ },{"./util/assertString":68}],57:[function(require,module,exports){
3124
5204
  'use strict';
3125
5205
 
3126
5206
  Object.defineProperty(exports, "__esModule", {
@@ -3140,7 +5220,7 @@ function ltrim(str, chars) {
3140
5220
  return str.replace(pattern, '');
3141
5221
  }
3142
5222
  module.exports = exports['default'];
3143
- },{"./util/assertString":63}],53:[function(require,module,exports){
5223
+ },{"./util/assertString":68}],58:[function(require,module,exports){
3144
5224
  'use strict';
3145
5225
 
3146
5226
  Object.defineProperty(exports, "__esModule", {
@@ -3162,7 +5242,7 @@ function matches(str, pattern, modifiers) {
3162
5242
  return pattern.test(str);
3163
5243
  }
3164
5244
  module.exports = exports['default'];
3165
- },{"./util/assertString":63}],54:[function(require,module,exports){
5245
+ },{"./util/assertString":68}],59:[function(require,module,exports){
3166
5246
  'use strict';
3167
5247
 
3168
5248
  Object.defineProperty(exports, "__esModule", {
@@ -3181,37 +5261,126 @@ var _merge2 = _interopRequireDefault(_merge);
3181
5261
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
3182
5262
 
3183
5263
  var default_normalize_email_options = {
3184
- lowercase: true,
3185
- remove_dots: true,
3186
- remove_extension: true
5264
+ // The following options apply to all email addresses
5265
+ // Lowercases the local part of the email address.
5266
+ // Please note this may violate RFC 5321 as per http://stackoverflow.com/a/9808332/192024).
5267
+ // The domain is always lowercased, as per RFC 1035
5268
+ all_lowercase: true,
5269
+
5270
+ // The following conversions are specific to GMail
5271
+ // Lowercases the local part of the GMail address (known to be case-insensitive)
5272
+ gmail_lowercase: true,
5273
+ // Removes dots from the local part of the email address, as that's ignored by GMail
5274
+ gmail_remove_dots: true,
5275
+ // Removes the subaddress (e.g. "+foo") from the email address
5276
+ gmail_remove_subaddress: true,
5277
+ // Conversts the googlemail.com domain to gmail.com
5278
+ gmail_convert_googlemaildotcom: true,
5279
+
5280
+ // The following conversions are specific to Outlook.com / Windows Live / Hotmail
5281
+ // Lowercases the local part of the Outlook.com address (known to be case-insensitive)
5282
+ outlookdotcom_lowercase: true,
5283
+ // Removes the subaddress (e.g. "+foo") from the email address
5284
+ outlookdotcom_remove_subaddress: true,
5285
+
5286
+ // The following conversions are specific to Yahoo
5287
+ // Lowercases the local part of the Yahoo address (known to be case-insensitive)
5288
+ yahoo_lowercase: true,
5289
+ // Removes the subaddress (e.g. "-foo") from the email address
5290
+ yahoo_remove_subaddress: true,
5291
+
5292
+ // The following conversions are specific to iCloud
5293
+ // Lowercases the local part of the iCloud address (known to be case-insensitive)
5294
+ icloud_lowercase: true,
5295
+ // Removes the subaddress (e.g. "+foo") from the email address
5296
+ icloud_remove_subaddress: true
3187
5297
  };
3188
5298
 
5299
+ // List of domains used by iCloud
5300
+ var icloud_domains = ['icloud.com', 'me.com'];
5301
+
5302
+ // List of domains used by Outlook.com and its predecessors
5303
+ // This list is likely incomplete.
5304
+ // Partial reference:
5305
+ // https://blogs.office.com/2013/04/17/outlook-com-gets-two-step-verification-sign-in-by-alias-and-new-international-domains/
5306
+ var outlookdotcom_domains = ['hotmail.at', 'hotmail.be', 'hotmail.ca', 'hotmail.cl', 'hotmail.co.il', 'hotmail.co.nz', 'hotmail.co.th', 'hotmail.co.uk', 'hotmail.com', 'hotmail.com.ar', 'hotmail.com.au', 'hotmail.com.br', 'hotmail.com.gr', 'hotmail.com.mx', 'hotmail.com.pe', 'hotmail.com.tr', 'hotmail.com.vn', 'hotmail.cz', 'hotmail.de', 'hotmail.dk', 'hotmail.es', 'hotmail.fr', 'hotmail.hu', 'hotmail.id', 'hotmail.ie', 'hotmail.in', 'hotmail.it', 'hotmail.jp', 'hotmail.kr', 'hotmail.lv', 'hotmail.my', 'hotmail.ph', 'hotmail.pt', 'hotmail.sa', 'hotmail.sg', 'hotmail.sk', 'live.be', 'live.co.uk', 'live.com', 'live.com.ar', 'live.com.mx', 'live.de', 'live.es', 'live.eu', 'live.fr', 'live.it', 'live.nl', 'msn.com', 'outlook.at', 'outlook.be', 'outlook.cl', 'outlook.co.il', 'outlook.co.nz', 'outlook.co.th', 'outlook.com', 'outlook.com.ar', 'outlook.com.au', 'outlook.com.br', 'outlook.com.gr', 'outlook.com.pe', 'outlook.com.tr', 'outlook.com.vn', 'outlook.cz', 'outlook.de', 'outlook.dk', 'outlook.es', 'outlook.fr', 'outlook.hu', 'outlook.id', 'outlook.ie', 'outlook.in', 'outlook.it', 'outlook.jp', 'outlook.kr', 'outlook.lv', 'outlook.my', 'outlook.ph', 'outlook.pt', 'outlook.sa', 'outlook.sg', 'outlook.sk', 'passport.com'];
5307
+
5308
+ // List of domains used by Yahoo Mail
5309
+ // This list is likely incomplete
5310
+ var yahoo_domains = ['rocketmail.com', 'yahoo.ca', 'yahoo.co.uk', 'yahoo.com', 'yahoo.de', 'yahoo.fr', 'yahoo.in', 'yahoo.it', 'ymail.com'];
5311
+
3189
5312
  function normalizeEmail(email, options) {
3190
5313
  options = (0, _merge2.default)(options, default_normalize_email_options);
5314
+
3191
5315
  if (!(0, _isEmail2.default)(email)) {
3192
5316
  return false;
3193
5317
  }
3194
- var parts = email.split('@', 2);
5318
+
5319
+ var raw_parts = email.split('@');
5320
+ var domain = raw_parts.pop();
5321
+ var user = raw_parts.join('@');
5322
+ var parts = [user, domain];
5323
+
5324
+ // The domain is always lowercased, as it's case-insensitive per RFC 1035
3195
5325
  parts[1] = parts[1].toLowerCase();
5326
+
3196
5327
  if (parts[1] === 'gmail.com' || parts[1] === 'googlemail.com') {
3197
- if (options.remove_extension) {
5328
+ // Address is GMail
5329
+ if (options.gmail_remove_subaddress) {
3198
5330
  parts[0] = parts[0].split('+')[0];
3199
5331
  }
3200
- if (options.remove_dots) {
5332
+ if (options.gmail_remove_dots) {
3201
5333
  parts[0] = parts[0].replace(/\./g, '');
3202
5334
  }
3203
5335
  if (!parts[0].length) {
3204
5336
  return false;
3205
5337
  }
3206
- parts[0] = parts[0].toLowerCase();
3207
- parts[1] = 'gmail.com';
3208
- } else if (options.lowercase) {
5338
+ if (options.all_lowercase || options.gmail_lowercase) {
5339
+ parts[0] = parts[0].toLowerCase();
5340
+ }
5341
+ parts[1] = options.gmail_convert_googlemaildotcom ? 'gmail.com' : parts[1];
5342
+ } else if (~icloud_domains.indexOf(parts[1])) {
5343
+ // Address is iCloud
5344
+ if (options.icloud_remove_subaddress) {
5345
+ parts[0] = parts[0].split('+')[0];
5346
+ }
5347
+ if (!parts[0].length) {
5348
+ return false;
5349
+ }
5350
+ if (options.all_lowercase || options.icloud_lowercase) {
5351
+ parts[0] = parts[0].toLowerCase();
5352
+ }
5353
+ } else if (~outlookdotcom_domains.indexOf(parts[1])) {
5354
+ // Address is Outlook.com
5355
+ if (options.outlookdotcom_remove_subaddress) {
5356
+ parts[0] = parts[0].split('+')[0];
5357
+ }
5358
+ if (!parts[0].length) {
5359
+ return false;
5360
+ }
5361
+ if (options.all_lowercase || options.outlookdotcom_lowercase) {
5362
+ parts[0] = parts[0].toLowerCase();
5363
+ }
5364
+ } else if (~yahoo_domains.indexOf(parts[1])) {
5365
+ // Address is Yahoo
5366
+ if (options.yahoo_remove_subaddress) {
5367
+ var components = parts[0].split('-');
5368
+ parts[0] = components.length > 1 ? components.slice(0, -1).join('-') : components[0];
5369
+ }
5370
+ if (!parts[0].length) {
5371
+ return false;
5372
+ }
5373
+ if (options.all_lowercase || options.yahoo_lowercase) {
5374
+ parts[0] = parts[0].toLowerCase();
5375
+ }
5376
+ } else if (options.all_lowercase) {
5377
+ // Any other address
3209
5378
  parts[0] = parts[0].toLowerCase();
3210
5379
  }
3211
5380
  return parts.join('@');
3212
5381
  }
3213
5382
  module.exports = exports['default'];
3214
- },{"./isEmail":23,"./util/merge":64}],55:[function(require,module,exports){
5383
+ },{"./isEmail":23,"./util/merge":69}],60:[function(require,module,exports){
3215
5384
  'use strict';
3216
5385
 
3217
5386
  Object.defineProperty(exports, "__esModule", {
@@ -3237,7 +5406,7 @@ function rtrim(str, chars) {
3237
5406
  return idx < str.length ? str.substr(0, idx + 1) : str;
3238
5407
  }
3239
5408
  module.exports = exports['default'];
3240
- },{"./util/assertString":63}],56:[function(require,module,exports){
5409
+ },{"./util/assertString":68}],61:[function(require,module,exports){
3241
5410
  'use strict';
3242
5411
 
3243
5412
  Object.defineProperty(exports, "__esModule", {
@@ -3261,7 +5430,7 @@ function stripLow(str, keep_new_lines) {
3261
5430
  return (0, _blacklist2.default)(str, chars);
3262
5431
  }
3263
5432
  module.exports = exports['default'];
3264
- },{"./blacklist":5,"./util/assertString":63}],57:[function(require,module,exports){
5433
+ },{"./blacklist":6,"./util/assertString":68}],62:[function(require,module,exports){
3265
5434
  'use strict';
3266
5435
 
3267
5436
  Object.defineProperty(exports, "__esModule", {
@@ -3283,7 +5452,7 @@ function toBoolean(str, strict) {
3283
5452
  return str !== '0' && str !== 'false' && str !== '';
3284
5453
  }
3285
5454
  module.exports = exports['default'];
3286
- },{"./util/assertString":63}],58:[function(require,module,exports){
5455
+ },{"./util/assertString":68}],63:[function(require,module,exports){
3287
5456
  'use strict';
3288
5457
 
3289
5458
  Object.defineProperty(exports, "__esModule", {
@@ -3303,7 +5472,7 @@ function toDate(date) {
3303
5472
  return !isNaN(date) ? new Date(date) : null;
3304
5473
  }
3305
5474
  module.exports = exports['default'];
3306
- },{"./util/assertString":63}],59:[function(require,module,exports){
5475
+ },{"./util/assertString":68}],64:[function(require,module,exports){
3307
5476
  'use strict';
3308
5477
 
3309
5478
  Object.defineProperty(exports, "__esModule", {
@@ -3322,7 +5491,7 @@ function toFloat(str) {
3322
5491
  return parseFloat(str);
3323
5492
  }
3324
5493
  module.exports = exports['default'];
3325
- },{"./util/assertString":63}],60:[function(require,module,exports){
5494
+ },{"./util/assertString":68}],65:[function(require,module,exports){
3326
5495
  'use strict';
3327
5496
 
3328
5497
  Object.defineProperty(exports, "__esModule", {
@@ -3341,7 +5510,7 @@ function toInt(str, radix) {
3341
5510
  return parseInt(str, radix || 10);
3342
5511
  }
3343
5512
  module.exports = exports['default'];
3344
- },{"./util/assertString":63}],61:[function(require,module,exports){
5513
+ },{"./util/assertString":68}],66:[function(require,module,exports){
3345
5514
  'use strict';
3346
5515
 
3347
5516
  Object.defineProperty(exports, "__esModule", {
@@ -3363,11 +5532,11 @@ function trim(str, chars) {
3363
5532
  return (0, _rtrim2.default)((0, _ltrim2.default)(str, chars), chars);
3364
5533
  }
3365
5534
  module.exports = exports['default'];
3366
- },{"./ltrim":52,"./rtrim":55}],62:[function(require,module,exports){
5535
+ },{"./ltrim":57,"./rtrim":60}],67:[function(require,module,exports){
3367
5536
  'use strict';
3368
5537
 
3369
5538
  Object.defineProperty(exports, "__esModule", {
3370
- value: true
5539
+ value: true
3371
5540
  });
3372
5541
  exports.default = unescape;
3373
5542
 
@@ -3378,11 +5547,11 @@ var _assertString2 = _interopRequireDefault(_assertString);
3378
5547
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
3379
5548
 
3380
5549
  function unescape(str) {
3381
- (0, _assertString2.default)(str);
3382
- return str.replace(/&amp;/g, '&').replace(/&quot;/g, '"').replace(/&#x27;/g, "'").replace(/&lt;/g, '<').replace(/&gt;/g, '>').replace(/&#x2F;/g, '/').replace(/&#96;/g, '`');
5550
+ (0, _assertString2.default)(str);
5551
+ return str.replace(/&amp;/g, '&').replace(/&quot;/g, '"').replace(/&#x27;/g, "'").replace(/&lt;/g, '<').replace(/&gt;/g, '>').replace(/&#x2F;/g, '/').replace(/&#x5C;/g, '\\').replace(/&#96;/g, '`');
3383
5552
  }
3384
5553
  module.exports = exports['default'];
3385
- },{"./util/assertString":63}],63:[function(require,module,exports){
5554
+ },{"./util/assertString":68}],68:[function(require,module,exports){
3386
5555
  'use strict';
3387
5556
 
3388
5557
  Object.defineProperty(exports, "__esModule", {
@@ -3390,12 +5559,14 @@ Object.defineProperty(exports, "__esModule", {
3390
5559
  });
3391
5560
  exports.default = assertString;
3392
5561
  function assertString(input) {
3393
- if (typeof input !== 'string') {
5562
+ var isString = typeof input === 'string' || input instanceof String;
5563
+
5564
+ if (!isString) {
3394
5565
  throw new TypeError('This library (validator.js) validates strings only');
3395
5566
  }
3396
5567
  }
3397
5568
  module.exports = exports['default'];
3398
- },{}],64:[function(require,module,exports){
5569
+ },{}],69:[function(require,module,exports){
3399
5570
  'use strict';
3400
5571
 
3401
5572
  Object.defineProperty(exports, "__esModule", {
@@ -3403,7 +5574,7 @@ Object.defineProperty(exports, "__esModule", {
3403
5574
  });
3404
5575
  exports.default = merge;
3405
5576
  function merge() {
3406
- var obj = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0];
5577
+ var obj = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
3407
5578
  var defaults = arguments[1];
3408
5579
 
3409
5580
  for (var key in defaults) {
@@ -3414,14 +5585,14 @@ function merge() {
3414
5585
  return obj;
3415
5586
  }
3416
5587
  module.exports = exports['default'];
3417
- },{}],65:[function(require,module,exports){
5588
+ },{}],70:[function(require,module,exports){
3418
5589
  'use strict';
3419
5590
 
3420
5591
  Object.defineProperty(exports, "__esModule", {
3421
5592
  value: true
3422
5593
  });
3423
5594
 
3424
- var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
5595
+ var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; };
3425
5596
 
3426
5597
  exports.default = toString;
3427
5598
  function toString(input) {
@@ -3437,7 +5608,7 @@ function toString(input) {
3437
5608
  return String(input);
3438
5609
  }
3439
5610
  module.exports = exports['default'];
3440
- },{}],66:[function(require,module,exports){
5611
+ },{}],71:[function(require,module,exports){
3441
5612
  'use strict';
3442
5613
 
3443
5614
  Object.defineProperty(exports, "__esModule", {
@@ -3456,7 +5627,7 @@ function whitelist(str, chars) {
3456
5627
  return str.replace(new RegExp('[^' + chars + ']+', 'g'), '');
3457
5628
  }
3458
5629
  module.exports = exports['default'];
3459
- },{"./util/assertString":63}],67:[function(require,module,exports){
5630
+ },{"./util/assertString":68}],72:[function(require,module,exports){
3460
5631
  "use strict";
3461
5632
 
3462
5633
  module.exports = {
@@ -3517,7 +5688,7 @@ module.exports = {
3517
5688
 
3518
5689
  };
3519
5690
 
3520
- },{}],68:[function(require,module,exports){
5691
+ },{}],73:[function(require,module,exports){
3521
5692
  /*jshint maxlen: false*/
3522
5693
 
3523
5694
  var validator = require("validator");
@@ -3648,7 +5819,7 @@ var FormatValidators = {
3648
5819
 
3649
5820
  module.exports = FormatValidators;
3650
5821
 
3651
- },{"validator":3}],69:[function(require,module,exports){
5822
+ },{"validator":4}],74:[function(require,module,exports){
3652
5823
  "use strict";
3653
5824
 
3654
5825
  var FormatValidators = require("./FormatValidators"),
@@ -4191,7 +6362,7 @@ exports.validate = function (report, schema, json) {
4191
6362
 
4192
6363
  };
4193
6364
 
4194
- },{"./FormatValidators":68,"./Report":71,"./Utils":75}],70:[function(require,module,exports){
6365
+ },{"./FormatValidators":73,"./Report":76,"./Utils":80}],75:[function(require,module,exports){
4195
6366
  // Number.isFinite polyfill
4196
6367
  // http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isfinite
4197
6368
  if (typeof Number.isFinite !== "function") {
@@ -4209,7 +6380,7 @@ if (typeof Number.isFinite !== "function") {
4209
6380
  };
4210
6381
  }
4211
6382
 
4212
- },{}],71:[function(require,module,exports){
6383
+ },{}],76:[function(require,module,exports){
4213
6384
  (function (process){
4214
6385
  "use strict";
4215
6386
 
@@ -4415,9 +6586,10 @@ Report.prototype.addCustomError = function (errorCode, errorMessage, params, sub
4415
6586
  module.exports = Report;
4416
6587
 
4417
6588
  }).call(this,require('_process'))
4418
- },{"./Errors":67,"./Utils":75,"_process":2,"lodash.get":1}],72:[function(require,module,exports){
6589
+ },{"./Errors":72,"./Utils":80,"_process":3,"lodash.get":1}],77:[function(require,module,exports){
4419
6590
  "use strict";
4420
6591
 
6592
+ var isequal = require("lodash.isequal");
4421
6593
  var Report = require("./Report");
4422
6594
  var SchemaCompilation = require("./SchemaCompilation");
4423
6595
  var SchemaValidation = require("./SchemaValidation");
@@ -4513,7 +6685,7 @@ exports.getSchema = function (report, schema) {
4513
6685
  exports.getSchemaByReference = function (report, key) {
4514
6686
  var i = this.referenceCache.length;
4515
6687
  while (i--) {
4516
- if (this.referenceCache[i][0] === key) {
6688
+ if (isequal(this.referenceCache[i][0], key)) {
4517
6689
  return this.referenceCache[i][1];
4518
6690
  }
4519
6691
  }
@@ -4570,7 +6742,7 @@ exports.getSchemaByUri = function (report, uri, root) {
4570
6742
 
4571
6743
  exports.getRemotePath = getRemotePath;
4572
6744
 
4573
- },{"./Report":71,"./SchemaCompilation":73,"./SchemaValidation":74,"./Utils":75}],73:[function(require,module,exports){
6745
+ },{"./Report":76,"./SchemaCompilation":78,"./SchemaValidation":79,"./Utils":80,"lodash.isequal":2}],78:[function(require,module,exports){
4574
6746
  "use strict";
4575
6747
 
4576
6748
  var Report = require("./Report");
@@ -4871,7 +7043,7 @@ exports.compileSchema = function (report, schema) {
4871
7043
 
4872
7044
  };
4873
7045
 
4874
- },{"./Report":71,"./SchemaCache":72,"./Utils":75}],74:[function(require,module,exports){
7046
+ },{"./Report":76,"./SchemaCache":77,"./Utils":80}],79:[function(require,module,exports){
4875
7047
  "use strict";
4876
7048
 
4877
7049
  var FormatValidators = require("./FormatValidators"),
@@ -5480,7 +7652,7 @@ exports.validateSchema = function (report, schema) {
5480
7652
  return isValid;
5481
7653
  };
5482
7654
 
5483
- },{"./FormatValidators":68,"./JsonValidation":69,"./Report":71,"./Utils":75}],75:[function(require,module,exports){
7655
+ },{"./FormatValidators":73,"./JsonValidation":74,"./Report":76,"./Utils":80}],80:[function(require,module,exports){
5484
7656
  "use strict";
5485
7657
 
5486
7658
  exports.isAbsoluteUri = function (uri) {
@@ -5699,7 +7871,7 @@ exports.ucs2decode = function (string) {
5699
7871
  };
5700
7872
  /*jshint +W016*/
5701
7873
 
5702
- },{}],76:[function(require,module,exports){
7874
+ },{}],81:[function(require,module,exports){
5703
7875
  (function (process){
5704
7876
  "use strict";
5705
7877
 
@@ -6055,7 +8227,7 @@ ZSchema.getDefaultOptions = function () {
6055
8227
  module.exports = ZSchema;
6056
8228
 
6057
8229
  }).call(this,require('_process'))
6058
- },{"./FormatValidators":68,"./JsonValidation":69,"./Polyfills":70,"./Report":71,"./SchemaCache":72,"./SchemaCompilation":73,"./SchemaValidation":74,"./Utils":75,"./schemas/hyper-schema.json":77,"./schemas/schema.json":78,"_process":2,"lodash.get":1}],77:[function(require,module,exports){
8230
+ },{"./FormatValidators":73,"./JsonValidation":74,"./Polyfills":75,"./Report":76,"./SchemaCache":77,"./SchemaCompilation":78,"./SchemaValidation":79,"./Utils":80,"./schemas/hyper-schema.json":82,"./schemas/schema.json":83,"_process":3,"lodash.get":1}],82:[function(require,module,exports){
6059
8231
  module.exports={
6060
8232
  "$schema": "http://json-schema.org/draft-04/hyper-schema#",
6061
8233
  "id": "http://json-schema.org/draft-04/hyper-schema#",
@@ -6215,7 +8387,7 @@ module.exports={
6215
8387
  }
6216
8388
 
6217
8389
 
6218
- },{}],78:[function(require,module,exports){
8390
+ },{}],83:[function(require,module,exports){
6219
8391
  module.exports={
6220
8392
  "id": "http://json-schema.org/draft-04/schema#",
6221
8393
  "$schema": "http://json-schema.org/draft-04/schema#",
@@ -6368,5 +8540,5 @@ module.exports={
6368
8540
  "default": {}
6369
8541
  }
6370
8542
 
6371
- },{}]},{},[67,68,69,70,71,72,73,74,75,76])(76)
8543
+ },{}]},{},[72,73,74,75,76,77,78,79,80,81])(81)
6372
8544
  });