z-schema 4.2.1 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -155,7 +155,7 @@ function fromByteArray (uint8) {
155
155
  },{}],2:[function(require,module,exports){
156
156
 
157
157
  },{}],3:[function(require,module,exports){
158
- (function (global){
158
+ (function (global){(function (){
159
159
  /*! https://mths.be/punycode v1.4.1 by @mathias */
160
160
  ;(function(root) {
161
161
 
@@ -690,9 +690,9 @@ function fromByteArray (uint8) {
690
690
 
691
691
  }(this));
692
692
 
693
- }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
693
+ }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
694
694
  },{}],4:[function(require,module,exports){
695
- (function (Buffer){
695
+ (function (Buffer){(function (){
696
696
  /*!
697
697
  * The buffer module from node.js, for the browser.
698
698
  *
@@ -705,10 +705,6 @@ function fromByteArray (uint8) {
705
705
 
706
706
  var base64 = require('base64-js')
707
707
  var ieee754 = require('ieee754')
708
- var customInspectSymbol =
709
- (typeof Symbol === 'function' && typeof Symbol.for === 'function')
710
- ? Symbol.for('nodejs.util.inspect.custom')
711
- : null
712
708
 
713
709
  exports.Buffer = Buffer
714
710
  exports.SlowBuffer = SlowBuffer
@@ -745,9 +741,7 @@ function typedArraySupport () {
745
741
  // Can typed array instances can be augmented?
746
742
  try {
747
743
  var arr = new Uint8Array(1)
748
- var proto = { foo: function () { return 42 } }
749
- Object.setPrototypeOf(proto, Uint8Array.prototype)
750
- Object.setPrototypeOf(arr, proto)
744
+ arr.__proto__ = { __proto__: Uint8Array.prototype, foo: function () { return 42 } }
751
745
  return arr.foo() === 42
752
746
  } catch (e) {
753
747
  return false
@@ -776,7 +770,7 @@ function createBuffer (length) {
776
770
  }
777
771
  // Return an augmented `Uint8Array` instance
778
772
  var buf = new Uint8Array(length)
779
- Object.setPrototypeOf(buf, Buffer.prototype)
773
+ buf.__proto__ = Buffer.prototype
780
774
  return buf
781
775
  }
782
776
 
@@ -826,7 +820,7 @@ function from (value, encodingOrOffset, length) {
826
820
  }
827
821
 
828
822
  if (value == null) {
829
- throw new TypeError(
823
+ throw TypeError(
830
824
  'The first argument must be one of type string, Buffer, ArrayBuffer, Array, ' +
831
825
  'or Array-like Object. Received type ' + (typeof value)
832
826
  )
@@ -878,8 +872,8 @@ Buffer.from = function (value, encodingOrOffset, length) {
878
872
 
879
873
  // Note: Change prototype *after* Buffer.from is defined to workaround Chrome bug:
880
874
  // https://github.com/feross/buffer/pull/148
881
- Object.setPrototypeOf(Buffer.prototype, Uint8Array.prototype)
882
- Object.setPrototypeOf(Buffer, Uint8Array)
875
+ Buffer.prototype.__proto__ = Uint8Array.prototype
876
+ Buffer.__proto__ = Uint8Array
883
877
 
884
878
  function assertSize (size) {
885
879
  if (typeof size !== 'number') {
@@ -983,8 +977,7 @@ function fromArrayBuffer (array, byteOffset, length) {
983
977
  }
984
978
 
985
979
  // Return an augmented `Uint8Array` instance
986
- Object.setPrototypeOf(buf, Buffer.prototype)
987
-
980
+ buf.__proto__ = Buffer.prototype
988
981
  return buf
989
982
  }
990
983
 
@@ -1306,9 +1299,6 @@ Buffer.prototype.inspect = function inspect () {
1306
1299
  if (this.length > max) str += ' ... '
1307
1300
  return '<Buffer ' + str + '>'
1308
1301
  }
1309
- if (customInspectSymbol) {
1310
- Buffer.prototype[customInspectSymbol] = Buffer.prototype.inspect
1311
- }
1312
1302
 
1313
1303
  Buffer.prototype.compare = function compare (target, start, end, thisStart, thisEnd) {
1314
1304
  if (isInstance(target, Uint8Array)) {
@@ -1434,7 +1424,7 @@ function bidirectionalIndexOf (buffer, val, byteOffset, encoding, dir) {
1434
1424
  return Uint8Array.prototype.lastIndexOf.call(buffer, val, byteOffset)
1435
1425
  }
1436
1426
  }
1437
- return arrayIndexOf(buffer, [val], byteOffset, encoding, dir)
1427
+ return arrayIndexOf(buffer, [ val ], byteOffset, encoding, dir)
1438
1428
  }
1439
1429
 
1440
1430
  throw new TypeError('val must be string, number or Buffer')
@@ -1763,7 +1753,7 @@ function hexSlice (buf, start, end) {
1763
1753
 
1764
1754
  var out = ''
1765
1755
  for (var i = start; i < end; ++i) {
1766
- out += hexSliceLookupTable[buf[i]]
1756
+ out += toHex(buf[i])
1767
1757
  }
1768
1758
  return out
1769
1759
  }
@@ -1800,8 +1790,7 @@ Buffer.prototype.slice = function slice (start, end) {
1800
1790
 
1801
1791
  var newBuf = this.subarray(start, end)
1802
1792
  // Return an augmented `Uint8Array` instance
1803
- Object.setPrototypeOf(newBuf, Buffer.prototype)
1804
-
1793
+ newBuf.__proto__ = Buffer.prototype
1805
1794
  return newBuf
1806
1795
  }
1807
1796
 
@@ -2290,8 +2279,6 @@ Buffer.prototype.fill = function fill (val, start, end, encoding) {
2290
2279
  }
2291
2280
  } else if (typeof val === 'number') {
2292
2281
  val = val & 255
2293
- } else if (typeof val === 'boolean') {
2294
- val = Number(val)
2295
2282
  }
2296
2283
 
2297
2284
  // Invalid ranges are not set to a default, so can range check early.
@@ -2349,6 +2336,11 @@ function base64clean (str) {
2349
2336
  return str
2350
2337
  }
2351
2338
 
2339
+ function toHex (n) {
2340
+ if (n < 16) return '0' + n.toString(16)
2341
+ return n.toString(16)
2342
+ }
2343
+
2352
2344
  function utf8ToBytes (string, units) {
2353
2345
  units = units || Infinity
2354
2346
  var codePoint
@@ -2479,21 +2471,7 @@ function numberIsNaN (obj) {
2479
2471
  return obj !== obj // eslint-disable-line no-self-compare
2480
2472
  }
2481
2473
 
2482
- // Create lookup table for `toString('hex')`
2483
- // See: https://github.com/feross/buffer/issues/219
2484
- var hexSliceLookupTable = (function () {
2485
- var alphabet = '0123456789abcdef'
2486
- var table = new Array(256)
2487
- for (var i = 0; i < 16; ++i) {
2488
- var i16 = i * 16
2489
- for (var j = 0; j < 16; ++j) {
2490
- table[i16 + j] = alphabet[i] + alphabet[j]
2491
- }
2492
- }
2493
- return table
2494
- })()
2495
-
2496
- }).call(this,require("buffer").Buffer)
2474
+ }).call(this)}).call(this,require("buffer").Buffer)
2497
2475
  },{"base64-js":1,"buffer":4,"ieee754":8}],5:[function(require,module,exports){
2498
2476
  module.exports = {
2499
2477
  "100": "Continue",
@@ -3234,7 +3212,7 @@ if (typeof Object.create === 'function') {
3234
3212
  }
3235
3213
 
3236
3214
  },{}],10:[function(require,module,exports){
3237
- (function (global){
3215
+ (function (global){(function (){
3238
3216
  /**
3239
3217
  * lodash (Custom Build) <https://lodash.com/>
3240
3218
  * Build: `lodash modularize exports="npm" -o ./`
@@ -4167,9 +4145,9 @@ function get(object, path, defaultValue) {
4167
4145
 
4168
4146
  module.exports = get;
4169
4147
 
4170
- }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
4148
+ }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
4171
4149
  },{}],11:[function(require,module,exports){
4172
- (function (global){
4150
+ (function (global){(function (){
4173
4151
  /**
4174
4152
  * Lodash (Custom Build) <https://lodash.com/>
4175
4153
  * Build: `lodash modularize exports="npm" -o ./`
@@ -6019,7 +5997,7 @@ function stubFalse() {
6019
5997
 
6020
5998
  module.exports = isEqual;
6021
5999
 
6022
- }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
6000
+ }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
6023
6001
  },{}],12:[function(require,module,exports){
6024
6002
  // shim for using process in browser
6025
6003
  var process = module.exports = {};
@@ -6386,6 +6364,7 @@ exports.decode = exports.parse = require('./decode');
6386
6364
  exports.encode = exports.stringify = require('./encode');
6387
6365
 
6388
6366
  },{"./decode":13,"./encode":14}],16:[function(require,module,exports){
6367
+ /*! safe-buffer. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
6389
6368
  /* eslint-disable node/no-deprecated-api */
6390
6369
  var buffer = require('buffer')
6391
6370
  var Buffer = buffer.Buffer
@@ -6452,7 +6431,7 @@ SafeBuffer.allocUnsafeSlow = function (size) {
6452
6431
  }
6453
6432
 
6454
6433
  },{"buffer":4}],17:[function(require,module,exports){
6455
- (function (global){
6434
+ (function (global){(function (){
6456
6435
  var ClientRequest = require('./lib/request')
6457
6436
  var response = require('./lib/response')
6458
6437
  var extend = require('xtend')
@@ -6538,9 +6517,9 @@ http.METHODS = [
6538
6517
  'UNLOCK',
6539
6518
  'UNSUBSCRIBE'
6540
6519
  ]
6541
- }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
6542
- },{"./lib/request":19,"./lib/response":20,"builtin-status-codes":5,"url":37,"xtend":119}],18:[function(require,module,exports){
6543
- (function (global){
6520
+ }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
6521
+ },{"./lib/request":19,"./lib/response":20,"builtin-status-codes":5,"url":37,"xtend":122}],18:[function(require,module,exports){
6522
+ (function (global){(function (){
6544
6523
  exports.fetch = isFunction(global.fetch) && isFunction(global.ReadableStream)
6545
6524
 
6546
6525
  exports.writableStream = isFunction(global.WritableStream)
@@ -6601,9 +6580,9 @@ function isFunction (value) {
6601
6580
 
6602
6581
  xhr = null // Help gc
6603
6582
 
6604
- }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
6583
+ }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
6605
6584
  },{}],19:[function(require,module,exports){
6606
- (function (process,global,Buffer){
6585
+ (function (process,global,Buffer){(function (){
6607
6586
  var capability = require('./capability')
6608
6587
  var inherits = require('inherits')
6609
6588
  var response = require('./response')
@@ -6726,7 +6705,6 @@ ClientRequest.prototype._onFinish = function () {
6726
6705
 
6727
6706
  if (self._mode === 'fetch') {
6728
6707
  var signal = null
6729
- var fetchTimer = null
6730
6708
  if (capability.abortController) {
6731
6709
  var controller = new AbortController()
6732
6710
  signal = controller.signal
@@ -6920,9 +6898,9 @@ var unsafeHeaders = [
6920
6898
  'via'
6921
6899
  ]
6922
6900
 
6923
- }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer)
6901
+ }).call(this)}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer)
6924
6902
  },{"./capability":18,"./response":20,"_process":12,"buffer":4,"inherits":9,"readable-stream":35}],20:[function(require,module,exports){
6925
- (function (process,global,Buffer){
6903
+ (function (process,global,Buffer){(function (){
6926
6904
  var capability = require('./capability')
6927
6905
  var inherits = require('inherits')
6928
6906
  var stream = require('readable-stream')
@@ -7131,7 +7109,7 @@ IncomingMessage.prototype._onXHRProgress = function () {
7131
7109
  }
7132
7110
  }
7133
7111
 
7134
- }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer)
7112
+ }).call(this)}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {},require("buffer").Buffer)
7135
7113
  },{"./capability":18,"_process":12,"buffer":4,"inherits":9,"readable-stream":35}],21:[function(require,module,exports){
7136
7114
  'use strict';
7137
7115
 
@@ -7262,28 +7240,7 @@ createErrorType('ERR_STREAM_UNSHIFT_AFTER_END_EVENT', 'stream.unshift() after en
7262
7240
  module.exports.codes = codes;
7263
7241
 
7264
7242
  },{}],22:[function(require,module,exports){
7265
- (function (process){
7266
- 'use strict'
7267
-
7268
- var experimentalWarnings = new Set();
7269
-
7270
- function emitExperimentalWarning(feature) {
7271
- if (experimentalWarnings.has(feature)) return;
7272
- var msg = feature + ' is an experimental feature. This feature could ' +
7273
- 'change at any time';
7274
- experimentalWarnings.add(feature);
7275
- process.emitWarning(msg, 'ExperimentalWarning');
7276
- }
7277
-
7278
- function noop() {}
7279
-
7280
- module.exports.emitExperimentalWarning = process.emitWarning
7281
- ? emitExperimentalWarning
7282
- : noop;
7283
-
7284
- }).call(this,require('_process'))
7285
- },{"_process":12}],23:[function(require,module,exports){
7286
- (function (process){
7243
+ (function (process){(function (){
7287
7244
  // Copyright Joyent, Inc. and other Node contributors.
7288
7245
  //
7289
7246
  // Permission is hereby granted, free of charge, to any person obtaining a
@@ -7423,8 +7380,8 @@ Object.defineProperty(Duplex.prototype, 'destroyed', {
7423
7380
  this._writableState.destroyed = value;
7424
7381
  }
7425
7382
  });
7426
- }).call(this,require('_process'))
7427
- },{"./_stream_readable":25,"./_stream_writable":27,"_process":12,"inherits":9}],24:[function(require,module,exports){
7383
+ }).call(this)}).call(this,require('_process'))
7384
+ },{"./_stream_readable":24,"./_stream_writable":26,"_process":12,"inherits":9}],23:[function(require,module,exports){
7428
7385
  // Copyright Joyent, Inc. and other Node contributors.
7429
7386
  //
7430
7387
  // Permission is hereby granted, free of charge, to any person obtaining a
@@ -7464,8 +7421,8 @@ function PassThrough(options) {
7464
7421
  PassThrough.prototype._transform = function (chunk, encoding, cb) {
7465
7422
  cb(null, chunk);
7466
7423
  };
7467
- },{"./_stream_transform":26,"inherits":9}],25:[function(require,module,exports){
7468
- (function (process,global){
7424
+ },{"./_stream_transform":25,"inherits":9}],24:[function(require,module,exports){
7425
+ (function (process,global){(function (){
7469
7426
  // Copyright Joyent, Inc. and other Node contributors.
7470
7427
  //
7471
7428
  // Permission is hereby granted, free of charge, to any person obtaining a
@@ -7548,17 +7505,16 @@ var _require$codes = require('../errors').codes,
7548
7505
  ERR_INVALID_ARG_TYPE = _require$codes.ERR_INVALID_ARG_TYPE,
7549
7506
  ERR_STREAM_PUSH_AFTER_EOF = _require$codes.ERR_STREAM_PUSH_AFTER_EOF,
7550
7507
  ERR_METHOD_NOT_IMPLEMENTED = _require$codes.ERR_METHOD_NOT_IMPLEMENTED,
7551
- ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;
7552
-
7553
- var _require2 = require('../experimentalWarning'),
7554
- emitExperimentalWarning = _require2.emitExperimentalWarning; // Lazy loaded to improve the startup performance.
7508
+ ERR_STREAM_UNSHIFT_AFTER_END_EVENT = _require$codes.ERR_STREAM_UNSHIFT_AFTER_END_EVENT; // Lazy loaded to improve the startup performance.
7555
7509
 
7556
7510
 
7557
7511
  var StringDecoder;
7558
7512
  var createReadableStreamAsyncIterator;
7513
+ var from;
7559
7514
 
7560
7515
  require('inherits')(Readable, Stream);
7561
7516
 
7517
+ var errorOrDestroy = destroyImpl.errorOrDestroy;
7562
7518
  var kProxyEvents = ['error', 'close', 'destroy', 'pause', 'resume'];
7563
7519
 
7564
7520
  function prependListener(emitter, event, fn) {
@@ -7612,7 +7568,9 @@ function ReadableState(options, stream, isDuplex) {
7612
7568
  this.resumeScheduled = false;
7613
7569
  this.paused = true; // Should close be emitted on destroy. Defaults to true.
7614
7570
 
7615
- this.emitClose = options.emitClose !== false; // has it been destroyed
7571
+ this.emitClose = options.emitClose !== false; // Should .destroy() be called after 'end' (and potentially 'finish')
7572
+
7573
+ this.autoDestroy = !!options.autoDestroy; // has it been destroyed
7616
7574
 
7617
7575
  this.destroyed = false; // Crypto is kind of old and crusty. Historically, its default string
7618
7576
  // encoding is 'binary' so we have to make this configurable.
@@ -7725,16 +7683,16 @@ function readableAddChunk(stream, chunk, encoding, addToFront, skipChunkCheck) {
7725
7683
  if (!skipChunkCheck) er = chunkInvalid(state, chunk);
7726
7684
 
7727
7685
  if (er) {
7728
- stream.emit('error', er);
7686
+ errorOrDestroy(stream, er);
7729
7687
  } else if (state.objectMode || chunk && chunk.length > 0) {
7730
7688
  if (typeof chunk !== 'string' && !state.objectMode && Object.getPrototypeOf(chunk) !== Buffer.prototype) {
7731
7689
  chunk = _uint8ArrayToBuffer(chunk);
7732
7690
  }
7733
7691
 
7734
7692
  if (addToFront) {
7735
- if (state.endEmitted) stream.emit('error', new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());else addChunk(stream, state, chunk, true);
7693
+ if (state.endEmitted) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());else addChunk(stream, state, chunk, true);
7736
7694
  } else if (state.ended) {
7737
- stream.emit('error', new ERR_STREAM_PUSH_AFTER_EOF());
7695
+ errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF());
7738
7696
  } else if (state.destroyed) {
7739
7697
  return false;
7740
7698
  } else {
@@ -7790,17 +7748,32 @@ Readable.prototype.isPaused = function () {
7790
7748
 
7791
7749
  Readable.prototype.setEncoding = function (enc) {
7792
7750
  if (!StringDecoder) StringDecoder = require('string_decoder/').StringDecoder;
7793
- this._readableState.decoder = new StringDecoder(enc); // if setEncoding(null), decoder.encoding equals utf8
7751
+ var decoder = new StringDecoder(enc);
7752
+ this._readableState.decoder = decoder; // If setEncoding(null), decoder.encoding equals utf8
7753
+
7754
+ this._readableState.encoding = this._readableState.decoder.encoding; // Iterate over current buffer to convert already stored Buffers:
7755
+
7756
+ var p = this._readableState.buffer.head;
7757
+ var content = '';
7794
7758
 
7795
- this._readableState.encoding = this._readableState.decoder.encoding;
7759
+ while (p !== null) {
7760
+ content += decoder.write(p.data);
7761
+ p = p.next;
7762
+ }
7763
+
7764
+ this._readableState.buffer.clear();
7765
+
7766
+ if (content !== '') this._readableState.buffer.push(content);
7767
+ this._readableState.length = content.length;
7796
7768
  return this;
7797
- }; // Don't raise the hwm > 8MB
7769
+ }; // Don't raise the hwm > 1GB
7798
7770
 
7799
7771
 
7800
- var MAX_HWM = 0x800000;
7772
+ var MAX_HWM = 0x40000000;
7801
7773
 
7802
7774
  function computeNewHighWaterMark(n) {
7803
7775
  if (n >= MAX_HWM) {
7776
+ // TODO(ronag): Throw ERR_VALUE_OUT_OF_RANGE.
7804
7777
  n = MAX_HWM;
7805
7778
  } else {
7806
7779
  // Get the next highest power of 2 to prevent increasing hwm excessively in
@@ -7917,7 +7890,7 @@ Readable.prototype.read = function (n) {
7917
7890
  if (n > 0) ret = fromList(n, state);else ret = null;
7918
7891
 
7919
7892
  if (ret === null) {
7920
- state.needReadable = true;
7893
+ state.needReadable = state.length <= state.highWaterMark;
7921
7894
  n = 0;
7922
7895
  } else {
7923
7896
  state.length -= n;
@@ -7937,6 +7910,7 @@ Readable.prototype.read = function (n) {
7937
7910
  };
7938
7911
 
7939
7912
  function onEofChunk(stream, state) {
7913
+ debug('onEofChunk');
7940
7914
  if (state.ended) return;
7941
7915
 
7942
7916
  if (state.decoder) {
@@ -7971,6 +7945,7 @@ function onEofChunk(stream, state) {
7971
7945
 
7972
7946
  function emitReadable(stream) {
7973
7947
  var state = stream._readableState;
7948
+ debug('emitReadable', state.needReadable, state.emittedReadable);
7974
7949
  state.needReadable = false;
7975
7950
 
7976
7951
  if (!state.emittedReadable) {
@@ -7986,6 +7961,7 @@ function emitReadable_(stream) {
7986
7961
 
7987
7962
  if (!state.destroyed && (state.length || state.ended)) {
7988
7963
  stream.emit('readable');
7964
+ state.emittedReadable = false;
7989
7965
  } // The stream needs another readable event if
7990
7966
  // 1. It is not flowing, as the flow mechanism will take
7991
7967
  // care of it.
@@ -8051,7 +8027,7 @@ function maybeReadMore_(stream, state) {
8051
8027
 
8052
8028
 
8053
8029
  Readable.prototype._read = function (n) {
8054
- this.emit('error', new ERR_METHOD_NOT_IMPLEMENTED('_read()'));
8030
+ errorOrDestroy(this, new ERR_METHOD_NOT_IMPLEMENTED('_read()'));
8055
8031
  };
8056
8032
 
8057
8033
  Readable.prototype.pipe = function (dest, pipeOpts) {
@@ -8150,7 +8126,7 @@ Readable.prototype.pipe = function (dest, pipeOpts) {
8150
8126
  debug('onerror', er);
8151
8127
  unpipe();
8152
8128
  dest.removeListener('error', onerror);
8153
- if (EElistenerCount(dest, 'error') === 0) dest.emit('error', er);
8129
+ if (EElistenerCount(dest, 'error') === 0) errorOrDestroy(dest, er);
8154
8130
  } // Make sure our error handler is attached before userland ones.
8155
8131
 
8156
8132
 
@@ -8454,8 +8430,6 @@ Readable.prototype.wrap = function (stream) {
8454
8430
 
8455
8431
  if (typeof Symbol === 'function') {
8456
8432
  Readable.prototype[Symbol.asyncIterator] = function () {
8457
- emitExperimentalWarning('Readable[Symbol.asyncIterator]');
8458
-
8459
8433
  if (createReadableStreamAsyncIterator === undefined) {
8460
8434
  createReadableStreamAsyncIterator = require('./internal/streams/async_iterator');
8461
8435
  }
@@ -8543,9 +8517,29 @@ function endReadableNT(state, stream) {
8543
8517
  state.endEmitted = true;
8544
8518
  stream.readable = false;
8545
8519
  stream.emit('end');
8520
+
8521
+ if (state.autoDestroy) {
8522
+ // In case of duplex streams we need a way to detect
8523
+ // if the writable side is ready for autoDestroy as well
8524
+ var wState = stream._writableState;
8525
+
8526
+ if (!wState || wState.autoDestroy && wState.finished) {
8527
+ stream.destroy();
8528
+ }
8529
+ }
8546
8530
  }
8547
8531
  }
8548
8532
 
8533
+ if (typeof Symbol === 'function') {
8534
+ Readable.from = function (iterable, opts) {
8535
+ if (from === undefined) {
8536
+ from = require('./internal/streams/from');
8537
+ }
8538
+
8539
+ return from(Readable, iterable, opts);
8540
+ };
8541
+ }
8542
+
8549
8543
  function indexOf(xs, x) {
8550
8544
  for (var i = 0, l = xs.length; i < l; i++) {
8551
8545
  if (xs[i] === x) return i;
@@ -8553,8 +8547,8 @@ function indexOf(xs, x) {
8553
8547
 
8554
8548
  return -1;
8555
8549
  }
8556
- }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
8557
- },{"../errors":21,"../experimentalWarning":22,"./_stream_duplex":23,"./internal/streams/async_iterator":28,"./internal/streams/buffer_list":29,"./internal/streams/destroy":30,"./internal/streams/state":33,"./internal/streams/stream":34,"_process":12,"buffer":4,"events":6,"inherits":9,"string_decoder/":36,"util":2}],26:[function(require,module,exports){
8550
+ }).call(this)}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
8551
+ },{"../errors":21,"./_stream_duplex":22,"./internal/streams/async_iterator":27,"./internal/streams/buffer_list":28,"./internal/streams/destroy":29,"./internal/streams/from":31,"./internal/streams/state":33,"./internal/streams/stream":34,"_process":12,"buffer":4,"events":6,"inherits":9,"string_decoder/":36,"util":2}],25:[function(require,module,exports){
8558
8552
  // Copyright Joyent, Inc. and other Node contributors.
8559
8553
  //
8560
8554
  // Permission is hereby granted, free of charge, to any person obtaining a
@@ -8756,8 +8750,8 @@ function done(stream, er, data) {
8756
8750
  if (stream._transformState.transforming) throw new ERR_TRANSFORM_ALREADY_TRANSFORMING();
8757
8751
  return stream.push(null);
8758
8752
  }
8759
- },{"../errors":21,"./_stream_duplex":23,"inherits":9}],27:[function(require,module,exports){
8760
- (function (process,global){
8753
+ },{"../errors":21,"./_stream_duplex":22,"inherits":9}],26:[function(require,module,exports){
8754
+ (function (process,global){(function (){
8761
8755
  // Copyright Joyent, Inc. and other Node contributors.
8762
8756
  //
8763
8757
  // Permission is hereby granted, free of charge, to any person obtaining a
@@ -8854,6 +8848,8 @@ var _require$codes = require('../errors').codes,
8854
8848
  ERR_STREAM_WRITE_AFTER_END = _require$codes.ERR_STREAM_WRITE_AFTER_END,
8855
8849
  ERR_UNKNOWN_ENCODING = _require$codes.ERR_UNKNOWN_ENCODING;
8856
8850
 
8851
+ var errorOrDestroy = destroyImpl.errorOrDestroy;
8852
+
8857
8853
  require('inherits')(Writable, Stream);
8858
8854
 
8859
8855
  function nop() {}
@@ -8933,7 +8929,9 @@ function WritableState(options, stream, isDuplex) {
8933
8929
 
8934
8930
  this.errorEmitted = false; // Should close be emitted on destroy. Defaults to true.
8935
8931
 
8936
- this.emitClose = options.emitClose !== false; // count buffered requests
8932
+ this.emitClose = options.emitClose !== false; // Should .destroy() be called after 'finish' (and potentially 'end')
8933
+
8934
+ this.autoDestroy = !!options.autoDestroy; // count buffered requests
8937
8935
 
8938
8936
  this.bufferedRequestCount = 0; // allocate the first CorkedRequest, there is always
8939
8937
  // one allocated and free to use, and we maintain at most two
@@ -9010,13 +9008,13 @@ function Writable(options) {
9010
9008
 
9011
9009
 
9012
9010
  Writable.prototype.pipe = function () {
9013
- this.emit('error', new ERR_STREAM_CANNOT_PIPE());
9011
+ errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE());
9014
9012
  };
9015
9013
 
9016
9014
  function writeAfterEnd(stream, cb) {
9017
9015
  var er = new ERR_STREAM_WRITE_AFTER_END(); // TODO: defer error events consistently everywhere, not just the cb
9018
9016
 
9019
- stream.emit('error', er);
9017
+ errorOrDestroy(stream, er);
9020
9018
  process.nextTick(cb, er);
9021
9019
  } // Checks that a user-supplied chunk is valid, especially for the particular
9022
9020
  // mode the stream is in. Currently this means that `null` is never accepted
@@ -9033,7 +9031,7 @@ function validChunk(stream, state, chunk, cb) {
9033
9031
  }
9034
9032
 
9035
9033
  if (er) {
9036
- stream.emit('error', er);
9034
+ errorOrDestroy(stream, er);
9037
9035
  process.nextTick(cb, er);
9038
9036
  return false;
9039
9037
  }
@@ -9177,13 +9175,13 @@ function onwriteError(stream, state, sync, er, cb) {
9177
9175
 
9178
9176
  process.nextTick(finishMaybe, stream, state);
9179
9177
  stream._writableState.errorEmitted = true;
9180
- stream.emit('error', er);
9178
+ errorOrDestroy(stream, er);
9181
9179
  } else {
9182
9180
  // the caller expect this to happen before if
9183
9181
  // it is async
9184
9182
  cb(er);
9185
9183
  stream._writableState.errorEmitted = true;
9186
- stream.emit('error', er); // this can emit finish, but finish must
9184
+ errorOrDestroy(stream, er); // this can emit finish, but finish must
9187
9185
  // always follow error
9188
9186
 
9189
9187
  finishMaybe(stream, state);
@@ -9347,7 +9345,7 @@ function callFinal(stream, state) {
9347
9345
  state.pendingcb--;
9348
9346
 
9349
9347
  if (err) {
9350
- stream.emit('error', err);
9348
+ errorOrDestroy(stream, err);
9351
9349
  }
9352
9350
 
9353
9351
  state.prefinished = true;
@@ -9378,6 +9376,16 @@ function finishMaybe(stream, state) {
9378
9376
  if (state.pendingcb === 0) {
9379
9377
  state.finished = true;
9380
9378
  stream.emit('finish');
9379
+
9380
+ if (state.autoDestroy) {
9381
+ // In case of duplex streams we need a way to detect
9382
+ // if the readable side is ready for autoDestroy as well
9383
+ var rState = stream._readableState;
9384
+
9385
+ if (!rState || rState.autoDestroy && rState.endEmitted) {
9386
+ stream.destroy();
9387
+ }
9388
+ }
9381
9389
  }
9382
9390
  }
9383
9391
 
@@ -9441,9 +9449,9 @@ Writable.prototype._undestroy = destroyImpl.undestroy;
9441
9449
  Writable.prototype._destroy = function (err, cb) {
9442
9450
  cb(err);
9443
9451
  };
9444
- }).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
9445
- },{"../errors":21,"./_stream_duplex":23,"./internal/streams/destroy":30,"./internal/streams/state":33,"./internal/streams/stream":34,"_process":12,"buffer":4,"inherits":9,"util-deprecate":39}],28:[function(require,module,exports){
9446
- (function (process){
9452
+ }).call(this)}).call(this,require('_process'),typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
9453
+ },{"../errors":21,"./_stream_duplex":22,"./internal/streams/destroy":29,"./internal/streams/state":33,"./internal/streams/stream":34,"_process":12,"buffer":4,"inherits":9,"util-deprecate":39}],27:[function(require,module,exports){
9454
+ (function (process){(function (){
9447
9455
  'use strict';
9448
9456
 
9449
9457
  var _Object$setPrototypeO;
@@ -9651,14 +9659,22 @@ var createReadableStreamAsyncIterator = function createReadableStreamAsyncIterat
9651
9659
  };
9652
9660
 
9653
9661
  module.exports = createReadableStreamAsyncIterator;
9654
- }).call(this,require('_process'))
9655
- },{"./end-of-stream":31,"_process":12}],29:[function(require,module,exports){
9662
+ }).call(this)}).call(this,require('_process'))
9663
+ },{"./end-of-stream":30,"_process":12}],28:[function(require,module,exports){
9656
9664
  'use strict';
9657
9665
 
9658
- function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; var ownKeys = Object.keys(source); if (typeof Object.getOwnPropertySymbols === 'function') { ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) { return Object.getOwnPropertyDescriptor(source, sym).enumerable; })); } ownKeys.forEach(function (key) { _defineProperty(target, key, source[key]); }); } return target; }
9666
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; }
9667
+
9668
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; }
9659
9669
 
9660
9670
  function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
9661
9671
 
9672
+ function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("Cannot call a class as a function"); } }
9673
+
9674
+ function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
9675
+
9676
+ function _createClass(Constructor, protoProps, staticProps) { if (protoProps) _defineProperties(Constructor.prototype, protoProps); if (staticProps) _defineProperties(Constructor, staticProps); return Constructor; }
9677
+
9662
9678
  var _require = require('buffer'),
9663
9679
  Buffer = _require.Buffer;
9664
9680
 
@@ -9675,175 +9691,188 @@ module.exports =
9675
9691
  /*#__PURE__*/
9676
9692
  function () {
9677
9693
  function BufferList() {
9694
+ _classCallCheck(this, BufferList);
9695
+
9678
9696
  this.head = null;
9679
9697
  this.tail = null;
9680
9698
  this.length = 0;
9681
9699
  }
9682
9700
 
9683
- var _proto = BufferList.prototype;
9684
-
9685
- _proto.push = function push(v) {
9686
- var entry = {
9687
- data: v,
9688
- next: null
9689
- };
9690
- if (this.length > 0) this.tail.next = entry;else this.head = entry;
9691
- this.tail = entry;
9692
- ++this.length;
9693
- };
9694
-
9695
- _proto.unshift = function unshift(v) {
9696
- var entry = {
9697
- data: v,
9698
- next: this.head
9699
- };
9700
- if (this.length === 0) this.tail = entry;
9701
- this.head = entry;
9702
- ++this.length;
9703
- };
9704
-
9705
- _proto.shift = function shift() {
9706
- if (this.length === 0) return;
9707
- var ret = this.head.data;
9708
- if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
9709
- --this.length;
9710
- return ret;
9711
- };
9712
-
9713
- _proto.clear = function clear() {
9714
- this.head = this.tail = null;
9715
- this.length = 0;
9716
- };
9717
-
9718
- _proto.join = function join(s) {
9719
- if (this.length === 0) return '';
9720
- var p = this.head;
9721
- var ret = '' + p.data;
9722
-
9723
- while (p = p.next) {
9724
- ret += s + p.data;
9725
- }
9726
-
9727
- return ret;
9728
- };
9729
-
9730
- _proto.concat = function concat(n) {
9731
- if (this.length === 0) return Buffer.alloc(0);
9732
- var ret = Buffer.allocUnsafe(n >>> 0);
9733
- var p = this.head;
9734
- var i = 0;
9701
+ _createClass(BufferList, [{
9702
+ key: "push",
9703
+ value: function push(v) {
9704
+ var entry = {
9705
+ data: v,
9706
+ next: null
9707
+ };
9708
+ if (this.length > 0) this.tail.next = entry;else this.head = entry;
9709
+ this.tail = entry;
9710
+ ++this.length;
9711
+ }
9712
+ }, {
9713
+ key: "unshift",
9714
+ value: function unshift(v) {
9715
+ var entry = {
9716
+ data: v,
9717
+ next: this.head
9718
+ };
9719
+ if (this.length === 0) this.tail = entry;
9720
+ this.head = entry;
9721
+ ++this.length;
9722
+ }
9723
+ }, {
9724
+ key: "shift",
9725
+ value: function shift() {
9726
+ if (this.length === 0) return;
9727
+ var ret = this.head.data;
9728
+ if (this.length === 1) this.head = this.tail = null;else this.head = this.head.next;
9729
+ --this.length;
9730
+ return ret;
9731
+ }
9732
+ }, {
9733
+ key: "clear",
9734
+ value: function clear() {
9735
+ this.head = this.tail = null;
9736
+ this.length = 0;
9737
+ }
9738
+ }, {
9739
+ key: "join",
9740
+ value: function join(s) {
9741
+ if (this.length === 0) return '';
9742
+ var p = this.head;
9743
+ var ret = '' + p.data;
9744
+
9745
+ while (p = p.next) {
9746
+ ret += s + p.data;
9747
+ }
9735
9748
 
9736
- while (p) {
9737
- copyBuffer(p.data, ret, i);
9738
- i += p.data.length;
9739
- p = p.next;
9749
+ return ret;
9740
9750
  }
9751
+ }, {
9752
+ key: "concat",
9753
+ value: function concat(n) {
9754
+ if (this.length === 0) return Buffer.alloc(0);
9755
+ var ret = Buffer.allocUnsafe(n >>> 0);
9756
+ var p = this.head;
9757
+ var i = 0;
9741
9758
 
9742
- return ret;
9743
- } // Consumes a specified amount of bytes or characters from the buffered data.
9744
- ;
9745
-
9746
- _proto.consume = function consume(n, hasStrings) {
9747
- var ret;
9759
+ while (p) {
9760
+ copyBuffer(p.data, ret, i);
9761
+ i += p.data.length;
9762
+ p = p.next;
9763
+ }
9748
9764
 
9749
- if (n < this.head.data.length) {
9750
- // `slice` is the same for buffers and strings.
9751
- ret = this.head.data.slice(0, n);
9752
- this.head.data = this.head.data.slice(n);
9753
- } else if (n === this.head.data.length) {
9754
- // First chunk is a perfect match.
9755
- ret = this.shift();
9756
- } else {
9757
- // Result spans more than one buffer.
9758
- ret = hasStrings ? this._getString(n) : this._getBuffer(n);
9759
- }
9765
+ return ret;
9766
+ } // Consumes a specified amount of bytes or characters from the buffered data.
9767
+
9768
+ }, {
9769
+ key: "consume",
9770
+ value: function consume(n, hasStrings) {
9771
+ var ret;
9772
+
9773
+ if (n < this.head.data.length) {
9774
+ // `slice` is the same for buffers and strings.
9775
+ ret = this.head.data.slice(0, n);
9776
+ this.head.data = this.head.data.slice(n);
9777
+ } else if (n === this.head.data.length) {
9778
+ // First chunk is a perfect match.
9779
+ ret = this.shift();
9780
+ } else {
9781
+ // Result spans more than one buffer.
9782
+ ret = hasStrings ? this._getString(n) : this._getBuffer(n);
9783
+ }
9760
9784
 
9761
- return ret;
9762
- };
9785
+ return ret;
9786
+ }
9787
+ }, {
9788
+ key: "first",
9789
+ value: function first() {
9790
+ return this.head.data;
9791
+ } // Consumes a specified amount of characters from the buffered data.
9792
+
9793
+ }, {
9794
+ key: "_getString",
9795
+ value: function _getString(n) {
9796
+ var p = this.head;
9797
+ var c = 1;
9798
+ var ret = p.data;
9799
+ n -= ret.length;
9800
+
9801
+ while (p = p.next) {
9802
+ var str = p.data;
9803
+ var nb = n > str.length ? str.length : n;
9804
+ if (nb === str.length) ret += str;else ret += str.slice(0, n);
9805
+ n -= nb;
9806
+
9807
+ if (n === 0) {
9808
+ if (nb === str.length) {
9809
+ ++c;
9810
+ if (p.next) this.head = p.next;else this.head = this.tail = null;
9811
+ } else {
9812
+ this.head = p;
9813
+ p.data = str.slice(nb);
9814
+ }
9763
9815
 
9764
- _proto.first = function first() {
9765
- return this.head.data;
9766
- } // Consumes a specified amount of characters from the buffered data.
9767
- ;
9768
-
9769
- _proto._getString = function _getString(n) {
9770
- var p = this.head;
9771
- var c = 1;
9772
- var ret = p.data;
9773
- n -= ret.length;
9774
-
9775
- while (p = p.next) {
9776
- var str = p.data;
9777
- var nb = n > str.length ? str.length : n;
9778
- if (nb === str.length) ret += str;else ret += str.slice(0, n);
9779
- n -= nb;
9780
-
9781
- if (n === 0) {
9782
- if (nb === str.length) {
9783
- ++c;
9784
- if (p.next) this.head = p.next;else this.head = this.tail = null;
9785
- } else {
9786
- this.head = p;
9787
- p.data = str.slice(nb);
9816
+ break;
9788
9817
  }
9789
9818
 
9790
- break;
9819
+ ++c;
9791
9820
  }
9792
9821
 
9793
- ++c;
9794
- }
9795
-
9796
- this.length -= c;
9797
- return ret;
9798
- } // Consumes a specified amount of bytes from the buffered data.
9799
- ;
9800
-
9801
- _proto._getBuffer = function _getBuffer(n) {
9802
- var ret = Buffer.allocUnsafe(n);
9803
- var p = this.head;
9804
- var c = 1;
9805
- p.data.copy(ret);
9806
- n -= p.data.length;
9807
-
9808
- while (p = p.next) {
9809
- var buf = p.data;
9810
- var nb = n > buf.length ? buf.length : n;
9811
- buf.copy(ret, ret.length - n, 0, nb);
9812
- n -= nb;
9822
+ this.length -= c;
9823
+ return ret;
9824
+ } // Consumes a specified amount of bytes from the buffered data.
9825
+
9826
+ }, {
9827
+ key: "_getBuffer",
9828
+ value: function _getBuffer(n) {
9829
+ var ret = Buffer.allocUnsafe(n);
9830
+ var p = this.head;
9831
+ var c = 1;
9832
+ p.data.copy(ret);
9833
+ n -= p.data.length;
9834
+
9835
+ while (p = p.next) {
9836
+ var buf = p.data;
9837
+ var nb = n > buf.length ? buf.length : n;
9838
+ buf.copy(ret, ret.length - n, 0, nb);
9839
+ n -= nb;
9840
+
9841
+ if (n === 0) {
9842
+ if (nb === buf.length) {
9843
+ ++c;
9844
+ if (p.next) this.head = p.next;else this.head = this.tail = null;
9845
+ } else {
9846
+ this.head = p;
9847
+ p.data = buf.slice(nb);
9848
+ }
9813
9849
 
9814
- if (n === 0) {
9815
- if (nb === buf.length) {
9816
- ++c;
9817
- if (p.next) this.head = p.next;else this.head = this.tail = null;
9818
- } else {
9819
- this.head = p;
9820
- p.data = buf.slice(nb);
9850
+ break;
9821
9851
  }
9822
9852
 
9823
- break;
9853
+ ++c;
9824
9854
  }
9825
9855
 
9826
- ++c;
9827
- }
9828
-
9829
- this.length -= c;
9830
- return ret;
9831
- } // Make sure the linked list only shows the minimal necessary information.
9832
- ;
9856
+ this.length -= c;
9857
+ return ret;
9858
+ } // Make sure the linked list only shows the minimal necessary information.
9833
9859
 
9834
- _proto[custom] = function (_, options) {
9835
- return inspect(this, _objectSpread({}, options, {
9836
- // Only inspect one level.
9837
- depth: 0,
9838
- // It should not recurse.
9839
- customInspect: false
9840
- }));
9841
- };
9860
+ }, {
9861
+ key: custom,
9862
+ value: function value(_, options) {
9863
+ return inspect(this, _objectSpread({}, options, {
9864
+ // Only inspect one level.
9865
+ depth: 0,
9866
+ // It should not recurse.
9867
+ customInspect: false
9868
+ }));
9869
+ }
9870
+ }]);
9842
9871
 
9843
9872
  return BufferList;
9844
9873
  }();
9845
- },{"buffer":4,"util":2}],30:[function(require,module,exports){
9846
- (function (process){
9874
+ },{"buffer":4,"util":2}],29:[function(require,module,exports){
9875
+ (function (process){(function (){
9847
9876
  'use strict'; // undocumented cb() API, needed for core, not for public API
9848
9877
 
9849
9878
  function destroy(err, cb) {
@@ -9855,8 +9884,13 @@ function destroy(err, cb) {
9855
9884
  if (readableDestroyed || writableDestroyed) {
9856
9885
  if (cb) {
9857
9886
  cb(err);
9858
- } else if (err && (!this._writableState || !this._writableState.errorEmitted)) {
9859
- process.nextTick(emitErrorNT, this, err);
9887
+ } else if (err) {
9888
+ if (!this._writableState) {
9889
+ process.nextTick(emitErrorNT, this, err);
9890
+ } else if (!this._writableState.errorEmitted) {
9891
+ this._writableState.errorEmitted = true;
9892
+ process.nextTick(emitErrorNT, this, err);
9893
+ }
9860
9894
  }
9861
9895
 
9862
9896
  return this;
@@ -9875,10 +9909,13 @@ function destroy(err, cb) {
9875
9909
 
9876
9910
  this._destroy(err || null, function (err) {
9877
9911
  if (!cb && err) {
9878
- process.nextTick(emitErrorAndCloseNT, _this, err);
9879
-
9880
- if (_this._writableState) {
9912
+ if (!_this._writableState) {
9913
+ process.nextTick(emitErrorAndCloseNT, _this, err);
9914
+ } else if (!_this._writableState.errorEmitted) {
9881
9915
  _this._writableState.errorEmitted = true;
9916
+ process.nextTick(emitErrorAndCloseNT, _this, err);
9917
+ } else {
9918
+ process.nextTick(emitCloseNT, _this);
9882
9919
  }
9883
9920
  } else if (cb) {
9884
9921
  process.nextTick(emitCloseNT, _this);
@@ -9925,12 +9962,24 @@ function emitErrorNT(self, err) {
9925
9962
  self.emit('error', err);
9926
9963
  }
9927
9964
 
9965
+ function errorOrDestroy(stream, err) {
9966
+ // We have tests that rely on errors being emitted
9967
+ // in the same tick, so changing this is semver major.
9968
+ // For now when you opt-in to autoDestroy we allow
9969
+ // the error to be emitted nextTick. In a future
9970
+ // semver major update we should change the default to this.
9971
+ var rState = stream._readableState;
9972
+ var wState = stream._writableState;
9973
+ if (rState && rState.autoDestroy || wState && wState.autoDestroy) stream.destroy(err);else stream.emit('error', err);
9974
+ }
9975
+
9928
9976
  module.exports = {
9929
9977
  destroy: destroy,
9930
- undestroy: undestroy
9978
+ undestroy: undestroy,
9979
+ errorOrDestroy: errorOrDestroy
9931
9980
  };
9932
- }).call(this,require('_process'))
9933
- },{"_process":12}],31:[function(require,module,exports){
9981
+ }).call(this)}).call(this,require('_process'))
9982
+ },{"_process":12}],30:[function(require,module,exports){
9934
9983
  // Ported from https://github.com/mafintosh/end-of-stream with
9935
9984
  // permission from the author, Mathias Buus (@mafintosh).
9936
9985
  'use strict';
@@ -10035,7 +10084,12 @@ function eos(stream, opts, callback) {
10035
10084
  }
10036
10085
 
10037
10086
  module.exports = eos;
10038
- },{"../../../errors":21}],32:[function(require,module,exports){
10087
+ },{"../../../errors":21}],31:[function(require,module,exports){
10088
+ module.exports = function () {
10089
+ throw new Error('Readable.from is not available in the browser')
10090
+ };
10091
+
10092
+ },{}],32:[function(require,module,exports){
10039
10093
  // Ported from https://github.com/mafintosh/pump with
10040
10094
  // permission from the author, Mathias Buus (@mafintosh).
10041
10095
  'use strict';
@@ -10133,7 +10187,7 @@ function pipeline() {
10133
10187
  }
10134
10188
 
10135
10189
  module.exports = pipeline;
10136
- },{"../../../errors":21,"./end-of-stream":31}],33:[function(require,module,exports){
10190
+ },{"../../../errors":21,"./end-of-stream":30}],33:[function(require,module,exports){
10137
10191
  'use strict';
10138
10192
 
10139
10193
  var ERR_INVALID_OPT_VALUE = require('../../../errors').codes.ERR_INVALID_OPT_VALUE;
@@ -10175,7 +10229,7 @@ exports.PassThrough = require('./lib/_stream_passthrough.js');
10175
10229
  exports.finished = require('./lib/internal/streams/end-of-stream.js');
10176
10230
  exports.pipeline = require('./lib/internal/streams/pipeline.js');
10177
10231
 
10178
- },{"./lib/_stream_duplex.js":23,"./lib/_stream_passthrough.js":24,"./lib/_stream_readable.js":25,"./lib/_stream_transform.js":26,"./lib/_stream_writable.js":27,"./lib/internal/streams/end-of-stream.js":31,"./lib/internal/streams/pipeline.js":32}],36:[function(require,module,exports){
10232
+ },{"./lib/_stream_duplex.js":22,"./lib/_stream_passthrough.js":23,"./lib/_stream_readable.js":24,"./lib/_stream_transform.js":25,"./lib/_stream_writable.js":26,"./lib/internal/streams/end-of-stream.js":30,"./lib/internal/streams/pipeline.js":32}],36:[function(require,module,exports){
10179
10233
  // Copyright Joyent, Inc. and other Node contributors.
10180
10234
  //
10181
10235
  // Permission is hereby granted, free of charge, to any person obtaining a
@@ -11225,7 +11279,7 @@ module.exports = {
11225
11279
  };
11226
11280
 
11227
11281
  },{}],39:[function(require,module,exports){
11228
- (function (global){
11282
+ (function (global){(function (){
11229
11283
 
11230
11284
  /**
11231
11285
  * Module exports.
@@ -11294,10 +11348,12 @@ function config (name) {
11294
11348
  return String(val).toLowerCase() === 'true';
11295
11349
  }
11296
11350
 
11297
- }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
11351
+ }).call(this)}).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
11298
11352
  },{}],40:[function(require,module,exports){
11299
11353
  "use strict";
11300
11354
 
11355
+ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); }
11356
+
11301
11357
  Object.defineProperty(exports, "__esModule", {
11302
11358
  value: true
11303
11359
  });
@@ -11363,12 +11419,16 @@ var _isDecimal = _interopRequireDefault(require("./lib/isDecimal"));
11363
11419
 
11364
11420
  var _isHexadecimal = _interopRequireDefault(require("./lib/isHexadecimal"));
11365
11421
 
11422
+ var _isOctal = _interopRequireDefault(require("./lib/isOctal"));
11423
+
11366
11424
  var _isDivisibleBy = _interopRequireDefault(require("./lib/isDivisibleBy"));
11367
11425
 
11368
11426
  var _isHexColor = _interopRequireDefault(require("./lib/isHexColor"));
11369
11427
 
11370
11428
  var _isISRC = _interopRequireDefault(require("./lib/isISRC"));
11371
11429
 
11430
+ var _isBIC = _interopRequireDefault(require("./lib/isBIC"));
11431
+
11372
11432
  var _isMD = _interopRequireDefault(require("./lib/isMD5"));
11373
11433
 
11374
11434
  var _isHash = _interopRequireDefault(require("./lib/isHash"));
@@ -11449,11 +11509,15 @@ var _isWhitelisted = _interopRequireDefault(require("./lib/isWhitelisted"));
11449
11509
 
11450
11510
  var _normalizeEmail = _interopRequireDefault(require("./lib/normalizeEmail"));
11451
11511
 
11452
- function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }
11512
+ var _isSlug = _interopRequireDefault(require("./lib/isSlug"));
11513
+
11514
+ function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; }
11515
+
11516
+ function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
11453
11517
 
11454
11518
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11455
11519
 
11456
- var version = '11.1.0';
11520
+ var version = '12.2.0';
11457
11521
  var validator = {
11458
11522
  version: version,
11459
11523
  toDate: _toDate.default,
@@ -11470,6 +11534,7 @@ var validator = {
11470
11534
  isIPRange: _isIPRange.default,
11471
11535
  isFQDN: _isFQDN.default,
11472
11536
  isBoolean: _isBoolean.default,
11537
+ isBIC: _isBIC.default,
11473
11538
  isAlpha: _isAlpha.default,
11474
11539
  isAlphaLocales: _isAlpha.locales,
11475
11540
  isAlphanumeric: _isAlphanumeric.default,
@@ -11489,6 +11554,7 @@ var validator = {
11489
11554
  isFloatLocales: _isFloat.locales,
11490
11555
  isDecimal: _isDecimal.default,
11491
11556
  isHexadecimal: _isHexadecimal.default,
11557
+ isOctal: _isOctal.default,
11492
11558
  isDivisibleBy: _isDivisibleBy.default,
11493
11559
  isHexColor: _isHexColor.default,
11494
11560
  isISRC: _isISRC.default,
@@ -11534,13 +11600,14 @@ var validator = {
11534
11600
  blacklist: _blacklist.default,
11535
11601
  isWhitelisted: _isWhitelisted.default,
11536
11602
  normalizeEmail: _normalizeEmail.default,
11537
- toString: toString
11603
+ toString: toString,
11604
+ isSlug: _isSlug.default
11538
11605
  };
11539
11606
  var _default = validator;
11540
11607
  exports.default = _default;
11541
11608
  module.exports = exports.default;
11542
11609
  module.exports.default = exports.default;
11543
- },{"./lib/blacklist":42,"./lib/contains":43,"./lib/equals":44,"./lib/escape":45,"./lib/isAfter":46,"./lib/isAlpha":47,"./lib/isAlphanumeric":48,"./lib/isAscii":49,"./lib/isBase32":50,"./lib/isBase64":51,"./lib/isBefore":52,"./lib/isBoolean":53,"./lib/isByteLength":54,"./lib/isCreditCard":55,"./lib/isCurrency":56,"./lib/isDataURI":57,"./lib/isDecimal":58,"./lib/isDivisibleBy":59,"./lib/isEmail":60,"./lib/isEmpty":61,"./lib/isFQDN":62,"./lib/isFloat":63,"./lib/isFullWidth":64,"./lib/isHalfWidth":65,"./lib/isHash":66,"./lib/isHexColor":67,"./lib/isHexadecimal":68,"./lib/isIP":69,"./lib/isIPRange":70,"./lib/isISBN":71,"./lib/isISIN":72,"./lib/isISO31661Alpha2":73,"./lib/isISO31661Alpha3":74,"./lib/isISO8601":75,"./lib/isISRC":76,"./lib/isISSN":77,"./lib/isIdentityCard":78,"./lib/isIn":79,"./lib/isInt":80,"./lib/isJSON":81,"./lib/isJWT":82,"./lib/isLatLong":83,"./lib/isLength":84,"./lib/isLowercase":85,"./lib/isMACAddress":86,"./lib/isMD5":87,"./lib/isMagnetURI":88,"./lib/isMimeType":89,"./lib/isMobilePhone":90,"./lib/isMongoId":91,"./lib/isMultibyte":92,"./lib/isNumeric":93,"./lib/isPort":94,"./lib/isPostalCode":95,"./lib/isRFC3339":96,"./lib/isSurrogatePair":97,"./lib/isURL":98,"./lib/isUUID":99,"./lib/isUppercase":100,"./lib/isVariableWidth":101,"./lib/isWhitelisted":102,"./lib/ltrim":103,"./lib/matches":104,"./lib/normalizeEmail":105,"./lib/rtrim":106,"./lib/stripLow":107,"./lib/toBoolean":108,"./lib/toDate":109,"./lib/toFloat":110,"./lib/toInt":111,"./lib/trim":112,"./lib/unescape":113,"./lib/whitelist":118}],41:[function(require,module,exports){
11610
+ },{"./lib/blacklist":42,"./lib/contains":43,"./lib/equals":44,"./lib/escape":45,"./lib/isAfter":46,"./lib/isAlpha":47,"./lib/isAlphanumeric":48,"./lib/isAscii":49,"./lib/isBIC":50,"./lib/isBase32":51,"./lib/isBase64":52,"./lib/isBefore":53,"./lib/isBoolean":54,"./lib/isByteLength":55,"./lib/isCreditCard":56,"./lib/isCurrency":57,"./lib/isDataURI":58,"./lib/isDecimal":59,"./lib/isDivisibleBy":60,"./lib/isEmail":61,"./lib/isEmpty":62,"./lib/isFQDN":63,"./lib/isFloat":64,"./lib/isFullWidth":65,"./lib/isHalfWidth":66,"./lib/isHash":67,"./lib/isHexColor":68,"./lib/isHexadecimal":69,"./lib/isIP":70,"./lib/isIPRange":71,"./lib/isISBN":72,"./lib/isISIN":73,"./lib/isISO31661Alpha2":74,"./lib/isISO31661Alpha3":75,"./lib/isISO8601":76,"./lib/isISRC":77,"./lib/isISSN":78,"./lib/isIdentityCard":79,"./lib/isIn":80,"./lib/isInt":81,"./lib/isJSON":82,"./lib/isJWT":83,"./lib/isLatLong":84,"./lib/isLength":85,"./lib/isLowercase":86,"./lib/isMACAddress":87,"./lib/isMD5":88,"./lib/isMagnetURI":89,"./lib/isMimeType":90,"./lib/isMobilePhone":91,"./lib/isMongoId":92,"./lib/isMultibyte":93,"./lib/isNumeric":94,"./lib/isOctal":95,"./lib/isPort":96,"./lib/isPostalCode":97,"./lib/isRFC3339":98,"./lib/isSlug":99,"./lib/isSurrogatePair":100,"./lib/isURL":101,"./lib/isUUID":102,"./lib/isUppercase":103,"./lib/isVariableWidth":104,"./lib/isWhitelisted":105,"./lib/ltrim":106,"./lib/matches":107,"./lib/normalizeEmail":108,"./lib/rtrim":109,"./lib/stripLow":110,"./lib/toBoolean":111,"./lib/toDate":112,"./lib/toFloat":113,"./lib/toInt":114,"./lib/trim":115,"./lib/unescape":116,"./lib/whitelist":121}],41:[function(require,module,exports){
11544
11611
  "use strict";
11545
11612
 
11546
11613
  Object.defineProperty(exports, "__esModule", {
@@ -11562,7 +11629,7 @@ var alpha = {
11562
11629
  'nn-NO': /^[A-ZÆØÅ]+$/i,
11563
11630
  'hu-HU': /^[A-ZÁÉÍÓÖŐÚÜŰ]+$/i,
11564
11631
  'pl-PL': /^[A-ZĄĆĘŚŁŃÓŻŹ]+$/i,
11565
- 'pt-PT': /^[A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]+$/i,
11632
+ 'pt-PT': /^[A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,
11566
11633
  'ru-RU': /^[А-ЯЁ]+$/i,
11567
11634
  'sl-SI': /^[A-ZČĆĐŠŽ]+$/i,
11568
11635
  'sk-SK': /^[A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,
@@ -11572,7 +11639,9 @@ var alpha = {
11572
11639
  'tr-TR': /^[A-ZÇĞİıÖŞÜ]+$/i,
11573
11640
  'uk-UA': /^[А-ЩЬЮЯЄIЇҐі]+$/i,
11574
11641
  'ku-IQ': /^[ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,
11575
- ar: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/
11642
+ ar: /^[ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,
11643
+ he: /^[א-ת]+$/,
11644
+ 'fa-IR': /^['آابپتثجچهخدذرزژسشصضطظعغفقکگلمنوهی']+$/i
11576
11645
  };
11577
11646
  exports.alpha = alpha;
11578
11647
  var alphanumeric = {
@@ -11590,7 +11659,7 @@ var alphanumeric = {
11590
11659
  'nl-NL': /^[0-9A-ZÁÉËÏÓÖÜÚ]+$/i,
11591
11660
  'nn-NO': /^[0-9A-ZÆØÅ]+$/i,
11592
11661
  'pl-PL': /^[0-9A-ZĄĆĘŚŁŃÓŻŹ]+$/i,
11593
- 'pt-PT': /^[0-9A-ZÃÁÀÂÇÉÊÍÕÓÔÚÜ]+$/i,
11662
+ 'pt-PT': /^[0-9A-ZÃÁÀÂÄÇÉÊËÍÏÕÓÔÖÚÜ]+$/i,
11594
11663
  'ru-RU': /^[0-9А-ЯЁ]+$/i,
11595
11664
  'sl-SI': /^[0-9A-ZČĆĐŠŽ]+$/i,
11596
11665
  'sk-SK': /^[0-9A-ZÁČĎÉÍŇÓŠŤÚÝŽĹŔĽÄÔ]+$/i,
@@ -11600,7 +11669,9 @@ var alphanumeric = {
11600
11669
  'tr-TR': /^[0-9A-ZÇĞİıÖŞÜ]+$/i,
11601
11670
  'uk-UA': /^[0-9А-ЩЬЮЯЄIЇҐі]+$/i,
11602
11671
  'ku-IQ': /^[٠١٢٣٤٥٦٧٨٩0-9ئابپتجچحخدرڕزژسشعغفڤقکگلڵمنوۆھەیێيطؤثآإأكضصةظذ]+$/i,
11603
- ar: /^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/
11672
+ ar: /^[٠١٢٣٤٥٦٧٨٩0-9ءآأؤإئابةتثجحخدذرزسشصضطظعغفقكلمنهوىيًٌٍَُِّْٰ]+$/,
11673
+ he: /^[0-9א-ת]+$/,
11674
+ 'fa-IR': /^['0-9آابپتثجچهخدذرزژسشصضطظعغفقکگلمنوهی۱۲۳۴۵۶۷۸۹۰']+$/i
11604
11675
  };
11605
11676
  exports.alphanumeric = alphanumeric;
11606
11677
  var decimal = {
@@ -11669,7 +11740,7 @@ function blacklist(str, chars) {
11669
11740
 
11670
11741
  module.exports = exports.default;
11671
11742
  module.exports.default = exports.default;
11672
- },{"./util/assertString":114}],43:[function(require,module,exports){
11743
+ },{"./util/assertString":117}],43:[function(require,module,exports){
11673
11744
  "use strict";
11674
11745
 
11675
11746
  Object.defineProperty(exports, "__esModule", {
@@ -11690,7 +11761,7 @@ function contains(str, elem) {
11690
11761
 
11691
11762
  module.exports = exports.default;
11692
11763
  module.exports.default = exports.default;
11693
- },{"./util/assertString":114,"./util/toString":117}],44:[function(require,module,exports){
11764
+ },{"./util/assertString":117,"./util/toString":120}],44:[function(require,module,exports){
11694
11765
  "use strict";
11695
11766
 
11696
11767
  Object.defineProperty(exports, "__esModule", {
@@ -11709,7 +11780,7 @@ function equals(str, comparison) {
11709
11780
 
11710
11781
  module.exports = exports.default;
11711
11782
  module.exports.default = exports.default;
11712
- },{"./util/assertString":114}],45:[function(require,module,exports){
11783
+ },{"./util/assertString":117}],45:[function(require,module,exports){
11713
11784
  "use strict";
11714
11785
 
11715
11786
  Object.defineProperty(exports, "__esModule", {
@@ -11728,7 +11799,7 @@ function escape(str) {
11728
11799
 
11729
11800
  module.exports = exports.default;
11730
11801
  module.exports.default = exports.default;
11731
- },{"./util/assertString":114}],46:[function(require,module,exports){
11802
+ },{"./util/assertString":117}],46:[function(require,module,exports){
11732
11803
  "use strict";
11733
11804
 
11734
11805
  Object.defineProperty(exports, "__esModule", {
@@ -11752,7 +11823,7 @@ function isAfter(str) {
11752
11823
 
11753
11824
  module.exports = exports.default;
11754
11825
  module.exports.default = exports.default;
11755
- },{"./toDate":109,"./util/assertString":114}],47:[function(require,module,exports){
11826
+ },{"./toDate":112,"./util/assertString":117}],47:[function(require,module,exports){
11756
11827
  "use strict";
11757
11828
 
11758
11829
  Object.defineProperty(exports, "__esModule", {
@@ -11780,7 +11851,7 @@ function isAlpha(str) {
11780
11851
 
11781
11852
  var locales = Object.keys(_alpha.alpha);
11782
11853
  exports.locales = locales;
11783
- },{"./alpha":41,"./util/assertString":114}],48:[function(require,module,exports){
11854
+ },{"./alpha":41,"./util/assertString":117}],48:[function(require,module,exports){
11784
11855
  "use strict";
11785
11856
 
11786
11857
  Object.defineProperty(exports, "__esModule", {
@@ -11808,7 +11879,7 @@ function isAlphanumeric(str) {
11808
11879
 
11809
11880
  var locales = Object.keys(_alpha.alphanumeric);
11810
11881
  exports.locales = locales;
11811
- },{"./alpha":41,"./util/assertString":114}],49:[function(require,module,exports){
11882
+ },{"./alpha":41,"./util/assertString":117}],49:[function(require,module,exports){
11812
11883
  "use strict";
11813
11884
 
11814
11885
  Object.defineProperty(exports, "__esModule", {
@@ -11831,7 +11902,28 @@ function isAscii(str) {
11831
11902
 
11832
11903
  module.exports = exports.default;
11833
11904
  module.exports.default = exports.default;
11834
- },{"./util/assertString":114}],50:[function(require,module,exports){
11905
+ },{"./util/assertString":117}],50:[function(require,module,exports){
11906
+ "use strict";
11907
+
11908
+ Object.defineProperty(exports, "__esModule", {
11909
+ value: true
11910
+ });
11911
+ exports.default = isBIC;
11912
+
11913
+ var _assertString = _interopRequireDefault(require("./util/assertString"));
11914
+
11915
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11916
+
11917
+ var isBICReg = /^[A-z]{4}[A-z]{2}\w{2}(\w{3})?$/;
11918
+
11919
+ function isBIC(str) {
11920
+ (0, _assertString.default)(str);
11921
+ return isBICReg.test(str);
11922
+ }
11923
+
11924
+ module.exports = exports.default;
11925
+ module.exports.default = exports.default;
11926
+ },{"./util/assertString":117}],51:[function(require,module,exports){
11835
11927
  "use strict";
11836
11928
 
11837
11929
  Object.defineProperty(exports, "__esModule", {
@@ -11858,7 +11950,7 @@ function isBase32(str) {
11858
11950
 
11859
11951
  module.exports = exports.default;
11860
11952
  module.exports.default = exports.default;
11861
- },{"./util/assertString":114}],51:[function(require,module,exports){
11953
+ },{"./util/assertString":117}],52:[function(require,module,exports){
11862
11954
  "use strict";
11863
11955
 
11864
11956
  Object.defineProperty(exports, "__esModule", {
@@ -11886,7 +11978,7 @@ function isBase64(str) {
11886
11978
 
11887
11979
  module.exports = exports.default;
11888
11980
  module.exports.default = exports.default;
11889
- },{"./util/assertString":114}],52:[function(require,module,exports){
11981
+ },{"./util/assertString":117}],53:[function(require,module,exports){
11890
11982
  "use strict";
11891
11983
 
11892
11984
  Object.defineProperty(exports, "__esModule", {
@@ -11910,7 +12002,7 @@ function isBefore(str) {
11910
12002
 
11911
12003
  module.exports = exports.default;
11912
12004
  module.exports.default = exports.default;
11913
- },{"./toDate":109,"./util/assertString":114}],53:[function(require,module,exports){
12005
+ },{"./toDate":112,"./util/assertString":117}],54:[function(require,module,exports){
11914
12006
  "use strict";
11915
12007
 
11916
12008
  Object.defineProperty(exports, "__esModule", {
@@ -11929,7 +12021,7 @@ function isBoolean(str) {
11929
12021
 
11930
12022
  module.exports = exports.default;
11931
12023
  module.exports.default = exports.default;
11932
- },{"./util/assertString":114}],54:[function(require,module,exports){
12024
+ },{"./util/assertString":117}],55:[function(require,module,exports){
11933
12025
  "use strict";
11934
12026
 
11935
12027
  Object.defineProperty(exports, "__esModule", {
@@ -11964,7 +12056,7 @@ function isByteLength(str, options) {
11964
12056
 
11965
12057
  module.exports = exports.default;
11966
12058
  module.exports.default = exports.default;
11967
- },{"./util/assertString":114}],55:[function(require,module,exports){
12059
+ },{"./util/assertString":117}],56:[function(require,module,exports){
11968
12060
  "use strict";
11969
12061
 
11970
12062
  Object.defineProperty(exports, "__esModule", {
@@ -12017,7 +12109,7 @@ function isCreditCard(str) {
12017
12109
 
12018
12110
  module.exports = exports.default;
12019
12111
  module.exports.default = exports.default;
12020
- },{"./util/assertString":114}],56:[function(require,module,exports){
12112
+ },{"./util/assertString":117}],57:[function(require,module,exports){
12021
12113
  "use strict";
12022
12114
 
12023
12115
  Object.defineProperty(exports, "__esModule", {
@@ -12107,7 +12199,7 @@ function isCurrency(str, options) {
12107
12199
 
12108
12200
  module.exports = exports.default;
12109
12201
  module.exports.default = exports.default;
12110
- },{"./util/assertString":114,"./util/merge":116}],57:[function(require,module,exports){
12202
+ },{"./util/assertString":117,"./util/merge":119}],58:[function(require,module,exports){
12111
12203
  "use strict";
12112
12204
 
12113
12205
  Object.defineProperty(exports, "__esModule", {
@@ -12162,7 +12254,7 @@ function isDataURI(str) {
12162
12254
 
12163
12255
  module.exports = exports.default;
12164
12256
  module.exports.default = exports.default;
12165
- },{"./util/assertString":114}],58:[function(require,module,exports){
12257
+ },{"./util/assertString":117}],59:[function(require,module,exports){
12166
12258
  "use strict";
12167
12259
 
12168
12260
  Object.defineProperty(exports, "__esModule", {
@@ -12205,7 +12297,7 @@ function isDecimal(str, options) {
12205
12297
 
12206
12298
  module.exports = exports.default;
12207
12299
  module.exports.default = exports.default;
12208
- },{"./alpha":41,"./util/assertString":114,"./util/includes":115,"./util/merge":116}],59:[function(require,module,exports){
12300
+ },{"./alpha":41,"./util/assertString":117,"./util/includes":118,"./util/merge":119}],60:[function(require,module,exports){
12209
12301
  "use strict";
12210
12302
 
12211
12303
  Object.defineProperty(exports, "__esModule", {
@@ -12226,7 +12318,7 @@ function isDivisibleBy(str, num) {
12226
12318
 
12227
12319
  module.exports = exports.default;
12228
12320
  module.exports.default = exports.default;
12229
- },{"./toFloat":110,"./util/assertString":114}],60:[function(require,module,exports){
12321
+ },{"./toFloat":113,"./util/assertString":117}],61:[function(require,module,exports){
12230
12322
  "use strict";
12231
12323
 
12232
12324
  Object.defineProperty(exports, "__esModule", {
@@ -12250,7 +12342,7 @@ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArra
12250
12342
 
12251
12343
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance"); }
12252
12344
 
12253
- function _iterableToArrayLimit(arr, i) { var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
12345
+ function _iterableToArrayLimit(arr, i) { if (!(Symbol.iterator in Object(arr) || Object.prototype.toString.call(arr) === "[object Arguments]")) { return; } var _arr = []; var _n = true; var _d = false; var _e = undefined; try { for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
12254
12346
 
12255
12347
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
12256
12348
 
@@ -12424,7 +12516,7 @@ function isEmail(str, options) {
12424
12516
 
12425
12517
  module.exports = exports.default;
12426
12518
  module.exports.default = exports.default;
12427
- },{"./isByteLength":54,"./isFQDN":62,"./isIP":69,"./util/assertString":114,"./util/merge":116}],61:[function(require,module,exports){
12519
+ },{"./isByteLength":55,"./isFQDN":63,"./isIP":70,"./util/assertString":117,"./util/merge":119}],62:[function(require,module,exports){
12428
12520
  "use strict";
12429
12521
 
12430
12522
  Object.defineProperty(exports, "__esModule", {
@@ -12450,7 +12542,7 @@ function isEmpty(str, options) {
12450
12542
 
12451
12543
  module.exports = exports.default;
12452
12544
  module.exports.default = exports.default;
12453
- },{"./util/assertString":114,"./util/merge":116}],62:[function(require,module,exports){
12545
+ },{"./util/assertString":117,"./util/merge":119}],63:[function(require,module,exports){
12454
12546
  "use strict";
12455
12547
 
12456
12548
  Object.defineProperty(exports, "__esModule", {
@@ -12526,7 +12618,7 @@ function isFQDN(str, options) {
12526
12618
 
12527
12619
  module.exports = exports.default;
12528
12620
  module.exports.default = exports.default;
12529
- },{"./util/assertString":114,"./util/merge":116}],63:[function(require,module,exports){
12621
+ },{"./util/assertString":117,"./util/merge":119}],64:[function(require,module,exports){
12530
12622
  "use strict";
12531
12623
 
12532
12624
  Object.defineProperty(exports, "__esModule", {
@@ -12556,7 +12648,7 @@ function isFloat(str, options) {
12556
12648
 
12557
12649
  var locales = Object.keys(_alpha.decimal);
12558
12650
  exports.locales = locales;
12559
- },{"./alpha":41,"./util/assertString":114}],64:[function(require,module,exports){
12651
+ },{"./alpha":41,"./util/assertString":117}],65:[function(require,module,exports){
12560
12652
  "use strict";
12561
12653
 
12562
12654
  Object.defineProperty(exports, "__esModule", {
@@ -12576,7 +12668,7 @@ function isFullWidth(str) {
12576
12668
  (0, _assertString.default)(str);
12577
12669
  return fullWidth.test(str);
12578
12670
  }
12579
- },{"./util/assertString":114}],65:[function(require,module,exports){
12671
+ },{"./util/assertString":117}],66:[function(require,module,exports){
12580
12672
  "use strict";
12581
12673
 
12582
12674
  Object.defineProperty(exports, "__esModule", {
@@ -12596,7 +12688,7 @@ function isHalfWidth(str) {
12596
12688
  (0, _assertString.default)(str);
12597
12689
  return halfWidth.test(str);
12598
12690
  }
12599
- },{"./util/assertString":114}],66:[function(require,module,exports){
12691
+ },{"./util/assertString":117}],67:[function(require,module,exports){
12600
12692
  "use strict";
12601
12693
 
12602
12694
  Object.defineProperty(exports, "__esModule", {
@@ -12626,13 +12718,13 @@ var lengths = {
12626
12718
 
12627
12719
  function isHash(str, algorithm) {
12628
12720
  (0, _assertString.default)(str);
12629
- var hash = new RegExp("^[a-f0-9]{".concat(lengths[algorithm], "}$"));
12721
+ var hash = new RegExp("^[a-fA-F0-9]{".concat(lengths[algorithm], "}$"));
12630
12722
  return hash.test(str);
12631
12723
  }
12632
12724
 
12633
12725
  module.exports = exports.default;
12634
12726
  module.exports.default = exports.default;
12635
- },{"./util/assertString":114}],67:[function(require,module,exports){
12727
+ },{"./util/assertString":117}],68:[function(require,module,exports){
12636
12728
  "use strict";
12637
12729
 
12638
12730
  Object.defineProperty(exports, "__esModule", {
@@ -12644,7 +12736,7 @@ var _assertString = _interopRequireDefault(require("./util/assertString"));
12644
12736
 
12645
12737
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12646
12738
 
12647
- var hexcolor = /^#?([0-9A-F]{3}|[0-9A-F]{6})$/i;
12739
+ var hexcolor = /^#?([0-9A-F]{3}|[0-9A-F]{4}|[0-9A-F]{6}|[0-9A-F]{8})$/i;
12648
12740
 
12649
12741
  function isHexColor(str) {
12650
12742
  (0, _assertString.default)(str);
@@ -12653,7 +12745,7 @@ function isHexColor(str) {
12653
12745
 
12654
12746
  module.exports = exports.default;
12655
12747
  module.exports.default = exports.default;
12656
- },{"./util/assertString":114}],68:[function(require,module,exports){
12748
+ },{"./util/assertString":117}],69:[function(require,module,exports){
12657
12749
  "use strict";
12658
12750
 
12659
12751
  Object.defineProperty(exports, "__esModule", {
@@ -12665,7 +12757,7 @@ var _assertString = _interopRequireDefault(require("./util/assertString"));
12665
12757
 
12666
12758
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12667
12759
 
12668
- var hexadecimal = /^[0-9A-F]+$/i;
12760
+ var hexadecimal = /^(0x|0h)?[0-9A-F]+$/i;
12669
12761
 
12670
12762
  function isHexadecimal(str) {
12671
12763
  (0, _assertString.default)(str);
@@ -12674,7 +12766,7 @@ function isHexadecimal(str) {
12674
12766
 
12675
12767
  module.exports = exports.default;
12676
12768
  module.exports.default = exports.default;
12677
- },{"./util/assertString":114}],69:[function(require,module,exports){
12769
+ },{"./util/assertString":117}],70:[function(require,module,exports){
12678
12770
  "use strict";
12679
12771
 
12680
12772
  Object.defineProperty(exports, "__esModule", {
@@ -12686,6 +12778,35 @@ var _assertString = _interopRequireDefault(require("./util/assertString"));
12686
12778
 
12687
12779
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
12688
12780
 
12781
+ /**
12782
+ 11.3. Examples
12783
+
12784
+ The following addresses
12785
+
12786
+ fe80::1234 (on the 1st link of the node)
12787
+ ff02::5678 (on the 5th link of the node)
12788
+ ff08::9abc (on the 10th organization of the node)
12789
+
12790
+ would be represented as follows:
12791
+
12792
+ fe80::1234%1
12793
+ ff02::5678%5
12794
+ ff08::9abc%10
12795
+
12796
+ (Here we assume a natural translation from a zone index to the
12797
+ <zone_id> part, where the Nth zone of any scope is translated into
12798
+ "N".)
12799
+
12800
+ If we use interface names as <zone_id>, those addresses could also be
12801
+ represented as follows:
12802
+
12803
+ fe80::1234%ne0
12804
+ ff02::5678%pvc1.3
12805
+ ff08::9abc%interface10
12806
+
12807
+ where the interface "ne0" belongs to the 1st link, "pvc1.3" belongs
12808
+ to the 5th link, and "interface10" belongs to the 10th organization.
12809
+ * * */
12689
12810
  var ipv4Maybe = /^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/;
12690
12811
  var ipv6Block = /^[0-9A-F]{1,4}$/i;
12691
12812
 
@@ -12706,7 +12827,29 @@ function isIP(str) {
12706
12827
  });
12707
12828
  return parts[3] <= 255;
12708
12829
  } else if (version === '6') {
12709
- var blocks = str.split(':');
12830
+ var addressAndZone = [str]; // ipv6 addresses could have scoped architecture
12831
+ // according to https://tools.ietf.org/html/rfc4007#section-11
12832
+
12833
+ if (str.includes('%')) {
12834
+ addressAndZone = str.split('%');
12835
+
12836
+ if (addressAndZone.length !== 2) {
12837
+ // it must be just two parts
12838
+ return false;
12839
+ }
12840
+
12841
+ if (!addressAndZone[0].includes(':')) {
12842
+ // the first part must be the address
12843
+ return false;
12844
+ }
12845
+
12846
+ if (addressAndZone[1] === '') {
12847
+ // the second part must not be empty
12848
+ return false;
12849
+ }
12850
+ }
12851
+
12852
+ var blocks = addressAndZone[0].split(':');
12710
12853
  var foundOmissionBlock = false; // marker to indicate ::
12711
12854
  // At least some OS accept the last 32 bits of an IPv6 address
12712
12855
  // (i.e. 2 of the blocks) in IPv4 notation, and RFC 3493 says
@@ -12761,7 +12904,7 @@ function isIP(str) {
12761
12904
 
12762
12905
  module.exports = exports.default;
12763
12906
  module.exports.default = exports.default;
12764
- },{"./util/assertString":114}],70:[function(require,module,exports){
12907
+ },{"./util/assertString":117}],71:[function(require,module,exports){
12765
12908
  "use strict";
12766
12909
 
12767
12910
  Object.defineProperty(exports, "__esModule", {
@@ -12799,7 +12942,7 @@ function isIPRange(str) {
12799
12942
 
12800
12943
  module.exports = exports.default;
12801
12944
  module.exports.default = exports.default;
12802
- },{"./isIP":69,"./util/assertString":114}],71:[function(require,module,exports){
12945
+ },{"./isIP":70,"./util/assertString":117}],72:[function(require,module,exports){
12803
12946
  "use strict";
12804
12947
 
12805
12948
  Object.defineProperty(exports, "__esModule", {
@@ -12865,7 +13008,7 @@ function isISBN(str) {
12865
13008
 
12866
13009
  module.exports = exports.default;
12867
13010
  module.exports.default = exports.default;
12868
- },{"./util/assertString":114}],72:[function(require,module,exports){
13011
+ },{"./util/assertString":117}],73:[function(require,module,exports){
12869
13012
  "use strict";
12870
13013
 
12871
13014
  Object.defineProperty(exports, "__esModule", {
@@ -12918,7 +13061,7 @@ function isISIN(str) {
12918
13061
 
12919
13062
  module.exports = exports.default;
12920
13063
  module.exports.default = exports.default;
12921
- },{"./util/assertString":114}],73:[function(require,module,exports){
13064
+ },{"./util/assertString":117}],74:[function(require,module,exports){
12922
13065
  "use strict";
12923
13066
 
12924
13067
  Object.defineProperty(exports, "__esModule", {
@@ -12942,7 +13085,7 @@ function isISO31661Alpha2(str) {
12942
13085
 
12943
13086
  module.exports = exports.default;
12944
13087
  module.exports.default = exports.default;
12945
- },{"./util/assertString":114,"./util/includes":115}],74:[function(require,module,exports){
13088
+ },{"./util/assertString":117,"./util/includes":118}],75:[function(require,module,exports){
12946
13089
  "use strict";
12947
13090
 
12948
13091
  Object.defineProperty(exports, "__esModule", {
@@ -12966,7 +13109,7 @@ function isISO31661Alpha3(str) {
12966
13109
 
12967
13110
  module.exports = exports.default;
12968
13111
  module.exports.default = exports.default;
12969
- },{"./util/assertString":114,"./util/includes":115}],75:[function(require,module,exports){
13112
+ },{"./util/assertString":117,"./util/includes":118}],76:[function(require,module,exports){
12970
13113
  "use strict";
12971
13114
 
12972
13115
  Object.defineProperty(exports, "__esModule", {
@@ -13024,7 +13167,7 @@ function isISO8601(str, options) {
13024
13167
 
13025
13168
  module.exports = exports.default;
13026
13169
  module.exports.default = exports.default;
13027
- },{"./util/assertString":114}],76:[function(require,module,exports){
13170
+ },{"./util/assertString":117}],77:[function(require,module,exports){
13028
13171
  "use strict";
13029
13172
 
13030
13173
  Object.defineProperty(exports, "__esModule", {
@@ -13046,7 +13189,7 @@ function isISRC(str) {
13046
13189
 
13047
13190
  module.exports = exports.default;
13048
13191
  module.exports.default = exports.default;
13049
- },{"./util/assertString":114}],77:[function(require,module,exports){
13192
+ },{"./util/assertString":117}],78:[function(require,module,exports){
13050
13193
  "use strict";
13051
13194
 
13052
13195
  Object.defineProperty(exports, "__esModule", {
@@ -13084,7 +13227,7 @@ function isISSN(str) {
13084
13227
 
13085
13228
  module.exports = exports.default;
13086
13229
  module.exports.default = exports.default;
13087
- },{"./util/assertString":114}],78:[function(require,module,exports){
13230
+ },{"./util/assertString":117}],79:[function(require,module,exports){
13088
13231
  "use strict";
13089
13232
 
13090
13233
  Object.defineProperty(exports, "__esModule", {
@@ -13212,7 +13355,7 @@ function isIdentityCard(str, locale) {
13212
13355
 
13213
13356
  module.exports = exports.default;
13214
13357
  module.exports.default = exports.default;
13215
- },{"./util/assertString":114}],79:[function(require,module,exports){
13358
+ },{"./util/assertString":117}],80:[function(require,module,exports){
13216
13359
  "use strict";
13217
13360
 
13218
13361
  Object.defineProperty(exports, "__esModule", {
@@ -13255,7 +13398,7 @@ function isIn(str, options) {
13255
13398
 
13256
13399
  module.exports = exports.default;
13257
13400
  module.exports.default = exports.default;
13258
- },{"./util/assertString":114,"./util/toString":117}],80:[function(require,module,exports){
13401
+ },{"./util/assertString":117,"./util/toString":120}],81:[function(require,module,exports){
13259
13402
  "use strict";
13260
13403
 
13261
13404
  Object.defineProperty(exports, "__esModule", {
@@ -13286,7 +13429,7 @@ function isInt(str, options) {
13286
13429
 
13287
13430
  module.exports = exports.default;
13288
13431
  module.exports.default = exports.default;
13289
- },{"./util/assertString":114}],81:[function(require,module,exports){
13432
+ },{"./util/assertString":117}],82:[function(require,module,exports){
13290
13433
  "use strict";
13291
13434
 
13292
13435
  Object.defineProperty(exports, "__esModule", {
@@ -13315,7 +13458,7 @@ function isJSON(str) {
13315
13458
 
13316
13459
  module.exports = exports.default;
13317
13460
  module.exports.default = exports.default;
13318
- },{"./util/assertString":114}],82:[function(require,module,exports){
13461
+ },{"./util/assertString":117}],83:[function(require,module,exports){
13319
13462
  "use strict";
13320
13463
 
13321
13464
  Object.defineProperty(exports, "__esModule", {
@@ -13336,7 +13479,7 @@ function isJWT(str) {
13336
13479
 
13337
13480
  module.exports = exports.default;
13338
13481
  module.exports.default = exports.default;
13339
- },{"./util/assertString":114}],83:[function(require,module,exports){
13482
+ },{"./util/assertString":117}],84:[function(require,module,exports){
13340
13483
  "use strict";
13341
13484
 
13342
13485
  Object.defineProperty(exports, "__esModule", {
@@ -13355,12 +13498,13 @@ function _default(str) {
13355
13498
  (0, _assertString.default)(str);
13356
13499
  if (!str.includes(',')) return false;
13357
13500
  var pair = str.split(',');
13501
+ if (pair[0].startsWith('(') && !pair[1].endsWith(')') || pair[1].endsWith(')') && !pair[0].startsWith('(')) return false;
13358
13502
  return lat.test(pair[0]) && long.test(pair[1]);
13359
13503
  }
13360
13504
 
13361
13505
  module.exports = exports.default;
13362
13506
  module.exports.default = exports.default;
13363
- },{"./util/assertString":114}],84:[function(require,module,exports){
13507
+ },{"./util/assertString":117}],85:[function(require,module,exports){
13364
13508
  "use strict";
13365
13509
 
13366
13510
  Object.defineProperty(exports, "__esModule", {
@@ -13385,7 +13529,7 @@ function isLength(str, options) {
13385
13529
  max = options.max;
13386
13530
  } else {
13387
13531
  // backwards compatibility: isLength(str, min [, max])
13388
- min = arguments[1];
13532
+ min = arguments[1] || 0;
13389
13533
  max = arguments[2];
13390
13534
  }
13391
13535
 
@@ -13396,7 +13540,7 @@ function isLength(str, options) {
13396
13540
 
13397
13541
  module.exports = exports.default;
13398
13542
  module.exports.default = exports.default;
13399
- },{"./util/assertString":114}],85:[function(require,module,exports){
13543
+ },{"./util/assertString":117}],86:[function(require,module,exports){
13400
13544
  "use strict";
13401
13545
 
13402
13546
  Object.defineProperty(exports, "__esModule", {
@@ -13415,7 +13559,7 @@ function isLowercase(str) {
13415
13559
 
13416
13560
  module.exports = exports.default;
13417
13561
  module.exports.default = exports.default;
13418
- },{"./util/assertString":114}],86:[function(require,module,exports){
13562
+ },{"./util/assertString":117}],87:[function(require,module,exports){
13419
13563
  "use strict";
13420
13564
 
13421
13565
  Object.defineProperty(exports, "__esModule", {
@@ -13429,6 +13573,8 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
13429
13573
 
13430
13574
  var macAddress = /^([0-9a-fA-F][0-9a-fA-F]:){5}([0-9a-fA-F][0-9a-fA-F])$/;
13431
13575
  var macAddressNoColons = /^([0-9a-fA-F]){12}$/;
13576
+ var macAddressWithHyphen = /^([0-9a-fA-F][0-9a-fA-F]-){5}([0-9a-fA-F][0-9a-fA-F])$/;
13577
+ var macAddressWithSpaces = /^([0-9a-fA-F][0-9a-fA-F]\s){5}([0-9a-fA-F][0-9a-fA-F])$/;
13432
13578
 
13433
13579
  function isMACAddress(str, options) {
13434
13580
  (0, _assertString.default)(str);
@@ -13437,12 +13583,12 @@ function isMACAddress(str, options) {
13437
13583
  return macAddressNoColons.test(str);
13438
13584
  }
13439
13585
 
13440
- return macAddress.test(str);
13586
+ return macAddress.test(str) || macAddressWithHyphen.test(str) || macAddressWithSpaces.test(str);
13441
13587
  }
13442
13588
 
13443
13589
  module.exports = exports.default;
13444
13590
  module.exports.default = exports.default;
13445
- },{"./util/assertString":114}],87:[function(require,module,exports){
13591
+ },{"./util/assertString":117}],88:[function(require,module,exports){
13446
13592
  "use strict";
13447
13593
 
13448
13594
  Object.defineProperty(exports, "__esModule", {
@@ -13463,7 +13609,7 @@ function isMD5(str) {
13463
13609
 
13464
13610
  module.exports = exports.default;
13465
13611
  module.exports.default = exports.default;
13466
- },{"./util/assertString":114}],88:[function(require,module,exports){
13612
+ },{"./util/assertString":117}],89:[function(require,module,exports){
13467
13613
  "use strict";
13468
13614
 
13469
13615
  Object.defineProperty(exports, "__esModule", {
@@ -13484,7 +13630,7 @@ function isMagnetURI(url) {
13484
13630
 
13485
13631
  module.exports = exports.default;
13486
13632
  module.exports.default = exports.default;
13487
- },{"./util/assertString":114}],89:[function(require,module,exports){
13633
+ },{"./util/assertString":117}],90:[function(require,module,exports){
13488
13634
  "use strict";
13489
13635
 
13490
13636
  Object.defineProperty(exports, "__esModule", {
@@ -13536,7 +13682,7 @@ function isMimeType(str) {
13536
13682
 
13537
13683
  module.exports = exports.default;
13538
13684
  module.exports.default = exports.default;
13539
- },{"./util/assertString":114}],90:[function(require,module,exports){
13685
+ },{"./util/assertString":117}],91:[function(require,module,exports){
13540
13686
  "use strict";
13541
13687
 
13542
13688
  Object.defineProperty(exports, "__esModule", {
@@ -13551,6 +13697,7 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
13551
13697
 
13552
13698
  /* eslint-disable max-len */
13553
13699
  var phones = {
13700
+ 'am-AM': /^(\+?374|0)((10|[9|7][0-9])\d{6}$|[2-4]\d{7}$)/,
13554
13701
  'ar-AE': /^((\+?971)|0)?5[024568]\d{7}$/,
13555
13702
  'ar-BH': /^(\+?973)?(3|6)\d{7}$/,
13556
13703
  'ar-DZ': /^(\+?213|0)(5|6|7)\d{8}$/,
@@ -13563,15 +13710,18 @@ var phones = {
13563
13710
  'ar-TN': /^(\+?216)?[2459]\d{7}$/,
13564
13711
  'be-BY': /^(\+?375)?(24|25|29|33|44)\d{7}$/,
13565
13712
  'bg-BG': /^(\+?359|0)?8[789]\d{7}$/,
13566
- 'bn-BD': /^(\+?880|0)1[1356789][0-9]{8}$/,
13713
+ 'bn-BD': /^(\+?880|0)1[13456789][0-9]{8}$/,
13567
13714
  'cs-CZ': /^(\+?420)? ?[1-9][0-9]{2} ?[0-9]{3} ?[0-9]{3}$/,
13568
13715
  'da-DK': /^(\+?45)?\s?\d{2}\s?\d{2}\s?\d{2}\s?\d{2}$/,
13569
13716
  'de-DE': /^(\+49)?0?1(5[0-25-9]\d|6([23]|0\d?)|7([0-57-9]|6\d))\d{7}$/,
13717
+ 'de-AT': /^(\+43|0)\d{1,4}\d{3,12}$/,
13570
13718
  'el-GR': /^(\+?30|0)?(69\d{8})$/,
13571
13719
  'en-AU': /^(\+?61|0)4\d{8}$/,
13572
13720
  'en-GB': /^(\+?44|0)7\d{9}$/,
13721
+ 'en-GG': /^(\+?44|0)1481\d{6}$/,
13573
13722
  'en-GH': /^(\+233|0)(20|50|24|54|27|57|26|56|23|28)\d{7}$/,
13574
- 'en-HK': /^(\+?852\-?)?[456789]\d{3}\-?\d{4}$/,
13723
+ 'en-HK': /^(\+?852[-\s]?)?[456789]\d{3}[-\s]?\d{4}$/,
13724
+ 'en-MO': /^(\+?853[-\s]?)?[6]\d{3}[-\s]?\d{4}$/,
13575
13725
  'en-IE': /^(\+?353|0)8[356789]\d{7}$/,
13576
13726
  'en-IN': /^(\+?91|0)?[6789]\d{9}$/,
13577
13727
  'en-KE': /^(\+?254|0)(7|1)\d{8}$/,
@@ -13588,8 +13738,10 @@ var phones = {
13588
13738
  'en-ZA': /^(\+?27|0)\d{9}$/,
13589
13739
  'en-ZM': /^(\+?26)?09[567]\d{7}$/,
13590
13740
  'es-CL': /^(\+?56|0)[2-9]\d{1}\d{7}$/,
13741
+ 'es-EC': /^(\+?593|0)([2-7]|9[2-9])\d{7}$/,
13591
13742
  'es-ES': /^(\+?34)?(6\d{1}|7[1234])\d{7}$/,
13592
13743
  'es-MX': /^(\+?52)?(1|01)?\d{10,11}$/,
13744
+ 'es-PA': /^(\+?507)\d{7,8}$/,
13593
13745
  'es-PY': /^(\+?595|0)9[9876]\d{7}$/,
13594
13746
  'es-UY': /^(\+598|0)9[1-9][\d]{6}$/,
13595
13747
  'et-EE': /^(\+?372)?\s?(5|8[1-4])\s?([0-9]\s?){6,7}$/,
@@ -13598,17 +13750,22 @@ var phones = {
13598
13750
  'fj-FJ': /^(\+?679)?\s?\d{3}\s?\d{4}$/,
13599
13751
  'fo-FO': /^(\+?298)?\s?\d{2}\s?\d{2}\s?\d{2}$/,
13600
13752
  'fr-FR': /^(\+?33|0)[67]\d{8}$/,
13753
+ 'fr-GF': /^(\+?594|0|00594)[67]\d{8}$/,
13754
+ 'fr-GP': /^(\+?590|0|00590)[67]\d{8}$/,
13755
+ 'fr-MQ': /^(\+?596|0|00596)[67]\d{8}$/,
13756
+ 'fr-RE': /^(\+?262|0|00262)[67]\d{8}$/,
13601
13757
  'he-IL': /^(\+972|0)([23489]|5[012345689]|77)[1-9]\d{6}$/,
13602
13758
  'hu-HU': /^(\+?36)(20|30|70)\d{7}$/,
13603
13759
  'id-ID': /^(\+?62|0)8(1[123456789]|2[1238]|3[1238]|5[12356789]|7[78]|9[56789]|8[123456789])([\s?|\d]{5,11})$/,
13604
13760
  'it-IT': /^(\+?39)?\s?3\d{2} ?\d{6,7}$/,
13605
- 'ja-JP': /^(\+?81|0)[789]0[ \-]?[1-9]\d{2}[ \-]?\d{5}$/,
13761
+ 'ja-JP': /^(\+81[ \-]?(\(0\))?|0)[6789]0[ \-]?\d{4}[ \-]?\d{4}$/,
13606
13762
  'kk-KZ': /^(\+?7|8)?7\d{9}$/,
13607
13763
  'kl-GL': /^(\+?299)?\s?\d{2}\s?\d{2}\s?\d{2}$/,
13608
13764
  'ko-KR': /^((\+?82)[ \-]?)?0?1([0|1|6|7|8|9]{1})[ \-]?\d{3,4}[ \-]?\d{4}$/,
13609
13765
  'lt-LT': /^(\+370|8)\d{8}$/,
13610
13766
  'ms-MY': /^(\+?6?01){1}(([0145]{1}(\-|\s)?\d{7,8})|([236789]{1}(\s|\-)?\d{7}))$/,
13611
13767
  'nb-NO': /^(\+?47)?[49]\d{7}$/,
13768
+ 'ne-NP': /^(\+?977)?9[78]\d{8}$/,
13612
13769
  'nl-BE': /^(\+?32|0)4?\d{8}$/,
13613
13770
  'nl-NL': /^(\+?31|0)6?\d{8}$/,
13614
13771
  'nn-NO': /^(\+?47)?[49]\d{7}$/,
@@ -13625,7 +13782,7 @@ var phones = {
13625
13782
  'tr-TR': /^(\+?90|0)?5\d{9}$/,
13626
13783
  'uk-UA': /^(\+?38|8)?0\d{9}$/,
13627
13784
  'vi-VN': /^(\+?84|0)((3([2-9]))|(5([2689]))|(7([0|6-9]))|(8([1-6|89]))|(9([0-9])))([0-9]{7})$/,
13628
- 'zh-CN': /^((\+|00)86)?1([358][0-9]|4[579]|6[67]|7[0135678]|9[189])[0-9]{8}$/,
13785
+ 'zh-CN': /^((\+|00)86)?1([358][0-9]|4[579]|6[67]|7[01235678]|9[189])[0-9]{8}$/,
13629
13786
  'zh-TW': /^(\+?886\-?|0)?9\d{8}$/
13630
13787
  };
13631
13788
  /* eslint-enable max-len */
@@ -13634,6 +13791,7 @@ var phones = {
13634
13791
  phones['en-CA'] = phones['en-US'];
13635
13792
  phones['fr-BE'] = phones['nl-BE'];
13636
13793
  phones['zh-HK'] = phones['en-HK'];
13794
+ phones['zh-MO'] = phones['en-MO'];
13637
13795
 
13638
13796
  function isMobilePhone(str, locale, options) {
13639
13797
  (0, _assertString.default)(str);
@@ -13678,7 +13836,7 @@ function isMobilePhone(str, locale, options) {
13678
13836
 
13679
13837
  var locales = Object.keys(phones);
13680
13838
  exports.locales = locales;
13681
- },{"./util/assertString":114}],91:[function(require,module,exports){
13839
+ },{"./util/assertString":117}],92:[function(require,module,exports){
13682
13840
  "use strict";
13683
13841
 
13684
13842
  Object.defineProperty(exports, "__esModule", {
@@ -13699,7 +13857,7 @@ function isMongoId(str) {
13699
13857
 
13700
13858
  module.exports = exports.default;
13701
13859
  module.exports.default = exports.default;
13702
- },{"./isHexadecimal":68,"./util/assertString":114}],92:[function(require,module,exports){
13860
+ },{"./isHexadecimal":69,"./util/assertString":117}],93:[function(require,module,exports){
13703
13861
  "use strict";
13704
13862
 
13705
13863
  Object.defineProperty(exports, "__esModule", {
@@ -13722,7 +13880,7 @@ function isMultibyte(str) {
13722
13880
 
13723
13881
  module.exports = exports.default;
13724
13882
  module.exports.default = exports.default;
13725
- },{"./util/assertString":114}],93:[function(require,module,exports){
13883
+ },{"./util/assertString":117}],94:[function(require,module,exports){
13726
13884
  "use strict";
13727
13885
 
13728
13886
  Object.defineProperty(exports, "__esModule", {
@@ -13749,7 +13907,28 @@ function isNumeric(str, options) {
13749
13907
 
13750
13908
  module.exports = exports.default;
13751
13909
  module.exports.default = exports.default;
13752
- },{"./util/assertString":114}],94:[function(require,module,exports){
13910
+ },{"./util/assertString":117}],95:[function(require,module,exports){
13911
+ "use strict";
13912
+
13913
+ Object.defineProperty(exports, "__esModule", {
13914
+ value: true
13915
+ });
13916
+ exports.default = isOctal;
13917
+
13918
+ var _assertString = _interopRequireDefault(require("./util/assertString"));
13919
+
13920
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13921
+
13922
+ var octal = /^(0o)?[0-7]+$/i;
13923
+
13924
+ function isOctal(str) {
13925
+ (0, _assertString.default)(str);
13926
+ return octal.test(str);
13927
+ }
13928
+
13929
+ module.exports = exports.default;
13930
+ module.exports.default = exports.default;
13931
+ },{"./util/assertString":117}],96:[function(require,module,exports){
13753
13932
  "use strict";
13754
13933
 
13755
13934
  Object.defineProperty(exports, "__esModule", {
@@ -13770,7 +13949,7 @@ function isPort(str) {
13770
13949
 
13771
13950
  module.exports = exports.default;
13772
13951
  module.exports.default = exports.default;
13773
- },{"./isInt":80}],95:[function(require,module,exports){
13952
+ },{"./isInt":81}],97:[function(require,module,exports){
13774
13953
  "use strict";
13775
13954
 
13776
13955
  Object.defineProperty(exports, "__esModule", {
@@ -13810,8 +13989,9 @@ var patterns = {
13810
13989
  HR: /^([1-5]\d{4}$)/,
13811
13990
  HU: fourDigit,
13812
13991
  ID: fiveDigit,
13992
+ IE: /^(?!.*(?:o))[A-z]\d[\dw]\s\w{4}$/i,
13813
13993
  IL: fiveDigit,
13814
- IN: sixDigit,
13994
+ IN: /^((?!10|29|35|54|55|65|66|86|87|88|89)[1-9][0-9]{5})$/,
13815
13995
  IS: threeDigit,
13816
13996
  IT: fiveDigit,
13817
13997
  JP: /^\d{3}\-\d{4}$/,
@@ -13831,7 +14011,7 @@ var patterns = {
13831
14011
  RO: sixDigit,
13832
14012
  RU: sixDigit,
13833
14013
  SA: fiveDigit,
13834
- SE: /^\d{3}\s?\d{2}$/,
14014
+ SE: /^[1-9]\d{2}\s?\d{2}$/,
13835
14015
  SI: fourDigit,
13836
14016
  SK: /^\d{3}\s?\d{2}$/,
13837
14017
  TN: fourDigit,
@@ -13867,7 +14047,7 @@ function _default(str, locale) {
13867
14047
 
13868
14048
  throw new Error("Invalid locale '".concat(locale, "'"));
13869
14049
  }
13870
- },{"./util/assertString":114}],96:[function(require,module,exports){
14050
+ },{"./util/assertString":117}],98:[function(require,module,exports){
13871
14051
  "use strict";
13872
14052
 
13873
14053
  Object.defineProperty(exports, "__esModule", {
@@ -13901,7 +14081,28 @@ function isRFC3339(str) {
13901
14081
 
13902
14082
  module.exports = exports.default;
13903
14083
  module.exports.default = exports.default;
13904
- },{"./util/assertString":114}],97:[function(require,module,exports){
14084
+ },{"./util/assertString":117}],99:[function(require,module,exports){
14085
+ "use strict";
14086
+
14087
+ Object.defineProperty(exports, "__esModule", {
14088
+ value: true
14089
+ });
14090
+ exports.default = isSlug;
14091
+
14092
+ var _assertString = _interopRequireDefault(require("./util/assertString"));
14093
+
14094
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14095
+
14096
+ var charsetRegex = /^[^-_](?!.*?[-_]{2,})([a-z0-9\\-]{1,}).*[^-_]$/;
14097
+
14098
+ function isSlug(str) {
14099
+ (0, _assertString.default)(str);
14100
+ return charsetRegex.test(str);
14101
+ }
14102
+
14103
+ module.exports = exports.default;
14104
+ module.exports.default = exports.default;
14105
+ },{"./util/assertString":117}],100:[function(require,module,exports){
13905
14106
  "use strict";
13906
14107
 
13907
14108
  Object.defineProperty(exports, "__esModule", {
@@ -13922,7 +14123,7 @@ function isSurrogatePair(str) {
13922
14123
 
13923
14124
  module.exports = exports.default;
13924
14125
  module.exports.default = exports.default;
13925
- },{"./util/assertString":114}],98:[function(require,module,exports){
14126
+ },{"./util/assertString":117}],101:[function(require,module,exports){
13926
14127
  "use strict";
13927
14128
 
13928
14129
  Object.defineProperty(exports, "__esModule", {
@@ -13940,6 +14141,16 @@ var _merge = _interopRequireDefault(require("./util/merge"));
13940
14141
 
13941
14142
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
13942
14143
 
14144
+ /*
14145
+ options for isURL method
14146
+
14147
+ require_protocol - if set as true isURL will return false if protocol is not present in the URL
14148
+ require_valid_protocol - isURL will check if the URL's protocol is present in the protocols option
14149
+ protocols - valid protocols can be modified with this option
14150
+ require_host - if set as false isURL will not check if host is present in the URL
14151
+ allow_protocol_relative_urls - if set as true protocol relative URLs will be allowed
14152
+
14153
+ */
13943
14154
  var default_url_options = {
13944
14155
  protocols: ['http', 'https', 'ftp'],
13945
14156
  require_tld: true,
@@ -14075,7 +14286,7 @@ function isURL(url, options) {
14075
14286
 
14076
14287
  module.exports = exports.default;
14077
14288
  module.exports.default = exports.default;
14078
- },{"./isFQDN":62,"./isIP":69,"./util/assertString":114,"./util/merge":116}],99:[function(require,module,exports){
14289
+ },{"./isFQDN":63,"./isIP":70,"./util/assertString":117,"./util/merge":119}],102:[function(require,module,exports){
14079
14290
  "use strict";
14080
14291
 
14081
14292
  Object.defineProperty(exports, "__esModule", {
@@ -14103,7 +14314,7 @@ function isUUID(str) {
14103
14314
 
14104
14315
  module.exports = exports.default;
14105
14316
  module.exports.default = exports.default;
14106
- },{"./util/assertString":114}],100:[function(require,module,exports){
14317
+ },{"./util/assertString":117}],103:[function(require,module,exports){
14107
14318
  "use strict";
14108
14319
 
14109
14320
  Object.defineProperty(exports, "__esModule", {
@@ -14122,7 +14333,7 @@ function isUppercase(str) {
14122
14333
 
14123
14334
  module.exports = exports.default;
14124
14335
  module.exports.default = exports.default;
14125
- },{"./util/assertString":114}],101:[function(require,module,exports){
14336
+ },{"./util/assertString":117}],104:[function(require,module,exports){
14126
14337
  "use strict";
14127
14338
 
14128
14339
  Object.defineProperty(exports, "__esModule", {
@@ -14145,7 +14356,7 @@ function isVariableWidth(str) {
14145
14356
 
14146
14357
  module.exports = exports.default;
14147
14358
  module.exports.default = exports.default;
14148
- },{"./isFullWidth":64,"./isHalfWidth":65,"./util/assertString":114}],102:[function(require,module,exports){
14359
+ },{"./isFullWidth":65,"./isHalfWidth":66,"./util/assertString":117}],105:[function(require,module,exports){
14149
14360
  "use strict";
14150
14361
 
14151
14362
  Object.defineProperty(exports, "__esModule", {
@@ -14171,7 +14382,7 @@ function isWhitelisted(str, chars) {
14171
14382
 
14172
14383
  module.exports = exports.default;
14173
14384
  module.exports.default = exports.default;
14174
- },{"./util/assertString":114}],103:[function(require,module,exports){
14385
+ },{"./util/assertString":117}],106:[function(require,module,exports){
14175
14386
  "use strict";
14176
14387
 
14177
14388
  Object.defineProperty(exports, "__esModule", {
@@ -14192,7 +14403,7 @@ function ltrim(str, chars) {
14192
14403
 
14193
14404
  module.exports = exports.default;
14194
14405
  module.exports.default = exports.default;
14195
- },{"./util/assertString":114}],104:[function(require,module,exports){
14406
+ },{"./util/assertString":117}],107:[function(require,module,exports){
14196
14407
  "use strict";
14197
14408
 
14198
14409
  Object.defineProperty(exports, "__esModule", {
@@ -14216,7 +14427,7 @@ function matches(str, pattern, modifiers) {
14216
14427
 
14217
14428
  module.exports = exports.default;
14218
14429
  module.exports.default = exports.default;
14219
- },{"./util/assertString":114}],105:[function(require,module,exports){
14430
+ },{"./util/assertString":117}],108:[function(require,module,exports){
14220
14431
  "use strict";
14221
14432
 
14222
14433
  Object.defineProperty(exports, "__esModule", {
@@ -14368,7 +14579,7 @@ function normalizeEmail(email, options) {
14368
14579
 
14369
14580
  module.exports = exports.default;
14370
14581
  module.exports.default = exports.default;
14371
- },{"./util/merge":116}],106:[function(require,module,exports){
14582
+ },{"./util/merge":119}],109:[function(require,module,exports){
14372
14583
  "use strict";
14373
14584
 
14374
14585
  Object.defineProperty(exports, "__esModule", {
@@ -14389,7 +14600,7 @@ function rtrim(str, chars) {
14389
14600
 
14390
14601
  module.exports = exports.default;
14391
14602
  module.exports.default = exports.default;
14392
- },{"./util/assertString":114}],107:[function(require,module,exports){
14603
+ },{"./util/assertString":117}],110:[function(require,module,exports){
14393
14604
  "use strict";
14394
14605
 
14395
14606
  Object.defineProperty(exports, "__esModule", {
@@ -14411,7 +14622,7 @@ function stripLow(str, keep_new_lines) {
14411
14622
 
14412
14623
  module.exports = exports.default;
14413
14624
  module.exports.default = exports.default;
14414
- },{"./blacklist":42,"./util/assertString":114}],108:[function(require,module,exports){
14625
+ },{"./blacklist":42,"./util/assertString":117}],111:[function(require,module,exports){
14415
14626
  "use strict";
14416
14627
 
14417
14628
  Object.defineProperty(exports, "__esModule", {
@@ -14435,7 +14646,7 @@ function toBoolean(str, strict) {
14435
14646
 
14436
14647
  module.exports = exports.default;
14437
14648
  module.exports.default = exports.default;
14438
- },{"./util/assertString":114}],109:[function(require,module,exports){
14649
+ },{"./util/assertString":117}],112:[function(require,module,exports){
14439
14650
  "use strict";
14440
14651
 
14441
14652
  Object.defineProperty(exports, "__esModule", {
@@ -14455,7 +14666,7 @@ function toDate(date) {
14455
14666
 
14456
14667
  module.exports = exports.default;
14457
14668
  module.exports.default = exports.default;
14458
- },{"./util/assertString":114}],110:[function(require,module,exports){
14669
+ },{"./util/assertString":117}],113:[function(require,module,exports){
14459
14670
  "use strict";
14460
14671
 
14461
14672
  Object.defineProperty(exports, "__esModule", {
@@ -14463,18 +14674,18 @@ Object.defineProperty(exports, "__esModule", {
14463
14674
  });
14464
14675
  exports.default = toFloat;
14465
14676
 
14466
- var _assertString = _interopRequireDefault(require("./util/assertString"));
14677
+ var _isFloat = _interopRequireDefault(require("./isFloat"));
14467
14678
 
14468
14679
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
14469
14680
 
14470
14681
  function toFloat(str) {
14471
- (0, _assertString.default)(str);
14682
+ if (!(0, _isFloat.default)(str)) return NaN;
14472
14683
  return parseFloat(str);
14473
14684
  }
14474
14685
 
14475
14686
  module.exports = exports.default;
14476
14687
  module.exports.default = exports.default;
14477
- },{"./util/assertString":114}],111:[function(require,module,exports){
14688
+ },{"./isFloat":64}],114:[function(require,module,exports){
14478
14689
  "use strict";
14479
14690
 
14480
14691
  Object.defineProperty(exports, "__esModule", {
@@ -14493,7 +14704,7 @@ function toInt(str, radix) {
14493
14704
 
14494
14705
  module.exports = exports.default;
14495
14706
  module.exports.default = exports.default;
14496
- },{"./util/assertString":114}],112:[function(require,module,exports){
14707
+ },{"./util/assertString":117}],115:[function(require,module,exports){
14497
14708
  "use strict";
14498
14709
 
14499
14710
  Object.defineProperty(exports, "__esModule", {
@@ -14513,7 +14724,7 @@ function trim(str, chars) {
14513
14724
 
14514
14725
  module.exports = exports.default;
14515
14726
  module.exports.default = exports.default;
14516
- },{"./ltrim":103,"./rtrim":106}],113:[function(require,module,exports){
14727
+ },{"./ltrim":106,"./rtrim":109}],116:[function(require,module,exports){
14517
14728
  "use strict";
14518
14729
 
14519
14730
  Object.defineProperty(exports, "__esModule", {
@@ -14532,7 +14743,7 @@ function unescape(str) {
14532
14743
 
14533
14744
  module.exports = exports.default;
14534
14745
  module.exports.default = exports.default;
14535
- },{"./util/assertString":114}],114:[function(require,module,exports){
14746
+ },{"./util/assertString":117}],117:[function(require,module,exports){
14536
14747
  "use strict";
14537
14748
 
14538
14749
  Object.defineProperty(exports, "__esModule", {
@@ -14566,7 +14777,7 @@ function assertString(input) {
14566
14777
 
14567
14778
  module.exports = exports.default;
14568
14779
  module.exports.default = exports.default;
14569
- },{}],115:[function(require,module,exports){
14780
+ },{}],118:[function(require,module,exports){
14570
14781
  "use strict";
14571
14782
 
14572
14783
  Object.defineProperty(exports, "__esModule", {
@@ -14584,7 +14795,7 @@ var _default = includes;
14584
14795
  exports.default = _default;
14585
14796
  module.exports = exports.default;
14586
14797
  module.exports.default = exports.default;
14587
- },{}],116:[function(require,module,exports){
14798
+ },{}],119:[function(require,module,exports){
14588
14799
  "use strict";
14589
14800
 
14590
14801
  Object.defineProperty(exports, "__esModule", {
@@ -14607,7 +14818,7 @@ function merge() {
14607
14818
 
14608
14819
  module.exports = exports.default;
14609
14820
  module.exports.default = exports.default;
14610
- },{}],117:[function(require,module,exports){
14821
+ },{}],120:[function(require,module,exports){
14611
14822
  "use strict";
14612
14823
 
14613
14824
  Object.defineProperty(exports, "__esModule", {
@@ -14633,7 +14844,7 @@ function toString(input) {
14633
14844
 
14634
14845
  module.exports = exports.default;
14635
14846
  module.exports.default = exports.default;
14636
- },{}],118:[function(require,module,exports){
14847
+ },{}],121:[function(require,module,exports){
14637
14848
  "use strict";
14638
14849
 
14639
14850
  Object.defineProperty(exports, "__esModule", {
@@ -14652,7 +14863,7 @@ function whitelist(str, chars) {
14652
14863
 
14653
14864
  module.exports = exports.default;
14654
14865
  module.exports.default = exports.default;
14655
- },{"./util/assertString":114}],119:[function(require,module,exports){
14866
+ },{"./util/assertString":117}],122:[function(require,module,exports){
14656
14867
  module.exports = extend
14657
14868
 
14658
14869
  var hasOwnProperty = Object.prototype.hasOwnProperty;
@@ -14673,7 +14884,7 @@ function extend() {
14673
14884
  return target
14674
14885
  }
14675
14886
 
14676
- },{}],120:[function(require,module,exports){
14887
+ },{}],123:[function(require,module,exports){
14677
14888
  "use strict";
14678
14889
 
14679
14890
  module.exports = {
@@ -14735,7 +14946,7 @@ module.exports = {
14735
14946
 
14736
14947
  };
14737
14948
 
14738
- },{}],121:[function(require,module,exports){
14949
+ },{}],124:[function(require,module,exports){
14739
14950
  /*jshint maxlen: false*/
14740
14951
 
14741
14952
  var validator = require("validator");
@@ -14866,7 +15077,7 @@ var FormatValidators = {
14866
15077
 
14867
15078
  module.exports = FormatValidators;
14868
15079
 
14869
- },{"validator":40}],122:[function(require,module,exports){
15080
+ },{"validator":40}],125:[function(require,module,exports){
14870
15081
  "use strict";
14871
15082
 
14872
15083
  var FormatValidators = require("./FormatValidators"),
@@ -14890,7 +15101,9 @@ var JsonValidators = {
14890
15101
  return;
14891
15102
  }
14892
15103
 
14893
- if (Utils.whatIs(json / schema.multipleOf) !== "integer") {
15104
+ var stringMultipleOf = String(schema.multipleOf);
15105
+ var scale = Math.pow(10, stringMultipleOf.length - stringMultipleOf.indexOf(".") - 1);
15106
+ if (Utils.whatIs((json * scale) / (schema.multipleOf * scale)) !== "integer") {
14894
15107
  report.addError("MULTIPLE_OF", [json, schema.multipleOf], null, schema);
14895
15108
  }
14896
15109
  },
@@ -15487,7 +15700,7 @@ exports.validate = function (report, schema, json) {
15487
15700
 
15488
15701
  };
15489
15702
 
15490
- },{"./FormatValidators":121,"./Report":124,"./Utils":128}],123:[function(require,module,exports){
15703
+ },{"./FormatValidators":124,"./Report":127,"./Utils":131}],126:[function(require,module,exports){
15491
15704
  // Number.isFinite polyfill
15492
15705
  // http://people.mozilla.org/~jorendorff/es6-draft.html#sec-number.isfinite
15493
15706
  if (typeof Number.isFinite !== "function") {
@@ -15505,8 +15718,8 @@ if (typeof Number.isFinite !== "function") {
15505
15718
  };
15506
15719
  }
15507
15720
 
15508
- },{}],124:[function(require,module,exports){
15509
- (function (process){
15721
+ },{}],127:[function(require,module,exports){
15722
+ (function (process){(function (){
15510
15723
  "use strict";
15511
15724
 
15512
15725
  var get = require("lodash.get");
@@ -15590,7 +15803,7 @@ Report.prototype.processAsyncTasks = function (timeout, callback) {
15590
15803
  function finish() {
15591
15804
  process.nextTick(function () {
15592
15805
  var valid = self.errors.length === 0,
15593
- err = valid ? undefined : self.errors;
15806
+ err = valid ? null : self.errors;
15594
15807
  callback(err, valid);
15595
15808
  });
15596
15809
  }
@@ -15807,8 +16020,8 @@ Report.prototype.addCustomError = function (errorCode, errorMessage, params, sub
15807
16020
 
15808
16021
  module.exports = Report;
15809
16022
 
15810
- }).call(this,require('_process'))
15811
- },{"./Errors":120,"./Utils":128,"_process":12,"lodash.get":10}],125:[function(require,module,exports){
16023
+ }).call(this)}).call(this,require('_process'))
16024
+ },{"./Errors":123,"./Utils":131,"_process":12,"lodash.get":10}],128:[function(require,module,exports){
15812
16025
  "use strict";
15813
16026
 
15814
16027
  var isequal = require("lodash.isequal");
@@ -15998,7 +16211,7 @@ exports.getSchemaByUri = function (report, uri, root) {
15998
16211
 
15999
16212
  exports.getRemotePath = getRemotePath;
16000
16213
 
16001
- },{"./Report":124,"./SchemaCompilation":126,"./SchemaValidation":127,"./Utils":128,"lodash.isequal":11}],126:[function(require,module,exports){
16214
+ },{"./Report":127,"./SchemaCompilation":129,"./SchemaValidation":130,"./Utils":131,"lodash.isequal":11}],129:[function(require,module,exports){
16002
16215
  "use strict";
16003
16216
 
16004
16217
  var Report = require("./Report");
@@ -16299,7 +16512,7 @@ exports.compileSchema = function (report, schema) {
16299
16512
 
16300
16513
  };
16301
16514
 
16302
- },{"./Report":124,"./SchemaCache":125,"./Utils":128}],127:[function(require,module,exports){
16515
+ },{"./Report":127,"./SchemaCache":128,"./Utils":131}],130:[function(require,module,exports){
16303
16516
  "use strict";
16304
16517
 
16305
16518
  var FormatValidators = require("./FormatValidators"),
@@ -16920,7 +17133,7 @@ exports.validateSchema = function (report, schema) {
16920
17133
  return isValid;
16921
17134
  };
16922
17135
 
16923
- },{"./FormatValidators":121,"./JsonValidation":122,"./Report":124,"./Utils":128}],128:[function(require,module,exports){
17136
+ },{"./FormatValidators":124,"./JsonValidation":125,"./Report":127,"./Utils":131}],131:[function(require,module,exports){
16924
17137
  "use strict";
16925
17138
 
16926
17139
  exports.jsonSymbol = Symbol.for("z-schema/json");
@@ -17196,8 +17409,8 @@ exports.ucs2decode = function (string) {
17196
17409
  };
17197
17410
  /*jshint +W016*/
17198
17411
 
17199
- },{}],129:[function(require,module,exports){
17200
- (function (process){
17412
+ },{}],132:[function(require,module,exports){
17413
+ (function (process){(function (){
17201
17414
  "use strict";
17202
17415
 
17203
17416
  require("./Polyfills");
@@ -17252,9 +17465,9 @@ var defaultOptions = {
17252
17465
  strictMode: false,
17253
17466
  // report error paths as an array of path segments to get to the offending node
17254
17467
  reportPathAsArray: false,
17255
- // stops validation as soon as an error is found, true by default but can be turned off
17256
- breakOnFirstError: true,
17257
- // check if schema follow best practices and common sence
17468
+ // stop validation as soon as an error is found
17469
+ breakOnFirstError: false,
17470
+ // check if schema follows best practices and common sense
17258
17471
  pedanticCheck: false,
17259
17472
  // ignore unknown formats (do not report them as an error)
17260
17473
  ignoreUnknownFormats: false,
@@ -17464,7 +17677,7 @@ ZSchema.prototype.getLastError = function () {
17464
17677
  return e;
17465
17678
  };
17466
17679
  ZSchema.prototype.getLastErrors = function () {
17467
- return this.lastReport && this.lastReport.errors.length > 0 ? this.lastReport.errors : undefined;
17680
+ return this.lastReport && this.lastReport.errors.length > 0 ? this.lastReport.errors : null;
17468
17681
  };
17469
17682
  ZSchema.prototype.getMissingReferences = function (arr) {
17470
17683
  arr = arr || this.lastReport.errors;
@@ -17608,8 +17821,8 @@ ZSchema.jsonSymbol = Utils.jsonSymbol;
17608
17821
 
17609
17822
  module.exports = ZSchema;
17610
17823
 
17611
- }).call(this,require('_process'))
17612
- },{"./FormatValidators":121,"./JsonValidation":122,"./Polyfills":123,"./Report":124,"./SchemaCache":125,"./SchemaCompilation":126,"./SchemaValidation":127,"./Utils":128,"./schemas/hyper-schema.json":130,"./schemas/schema.json":131,"_process":12,"lodash.get":10}],130:[function(require,module,exports){
17824
+ }).call(this)}).call(this,require('_process'))
17825
+ },{"./FormatValidators":124,"./JsonValidation":125,"./Polyfills":126,"./Report":127,"./SchemaCache":128,"./SchemaCompilation":129,"./SchemaValidation":130,"./Utils":131,"./schemas/hyper-schema.json":133,"./schemas/schema.json":134,"_process":12,"lodash.get":10}],133:[function(require,module,exports){
17613
17826
  module.exports={
17614
17827
  "$schema": "http://json-schema.org/draft-04/hyper-schema#",
17615
17828
  "id": "http://json-schema.org/draft-04/hyper-schema#",
@@ -17769,7 +17982,7 @@ module.exports={
17769
17982
  }
17770
17983
 
17771
17984
 
17772
- },{}],131:[function(require,module,exports){
17985
+ },{}],134:[function(require,module,exports){
17773
17986
  module.exports={
17774
17987
  "id": "http://json-schema.org/draft-04/schema#",
17775
17988
  "$schema": "http://json-schema.org/draft-04/schema#",
@@ -17922,7 +18135,7 @@ module.exports={
17922
18135
  "default": {}
17923
18136
  }
17924
18137
 
17925
- },{}],132:[function(require,module,exports){
18138
+ },{}],135:[function(require,module,exports){
17926
18139
  "use strict";
17927
18140
 
17928
18141
  module.exports = {
@@ -18022,7 +18235,7 @@ module.exports = {
18022
18235
  ]
18023
18236
  };
18024
18237
 
18025
- },{}],133:[function(require,module,exports){
18238
+ },{}],136:[function(require,module,exports){
18026
18239
  "use strict";
18027
18240
 
18028
18241
  module.exports = {
@@ -18087,7 +18300,7 @@ module.exports = {
18087
18300
  ]
18088
18301
  };
18089
18302
 
18090
- },{}],134:[function(require,module,exports){
18303
+ },{}],137:[function(require,module,exports){
18091
18304
  "use strict";
18092
18305
 
18093
18306
  module.exports = {
@@ -18142,25 +18355,11 @@ module.exports = {
18142
18355
  "type": "string"
18143
18356
  },
18144
18357
  valid: true
18145
- },
18146
- {
18147
- description: "should not call async validator if errors have been found before",
18148
- data: "xxx",
18149
- schema: {
18150
- "type": "boolean",
18151
- "format": "shouldTimeout"
18152
- },
18153
- valid: false,
18154
- after: function (err, valid) {
18155
- expect(valid).toBe(false);
18156
- expect(err.length).toBe(1);
18157
- expect(err[0].code).toBe("INVALID_TYPE");
18158
- }
18159
18358
  }
18160
18359
  ]
18161
18360
  };
18162
18361
 
18163
- },{}],135:[function(require,module,exports){
18362
+ },{}],138:[function(require,module,exports){
18164
18363
  "use strict";
18165
18364
 
18166
18365
  //Implement new 'shouldFail' keyword
@@ -18223,7 +18422,7 @@ module.exports = {
18223
18422
  ]
18224
18423
  };
18225
18424
 
18226
- },{}],136:[function(require,module,exports){
18425
+ },{}],139:[function(require,module,exports){
18227
18426
  "use strict";
18228
18427
 
18229
18428
  module.exports = {
@@ -18251,7 +18450,7 @@ module.exports = {
18251
18450
  ]
18252
18451
  };
18253
18452
 
18254
- },{}],137:[function(require,module,exports){
18453
+ },{}],140:[function(require,module,exports){
18255
18454
  "use strict";
18256
18455
 
18257
18456
  module.exports = {
@@ -18276,7 +18475,7 @@ module.exports = {
18276
18475
  ]
18277
18476
  };
18278
18477
 
18279
- },{}],138:[function(require,module,exports){
18478
+ },{}],141:[function(require,module,exports){
18280
18479
  "use strict";
18281
18480
 
18282
18481
  module.exports = {
@@ -18312,7 +18511,7 @@ module.exports = {
18312
18511
  ]
18313
18512
  };
18314
18513
 
18315
- },{}],139:[function(require,module,exports){
18514
+ },{}],142:[function(require,module,exports){
18316
18515
  "use strict";
18317
18516
 
18318
18517
  module.exports = {
@@ -18385,7 +18584,7 @@ module.exports = {
18385
18584
  ]
18386
18585
  };
18387
18586
 
18388
- },{}],140:[function(require,module,exports){
18587
+ },{}],143:[function(require,module,exports){
18389
18588
  "use strict";
18390
18589
 
18391
18590
  module.exports = {
@@ -18413,7 +18612,7 @@ module.exports = {
18413
18612
  ]
18414
18613
  };
18415
18614
 
18416
- },{}],141:[function(require,module,exports){
18615
+ },{}],144:[function(require,module,exports){
18417
18616
  "use strict";
18418
18617
 
18419
18618
  module.exports = {
@@ -18441,7 +18640,7 @@ module.exports = {
18441
18640
  ]
18442
18641
  };
18443
18642
 
18444
- },{}],142:[function(require,module,exports){
18643
+ },{}],145:[function(require,module,exports){
18445
18644
  "use strict";
18446
18645
 
18447
18646
  module.exports = {
@@ -18469,7 +18668,7 @@ module.exports = {
18469
18668
  ]
18470
18669
  };
18471
18670
 
18472
- },{}],143:[function(require,module,exports){
18671
+ },{}],146:[function(require,module,exports){
18473
18672
  "use strict";
18474
18673
 
18475
18674
  module.exports = {
@@ -18497,7 +18696,7 @@ module.exports = {
18497
18696
  ]
18498
18697
  };
18499
18698
 
18500
- },{}],144:[function(require,module,exports){
18699
+ },{}],147:[function(require,module,exports){
18501
18700
  "use strict";
18502
18701
 
18503
18702
  module.exports = {
@@ -18525,7 +18724,7 @@ module.exports = {
18525
18724
  ]
18526
18725
  };
18527
18726
 
18528
- },{}],145:[function(require,module,exports){
18727
+ },{}],148:[function(require,module,exports){
18529
18728
  "use strict";
18530
18729
 
18531
18730
  module.exports = {
@@ -18581,7 +18780,7 @@ module.exports = {
18581
18780
  ]
18582
18781
  };
18583
18782
 
18584
- },{}],146:[function(require,module,exports){
18783
+ },{}],149:[function(require,module,exports){
18585
18784
  "use strict";
18586
18785
 
18587
18786
  module.exports = {
@@ -18625,7 +18824,7 @@ module.exports = {
18625
18824
  ]
18626
18825
  };
18627
18826
 
18628
- },{}],147:[function(require,module,exports){
18827
+ },{}],150:[function(require,module,exports){
18629
18828
  "use strict";
18630
18829
 
18631
18830
  module.exports = {
@@ -18738,7 +18937,7 @@ module.exports = {
18738
18937
  ]
18739
18938
  };
18740
18939
 
18741
- },{}],148:[function(require,module,exports){
18940
+ },{}],151:[function(require,module,exports){
18742
18941
  "use strict";
18743
18942
 
18744
18943
  module.exports = {
@@ -18755,7 +18954,7 @@ module.exports = {
18755
18954
  ]
18756
18955
  };
18757
18956
 
18758
- },{}],149:[function(require,module,exports){
18957
+ },{}],152:[function(require,module,exports){
18759
18958
  "use strict";
18760
18959
 
18761
18960
  module.exports = {
@@ -18777,7 +18976,7 @@ module.exports = {
18777
18976
  ]
18778
18977
  };
18779
18978
 
18780
- },{}],150:[function(require,module,exports){
18979
+ },{}],153:[function(require,module,exports){
18781
18980
  "use strict";
18782
18981
 
18783
18982
  module.exports = {
@@ -18795,7 +18994,7 @@ module.exports = {
18795
18994
  ]
18796
18995
  };
18797
18996
 
18798
- },{}],151:[function(require,module,exports){
18997
+ },{}],154:[function(require,module,exports){
18799
18998
  "use strict";
18800
18999
 
18801
19000
  module.exports = {
@@ -18864,7 +19063,7 @@ module.exports = {
18864
19063
  ]
18865
19064
  };
18866
19065
 
18867
- },{}],152:[function(require,module,exports){
19066
+ },{}],155:[function(require,module,exports){
18868
19067
  "use strict";
18869
19068
 
18870
19069
  module.exports = {
@@ -18879,7 +19078,7 @@ module.exports = {
18879
19078
  ]
18880
19079
  };
18881
19080
 
18882
- },{}],153:[function(require,module,exports){
19081
+ },{}],156:[function(require,module,exports){
18883
19082
  "use strict";
18884
19083
 
18885
19084
  module.exports = {
@@ -18903,7 +19102,7 @@ module.exports = {
18903
19102
  ]
18904
19103
  };
18905
19104
 
18906
- },{}],154:[function(require,module,exports){
19105
+ },{}],157:[function(require,module,exports){
18907
19106
  "use strict";
18908
19107
 
18909
19108
  module.exports = {
@@ -18978,7 +19177,7 @@ module.exports = {
18978
19177
  ]
18979
19178
  };
18980
19179
 
18981
- },{}],155:[function(require,module,exports){
19180
+ },{}],158:[function(require,module,exports){
18982
19181
  "use strict";
18983
19182
 
18984
19183
  module.exports = {
@@ -18999,34 +19198,7 @@ module.exports = {
18999
19198
  ]
19000
19199
  };
19001
19200
 
19002
- },{}],156:[function(require,module,exports){
19003
- "use strict";
19004
-
19005
- module.exports = {
19006
- description: "Issue #125 - Do not process format if type validation fails",
19007
- setup: function (validator, Class) {
19008
- Class.registerFormat("int32", function () {
19009
- return false;
19010
- });
19011
- },
19012
- schema: {
19013
- "type": "integer",
19014
- "format": "int32"
19015
- },
19016
- tests: [
19017
- {
19018
- description: "should only process type validation",
19019
- data: 1.1,
19020
- valid: false,
19021
- after: function (err) {
19022
- expect(err.length).toBe(1);
19023
- expect(err[0].code).toBe("INVALID_TYPE");
19024
- }
19025
- }
19026
- ]
19027
- };
19028
-
19029
- },{}],157:[function(require,module,exports){
19201
+ },{}],159:[function(require,module,exports){
19030
19202
  "use strict";
19031
19203
 
19032
19204
  var REF_NAME = "int.json";
@@ -19073,7 +19245,7 @@ module.exports = {
19073
19245
  ]
19074
19246
  };
19075
19247
 
19076
- },{}],158:[function(require,module,exports){
19248
+ },{}],160:[function(require,module,exports){
19077
19249
  "use strict";
19078
19250
 
19079
19251
  module.exports = {
@@ -19246,7 +19418,7 @@ module.exports = {
19246
19418
  ]
19247
19419
  };
19248
19420
 
19249
- },{}],159:[function(require,module,exports){
19421
+ },{}],161:[function(require,module,exports){
19250
19422
  "use strict";
19251
19423
 
19252
19424
  module.exports = {
@@ -19291,7 +19463,7 @@ module.exports = {
19291
19463
  ]
19292
19464
  };
19293
19465
 
19294
- },{}],160:[function(require,module,exports){
19466
+ },{}],162:[function(require,module,exports){
19295
19467
  "use strict";
19296
19468
 
19297
19469
  module.exports = {
@@ -19334,7 +19506,7 @@ module.exports = {
19334
19506
  ]
19335
19507
  };
19336
19508
 
19337
- },{}],161:[function(require,module,exports){
19509
+ },{}],163:[function(require,module,exports){
19338
19510
  "use strict";
19339
19511
 
19340
19512
  var schema1 = {
@@ -19418,7 +19590,7 @@ module.exports = {
19418
19590
  ]
19419
19591
  };
19420
19592
 
19421
- },{}],162:[function(require,module,exports){
19593
+ },{}],164:[function(require,module,exports){
19422
19594
  module.exports = {
19423
19595
  description: "Issue #139 - add schema id if present to erro message via addError method",
19424
19596
  tests: [
@@ -19477,7 +19649,7 @@ module.exports = {
19477
19649
  ]
19478
19650
  };
19479
19651
 
19480
- },{}],163:[function(require,module,exports){
19652
+ },{}],165:[function(require,module,exports){
19481
19653
  "use strict";
19482
19654
 
19483
19655
  module.exports = {
@@ -19495,7 +19667,7 @@ module.exports = {
19495
19667
  ]
19496
19668
  };
19497
19669
 
19498
- },{}],164:[function(require,module,exports){
19670
+ },{}],166:[function(require,module,exports){
19499
19671
  "use strict";
19500
19672
 
19501
19673
  module.exports = {
@@ -19525,7 +19697,7 @@ module.exports = {
19525
19697
  ]
19526
19698
  };
19527
19699
 
19528
- },{}],165:[function(require,module,exports){
19700
+ },{}],167:[function(require,module,exports){
19529
19701
  "use strict";
19530
19702
 
19531
19703
  module.exports = {
@@ -19553,7 +19725,7 @@ module.exports = {
19553
19725
  ]
19554
19726
  };
19555
19727
 
19556
- },{}],166:[function(require,module,exports){
19728
+ },{}],168:[function(require,module,exports){
19557
19729
  "use strict";
19558
19730
 
19559
19731
  module.exports = {
@@ -19580,7 +19752,7 @@ module.exports = {
19580
19752
  ]
19581
19753
  };
19582
19754
 
19583
- },{}],167:[function(require,module,exports){
19755
+ },{}],169:[function(require,module,exports){
19584
19756
  "use strict";
19585
19757
  var ref1 = "http://www.example.org/schema1/#";
19586
19758
  var ref2 = "http://www.example.org/schema2/#";
@@ -19620,7 +19792,7 @@ module.exports = {
19620
19792
  }
19621
19793
  ]
19622
19794
  };
19623
- },{}],168:[function(require,module,exports){
19795
+ },{}],170:[function(require,module,exports){
19624
19796
  "use strict";
19625
19797
 
19626
19798
  var testAsync = true;
@@ -19669,7 +19841,7 @@ module.exports = {
19669
19841
  ]
19670
19842
  };
19671
19843
 
19672
- },{}],169:[function(require,module,exports){
19844
+ },{}],171:[function(require,module,exports){
19673
19845
  "use strict";
19674
19846
 
19675
19847
  module.exports = {
@@ -19745,7 +19917,7 @@ module.exports = {
19745
19917
  ]
19746
19918
  };
19747
19919
 
19748
- },{}],170:[function(require,module,exports){
19920
+ },{}],172:[function(require,module,exports){
19749
19921
  "use strict";
19750
19922
 
19751
19923
  module.exports = {
@@ -19835,7 +20007,7 @@ module.exports = {
19835
20007
  ]
19836
20008
  };
19837
20009
 
19838
- },{}],171:[function(require,module,exports){
20010
+ },{}],173:[function(require,module,exports){
19839
20011
  "use strict";
19840
20012
 
19841
20013
  module.exports = {
@@ -19897,7 +20069,7 @@ module.exports = {
19897
20069
  ]
19898
20070
  };
19899
20071
 
19900
- },{}],172:[function(require,module,exports){
20072
+ },{}],174:[function(require,module,exports){
19901
20073
  "use strict";
19902
20074
 
19903
20075
  module.exports = {
@@ -19933,7 +20105,30 @@ module.exports = {
19933
20105
  ]
19934
20106
  };
19935
20107
 
19936
- },{}],173:[function(require,module,exports){
20108
+ },{}],175:[function(require,module,exports){
20109
+ "use strict";
20110
+
20111
+ module.exports = {
20112
+ description: "Issue #250 - Floating point precision is lost",
20113
+ tests: [
20114
+ {
20115
+ description: "should pass the multipleOf",
20116
+ schema: {
20117
+ "properties": {
20118
+ "number": {
20119
+ "multipleOf": 0.01
20120
+ }
20121
+ }
20122
+ },
20123
+ data: {
20124
+ "number": 20.29
20125
+ },
20126
+ valid: true
20127
+ }
20128
+ ]
20129
+ };
20130
+
20131
+ },{}],176:[function(require,module,exports){
19937
20132
  "use strict";
19938
20133
 
19939
20134
  module.exports = {
@@ -20023,7 +20218,7 @@ module.exports = {
20023
20218
  ]
20024
20219
  };
20025
20220
 
20026
- },{}],174:[function(require,module,exports){
20221
+ },{}],177:[function(require,module,exports){
20027
20222
  "use strict";
20028
20223
 
20029
20224
  module.exports = {
@@ -20048,7 +20243,7 @@ module.exports = {
20048
20243
  ]
20049
20244
  };
20050
20245
 
20051
- },{}],175:[function(require,module,exports){
20246
+ },{}],178:[function(require,module,exports){
20052
20247
  "use strict";
20053
20248
 
20054
20249
  module.exports = {
@@ -20124,7 +20319,7 @@ module.exports = {
20124
20319
  ]
20125
20320
  };
20126
20321
 
20127
- },{}],176:[function(require,module,exports){
20322
+ },{}],179:[function(require,module,exports){
20128
20323
  "use strict";
20129
20324
 
20130
20325
  module.exports = {
@@ -20237,7 +20432,7 @@ module.exports = {
20237
20432
  ]
20238
20433
  };
20239
20434
 
20240
- },{}],177:[function(require,module,exports){
20435
+ },{}],180:[function(require,module,exports){
20241
20436
  "use strict";
20242
20437
 
20243
20438
  module.exports = {
@@ -20417,7 +20612,7 @@ module.exports = {
20417
20612
  ]
20418
20613
  };
20419
20614
 
20420
- },{}],178:[function(require,module,exports){
20615
+ },{}],181:[function(require,module,exports){
20421
20616
  "use strict";
20422
20617
 
20423
20618
  module.exports = {
@@ -20464,7 +20659,7 @@ module.exports = {
20464
20659
  ]
20465
20660
  };
20466
20661
 
20467
- },{}],179:[function(require,module,exports){
20662
+ },{}],182:[function(require,module,exports){
20468
20663
  "use strict";
20469
20664
 
20470
20665
  var resourceObject = {
@@ -20760,7 +20955,7 @@ module.exports = {
20760
20955
  ]
20761
20956
  };
20762
20957
 
20763
- },{}],180:[function(require,module,exports){
20958
+ },{}],183:[function(require,module,exports){
20764
20959
  "use strict";
20765
20960
 
20766
20961
  var draft4 = require("./files/Issue47/draft4.json");
@@ -20789,7 +20984,7 @@ module.exports = {
20789
20984
  ]
20790
20985
  };
20791
20986
 
20792
- },{"./files/Issue47/draft4.json":204,"./files/Issue47/sample.json":205,"./files/Issue47/swagger_draft.json":206,"./files/Issue47/swagger_draft_modified.json":207}],181:[function(require,module,exports){
20987
+ },{"./files/Issue47/draft4.json":207,"./files/Issue47/sample.json":208,"./files/Issue47/swagger_draft.json":209,"./files/Issue47/swagger_draft_modified.json":210}],184:[function(require,module,exports){
20793
20988
  "use strict";
20794
20989
 
20795
20990
  module.exports = {
@@ -20822,7 +21017,7 @@ module.exports = {
20822
21017
  ]
20823
21018
  };
20824
21019
 
20825
- },{}],182:[function(require,module,exports){
21020
+ },{}],185:[function(require,module,exports){
20826
21021
  "use strict";
20827
21022
 
20828
21023
  module.exports = {
@@ -20840,7 +21035,7 @@ module.exports = {
20840
21035
  ]
20841
21036
  };
20842
21037
 
20843
- },{}],183:[function(require,module,exports){
21038
+ },{}],186:[function(require,module,exports){
20844
21039
  "use strict";
20845
21040
 
20846
21041
  module.exports = {
@@ -20862,7 +21057,7 @@ module.exports = {
20862
21057
  ]
20863
21058
  };
20864
21059
 
20865
- },{}],184:[function(require,module,exports){
21060
+ },{}],187:[function(require,module,exports){
20866
21061
  "use strict";
20867
21062
 
20868
21063
  module.exports = {
@@ -20933,7 +21128,7 @@ module.exports = {
20933
21128
  ]
20934
21129
  };
20935
21130
 
20936
- },{}],185:[function(require,module,exports){
21131
+ },{}],188:[function(require,module,exports){
20937
21132
  "use strict";
20938
21133
 
20939
21134
  var dataTypeBaseJson = {
@@ -21618,7 +21813,7 @@ module.exports = {
21618
21813
  ]
21619
21814
  };
21620
21815
 
21621
- },{}],186:[function(require,module,exports){
21816
+ },{}],189:[function(require,module,exports){
21622
21817
  "use strict";
21623
21818
 
21624
21819
  module.exports = {
@@ -21681,7 +21876,7 @@ module.exports = {
21681
21876
  ]
21682
21877
  };
21683
21878
 
21684
- },{}],187:[function(require,module,exports){
21879
+ },{}],190:[function(require,module,exports){
21685
21880
  /*jshint -W101*/
21686
21881
 
21687
21882
  "use strict";
@@ -22258,7 +22453,7 @@ module.exports = {
22258
22453
  ]
22259
22454
  };
22260
22455
 
22261
- },{}],188:[function(require,module,exports){
22456
+ },{}],191:[function(require,module,exports){
22262
22457
  "use strict";
22263
22458
 
22264
22459
  module.exports = {
@@ -22289,7 +22484,7 @@ module.exports = {
22289
22484
  ]
22290
22485
  };
22291
22486
 
22292
- },{}],189:[function(require,module,exports){
22487
+ },{}],192:[function(require,module,exports){
22293
22488
  "use strict";
22294
22489
 
22295
22490
  module.exports = {
@@ -22340,14 +22535,14 @@ module.exports = {
22340
22535
  ]
22341
22536
  };
22342
22537
 
22343
- },{}],190:[function(require,module,exports){
22538
+ },{}],193:[function(require,module,exports){
22344
22539
  "use strict";
22345
22540
 
22346
22541
  module.exports = {
22347
22542
  description: "Issue #71 - additionalProperties problem",
22348
22543
  tests: [
22349
22544
  {
22350
- description: "should have one error #1",
22545
+ description: "should have two errors #1",
22351
22546
 
22352
22547
  schema: {
22353
22548
  type: "object",
@@ -22366,12 +22561,12 @@ module.exports = {
22366
22561
  valid: false,
22367
22562
 
22368
22563
  after: function (errors) {
22369
- expect(errors.length).toBe(1);
22564
+ expect(errors.length).toBe(2);
22370
22565
  }
22371
22566
  },
22372
22567
 
22373
22568
  {
22374
- description: "should have one error #2",
22569
+ description: "should have two errors #2",
22375
22570
 
22376
22571
  schema: {
22377
22572
  type: "object",
@@ -22394,7 +22589,7 @@ module.exports = {
22394
22589
  valid: false,
22395
22590
 
22396
22591
  after: function (errors) {
22397
- expect(errors.length).toBe(1);
22592
+ expect(errors.length).toBe(2);
22398
22593
  }
22399
22594
  },
22400
22595
 
@@ -22460,7 +22655,7 @@ module.exports = {
22460
22655
  ]
22461
22656
  };
22462
22657
 
22463
- },{}],191:[function(require,module,exports){
22658
+ },{}],194:[function(require,module,exports){
22464
22659
  "use strict";
22465
22660
 
22466
22661
  module.exports = {
@@ -22518,7 +22713,7 @@ module.exports = {
22518
22713
  ]
22519
22714
  };
22520
22715
 
22521
- },{}],192:[function(require,module,exports){
22716
+ },{}],195:[function(require,module,exports){
22522
22717
  "use strict";
22523
22718
 
22524
22719
  module.exports = {
@@ -22591,7 +22786,7 @@ module.exports = {
22591
22786
  ]
22592
22787
  };
22593
22788
 
22594
- },{}],193:[function(require,module,exports){
22789
+ },{}],196:[function(require,module,exports){
22595
22790
  "use strict";
22596
22791
 
22597
22792
  var innerSchema = {
@@ -22636,7 +22831,7 @@ module.exports = {
22636
22831
  ]
22637
22832
  };
22638
22833
 
22639
- },{}],194:[function(require,module,exports){
22834
+ },{}],197:[function(require,module,exports){
22640
22835
  "use strict";
22641
22836
 
22642
22837
  var schema1 = {
@@ -22680,7 +22875,7 @@ module.exports = {
22680
22875
  ]
22681
22876
  };
22682
22877
 
22683
- },{}],195:[function(require,module,exports){
22878
+ },{}],198:[function(require,module,exports){
22684
22879
  "use strict";
22685
22880
 
22686
22881
  module.exports = {
@@ -22698,7 +22893,7 @@ module.exports = {
22698
22893
  ]
22699
22894
  };
22700
22895
 
22701
- },{}],196:[function(require,module,exports){
22896
+ },{}],199:[function(require,module,exports){
22702
22897
  "use strict";
22703
22898
 
22704
22899
  module.exports = {
@@ -22730,7 +22925,7 @@ module.exports = {
22730
22925
  ]
22731
22926
  };
22732
22927
 
22733
- },{}],197:[function(require,module,exports){
22928
+ },{}],200:[function(require,module,exports){
22734
22929
  "use strict";
22735
22930
 
22736
22931
  module.exports = {
@@ -22789,7 +22984,7 @@ module.exports = {
22789
22984
  ]
22790
22985
  };
22791
22986
 
22792
- },{}],198:[function(require,module,exports){
22987
+ },{}],201:[function(require,module,exports){
22793
22988
  "use strict";
22794
22989
 
22795
22990
  module.exports = {
@@ -22814,7 +23009,7 @@ module.exports = {
22814
23009
  ]
22815
23010
  };
22816
23011
 
22817
- },{}],199:[function(require,module,exports){
23012
+ },{}],202:[function(require,module,exports){
22818
23013
  "use strict";
22819
23014
 
22820
23015
  module.exports = {
@@ -22839,7 +23034,7 @@ module.exports = {
22839
23034
  ]
22840
23035
  };
22841
23036
 
22842
- },{}],200:[function(require,module,exports){
23037
+ },{}],203:[function(require,module,exports){
22843
23038
  "use strict";
22844
23039
 
22845
23040
  module.exports = {
@@ -22884,7 +23079,7 @@ module.exports = {
22884
23079
  ]
22885
23080
  };
22886
23081
 
22887
- },{}],201:[function(require,module,exports){
23082
+ },{}],204:[function(require,module,exports){
22888
23083
  "use strict";
22889
23084
 
22890
23085
  module.exports = {
@@ -22909,7 +23104,7 @@ module.exports = {
22909
23104
  ]
22910
23105
  };
22911
23106
 
22912
- },{}],202:[function(require,module,exports){
23107
+ },{}],205:[function(require,module,exports){
22913
23108
  "use strict";
22914
23109
 
22915
23110
  module.exports = {
@@ -22948,7 +23143,7 @@ module.exports = {
22948
23143
  ]
22949
23144
  };
22950
23145
 
22951
- },{}],203:[function(require,module,exports){
23146
+ },{}],206:[function(require,module,exports){
22952
23147
  "use strict";
22953
23148
 
22954
23149
  module.exports = {
@@ -22978,7 +23173,7 @@ module.exports = {
22978
23173
  ]
22979
23174
  };
22980
23175
 
22981
- },{}],204:[function(require,module,exports){
23176
+ },{}],207:[function(require,module,exports){
22982
23177
  module.exports={
22983
23178
  "id": "http://json-schema.org/draft-04/schema#",
22984
23179
  "$schema": "http://json-schema.org/draft-04/schema#",
@@ -23130,7 +23325,7 @@ module.exports={
23130
23325
  "default": {}
23131
23326
  }
23132
23327
 
23133
- },{}],205:[function(require,module,exports){
23328
+ },{}],208:[function(require,module,exports){
23134
23329
  module.exports={
23135
23330
  "swagger": 2,
23136
23331
  "info": {
@@ -23221,7 +23416,7 @@ module.exports={
23221
23416
  }
23222
23417
  }
23223
23418
 
23224
- },{}],206:[function(require,module,exports){
23419
+ },{}],209:[function(require,module,exports){
23225
23420
  module.exports={
23226
23421
  "title": "A JSON Schema for Swagger 2.0 API.",
23227
23422
  "$schema": "http://json-schema.org/draft-04/schema#",
@@ -23619,7 +23814,7 @@ module.exports={
23619
23814
  }
23620
23815
  }
23621
23816
 
23622
- },{}],207:[function(require,module,exports){
23817
+ },{}],210:[function(require,module,exports){
23623
23818
  module.exports={
23624
23819
  "title": "A JSON Schema for Swagger 2.0 API.",
23625
23820
  "$schema": "http://json-schema.org/draft-04/schema#",
@@ -24017,7 +24212,7 @@ module.exports={
24017
24212
  }
24018
24213
  }
24019
24214
 
24020
- },{}],208:[function(require,module,exports){
24215
+ },{}],211:[function(require,module,exports){
24021
24216
  'use strict';
24022
24217
 
24023
24218
  module.exports = {
@@ -24042,15 +24237,15 @@ module.exports = {
24042
24237
  ]
24043
24238
  };
24044
24239
 
24045
- },{}],209:[function(require,module,exports){
24046
- arguments[4][204][0].apply(exports,arguments)
24047
- },{"dup":204}],210:[function(require,module,exports){
24240
+ },{}],212:[function(require,module,exports){
24241
+ arguments[4][207][0].apply(exports,arguments)
24242
+ },{"dup":207}],213:[function(require,module,exports){
24048
24243
  module.exports={
24049
24244
  "type": "integer"
24050
24245
  }
24051
- },{}],211:[function(require,module,exports){
24052
- arguments[4][210][0].apply(exports,arguments)
24053
- },{"dup":210}],212:[function(require,module,exports){
24246
+ },{}],214:[function(require,module,exports){
24247
+ arguments[4][213][0].apply(exports,arguments)
24248
+ },{"dup":213}],215:[function(require,module,exports){
24054
24249
  module.exports={
24055
24250
  "integer": {
24056
24251
  "type": "integer"
@@ -24059,7 +24254,7 @@ module.exports={
24059
24254
  "$ref": "#/integer"
24060
24255
  }
24061
24256
  }
24062
- },{}],213:[function(require,module,exports){
24257
+ },{}],216:[function(require,module,exports){
24063
24258
  module.exports=[
24064
24259
  {
24065
24260
  "description": "additionalItems as schema",
@@ -24143,7 +24338,7 @@ module.exports=[
24143
24338
  }
24144
24339
  ]
24145
24340
 
24146
- },{}],214:[function(require,module,exports){
24341
+ },{}],217:[function(require,module,exports){
24147
24342
  module.exports=[
24148
24343
  {
24149
24344
  "description":
@@ -24233,7 +24428,7 @@ module.exports=[
24233
24428
  }
24234
24429
  ]
24235
24430
 
24236
- },{}],215:[function(require,module,exports){
24431
+ },{}],218:[function(require,module,exports){
24237
24432
  module.exports=[
24238
24433
  {
24239
24434
  "description": "allOf",
@@ -24347,7 +24542,7 @@ module.exports=[
24347
24542
  }
24348
24543
  ]
24349
24544
 
24350
- },{}],216:[function(require,module,exports){
24545
+ },{}],219:[function(require,module,exports){
24351
24546
  module.exports=[
24352
24547
  {
24353
24548
  "description": "anyOf",
@@ -24417,7 +24612,7 @@ module.exports=[
24417
24612
  }
24418
24613
  ]
24419
24614
 
24420
- },{}],217:[function(require,module,exports){
24615
+ },{}],220:[function(require,module,exports){
24421
24616
  module.exports=[
24422
24617
  {
24423
24618
  "description": "invalid type for default",
@@ -24468,7 +24663,7 @@ module.exports=[
24468
24663
  }
24469
24664
  ]
24470
24665
 
24471
- },{}],218:[function(require,module,exports){
24666
+ },{}],221:[function(require,module,exports){
24472
24667
  module.exports=[
24473
24668
  {
24474
24669
  "description": "valid definition",
@@ -24502,7 +24697,7 @@ module.exports=[
24502
24697
  }
24503
24698
  ]
24504
24699
 
24505
- },{}],219:[function(require,module,exports){
24700
+ },{}],222:[function(require,module,exports){
24506
24701
  module.exports=[
24507
24702
  {
24508
24703
  "description": "dependencies",
@@ -24617,7 +24812,7 @@ module.exports=[
24617
24812
  }
24618
24813
  ]
24619
24814
 
24620
- },{}],220:[function(require,module,exports){
24815
+ },{}],223:[function(require,module,exports){
24621
24816
  module.exports=[
24622
24817
  {
24623
24818
  "description": "simple enum validation",
@@ -24691,7 +24886,7 @@ module.exports=[
24691
24886
  }
24692
24887
  ]
24693
24888
 
24694
- },{}],221:[function(require,module,exports){
24889
+ },{}],224:[function(require,module,exports){
24695
24890
  module.exports=[
24696
24891
  {
24697
24892
  "description": "a schema given for items",
@@ -24739,7 +24934,7 @@ module.exports=[
24739
24934
  }
24740
24935
  ]
24741
24936
 
24742
- },{}],222:[function(require,module,exports){
24937
+ },{}],225:[function(require,module,exports){
24743
24938
  module.exports=[
24744
24939
  {
24745
24940
  "description": "maxItems validation",
@@ -24769,7 +24964,7 @@ module.exports=[
24769
24964
  }
24770
24965
  ]
24771
24966
 
24772
- },{}],223:[function(require,module,exports){
24967
+ },{}],226:[function(require,module,exports){
24773
24968
  module.exports=[
24774
24969
  {
24775
24970
  "description": "maxLength validation",
@@ -24804,7 +24999,7 @@ module.exports=[
24804
24999
  }
24805
25000
  ]
24806
25001
 
24807
- },{}],224:[function(require,module,exports){
25002
+ },{}],227:[function(require,module,exports){
24808
25003
  module.exports=[
24809
25004
  {
24810
25005
  "description": "maxProperties validation",
@@ -24834,7 +25029,7 @@ module.exports=[
24834
25029
  }
24835
25030
  ]
24836
25031
 
24837
- },{}],225:[function(require,module,exports){
25032
+ },{}],228:[function(require,module,exports){
24838
25033
  module.exports=[
24839
25034
  {
24840
25035
  "description": "maximum validation",
@@ -24878,7 +25073,7 @@ module.exports=[
24878
25073
  }
24879
25074
  ]
24880
25075
 
24881
- },{}],226:[function(require,module,exports){
25076
+ },{}],229:[function(require,module,exports){
24882
25077
  module.exports=[
24883
25078
  {
24884
25079
  "description": "minItems validation",
@@ -24908,7 +25103,7 @@ module.exports=[
24908
25103
  }
24909
25104
  ]
24910
25105
 
24911
- },{}],227:[function(require,module,exports){
25106
+ },{}],230:[function(require,module,exports){
24912
25107
  module.exports=[
24913
25108
  {
24914
25109
  "description": "minLength validation",
@@ -24943,7 +25138,7 @@ module.exports=[
24943
25138
  }
24944
25139
  ]
24945
25140
 
24946
- },{}],228:[function(require,module,exports){
25141
+ },{}],231:[function(require,module,exports){
24947
25142
  module.exports=[
24948
25143
  {
24949
25144
  "description": "minProperties validation",
@@ -24973,7 +25168,7 @@ module.exports=[
24973
25168
  }
24974
25169
  ]
24975
25170
 
24976
- },{}],229:[function(require,module,exports){
25171
+ },{}],232:[function(require,module,exports){
24977
25172
  module.exports=[
24978
25173
  {
24979
25174
  "description": "minimum validation",
@@ -25017,7 +25212,7 @@ module.exports=[
25017
25212
  }
25018
25213
  ]
25019
25214
 
25020
- },{}],230:[function(require,module,exports){
25215
+ },{}],233:[function(require,module,exports){
25021
25216
  module.exports=[
25022
25217
  {
25023
25218
  "description": "by int",
@@ -25079,7 +25274,7 @@ module.exports=[
25079
25274
  }
25080
25275
  ]
25081
25276
 
25082
- },{}],231:[function(require,module,exports){
25277
+ },{}],234:[function(require,module,exports){
25083
25278
  module.exports=[
25084
25279
  {
25085
25280
  "description": "not",
@@ -25177,7 +25372,7 @@ module.exports=[
25177
25372
 
25178
25373
  ]
25179
25374
 
25180
- },{}],232:[function(require,module,exports){
25375
+ },{}],235:[function(require,module,exports){
25181
25376
  module.exports=[
25182
25377
  {
25183
25378
  "description": "oneOf",
@@ -25247,7 +25442,7 @@ module.exports=[
25247
25442
  }
25248
25443
  ]
25249
25444
 
25250
- },{}],233:[function(require,module,exports){
25445
+ },{}],236:[function(require,module,exports){
25251
25446
  module.exports=[
25252
25447
  {
25253
25448
  "description": "integer",
@@ -25356,7 +25551,7 @@ module.exports=[
25356
25551
  }
25357
25552
  ]
25358
25553
 
25359
- },{}],234:[function(require,module,exports){
25554
+ },{}],237:[function(require,module,exports){
25360
25555
  module.exports=[
25361
25556
  {
25362
25557
  "description": "validation of date-time strings",
@@ -25501,7 +25696,7 @@ module.exports=[
25501
25696
  }
25502
25697
  ]
25503
25698
 
25504
- },{}],235:[function(require,module,exports){
25699
+ },{}],238:[function(require,module,exports){
25505
25700
  module.exports=[
25506
25701
  {
25507
25702
  "description": "pattern validation",
@@ -25526,7 +25721,7 @@ module.exports=[
25526
25721
  }
25527
25722
  ]
25528
25723
 
25529
- },{}],236:[function(require,module,exports){
25724
+ },{}],239:[function(require,module,exports){
25530
25725
  module.exports=[
25531
25726
  {
25532
25727
  "description":
@@ -25638,7 +25833,7 @@ module.exports=[
25638
25833
  }
25639
25834
  ]
25640
25835
 
25641
- },{}],237:[function(require,module,exports){
25836
+ },{}],240:[function(require,module,exports){
25642
25837
  module.exports=[
25643
25838
  {
25644
25839
  "description": "object properties validation",
@@ -25732,7 +25927,7 @@ module.exports=[
25732
25927
  }
25733
25928
  ]
25734
25929
 
25735
- },{}],238:[function(require,module,exports){
25930
+ },{}],241:[function(require,module,exports){
25736
25931
  module.exports=[
25737
25932
  {
25738
25933
  "description": "root pointer ref",
@@ -25878,7 +26073,7 @@ module.exports=[
25878
26073
  }
25879
26074
  ]
25880
26075
 
25881
- },{}],239:[function(require,module,exports){
26076
+ },{}],242:[function(require,module,exports){
25882
26077
  module.exports=[
25883
26078
  {
25884
26079
  "description": "remote ref",
@@ -25954,7 +26149,7 @@ module.exports=[
25954
26149
  }
25955
26150
  ]
25956
26151
 
25957
- },{}],240:[function(require,module,exports){
26152
+ },{}],243:[function(require,module,exports){
25958
26153
  module.exports=[
25959
26154
  {
25960
26155
  "description": "required validation",
@@ -25995,7 +26190,7 @@ module.exports=[
25995
26190
  }
25996
26191
  ]
25997
26192
 
25998
- },{}],241:[function(require,module,exports){
26193
+ },{}],244:[function(require,module,exports){
25999
26194
  module.exports=[
26000
26195
  {
26001
26196
  "description": "integer type matches integers",
@@ -26327,7 +26522,7 @@ module.exports=[
26327
26522
  }
26328
26523
  ]
26329
26524
 
26330
- },{}],242:[function(require,module,exports){
26525
+ },{}],245:[function(require,module,exports){
26331
26526
  module.exports=[
26332
26527
  {
26333
26528
  "description": "uniqueItems validation",
@@ -26408,7 +26603,7 @@ module.exports=[
26408
26603
  }
26409
26604
  ]
26410
26605
 
26411
- },{}],243:[function(require,module,exports){
26606
+ },{}],246:[function(require,module,exports){
26412
26607
  "use strict";
26413
26608
 
26414
26609
  var isBrowser = typeof window !== "undefined";
@@ -26472,7 +26667,7 @@ describe("Automatic schema loading", function () {
26472
26667
 
26473
26668
  validateWithAutomaticDownloads(validator, data, schema, function (err, valid) {
26474
26669
  expect(valid).toBe(true);
26475
- expect(err).toBe(undefined);
26670
+ expect(err).toBe(null);
26476
26671
  done();
26477
26672
  });
26478
26673
 
@@ -26501,7 +26696,7 @@ describe("Automatic schema loading", function () {
26501
26696
 
26502
26697
  });
26503
26698
 
26504
- },{"../../src/ZSchema":129,"https":7}],244:[function(require,module,exports){
26699
+ },{"../../src/ZSchema":132,"https":7}],247:[function(require,module,exports){
26505
26700
  "use strict";
26506
26701
 
26507
26702
  var ZSchema = require("../../src/ZSchema");
@@ -26573,7 +26768,7 @@ describe("Basic", function () {
26573
26768
 
26574
26769
  });
26575
26770
 
26576
- },{"../../src/ZSchema":129,"../files/draft-04-schema.json":209,"../jsonSchemaTestSuite/remotes/folder/folderInteger.json":210,"../jsonSchemaTestSuite/remotes/integer.json":211,"../jsonSchemaTestSuite/remotes/subSchemas.json":212}],245:[function(require,module,exports){
26771
+ },{"../../src/ZSchema":132,"../files/draft-04-schema.json":212,"../jsonSchemaTestSuite/remotes/folder/folderInteger.json":213,"../jsonSchemaTestSuite/remotes/integer.json":214,"../jsonSchemaTestSuite/remotes/subSchemas.json":215}],248:[function(require,module,exports){
26577
26772
  "use strict";
26578
26773
 
26579
26774
  var ZSchema = require("../../src/ZSchema");
@@ -26669,7 +26864,7 @@ describe("JsonSchemaTestSuite", function () {
26669
26864
 
26670
26865
  });
26671
26866
 
26672
- },{"../../src/ZSchema":129,"../files/draft-04-schema.json":209,"../jsonSchemaTestSuite/remotes/folder/folderInteger.json":210,"../jsonSchemaTestSuite/remotes/integer.json":211,"../jsonSchemaTestSuite/remotes/subSchemas.json":212,"../jsonSchemaTestSuite/tests/draft4/additionalItems.json":213,"../jsonSchemaTestSuite/tests/draft4/additionalProperties.json":214,"../jsonSchemaTestSuite/tests/draft4/allOf.json":215,"../jsonSchemaTestSuite/tests/draft4/anyOf.json":216,"../jsonSchemaTestSuite/tests/draft4/default.json":217,"../jsonSchemaTestSuite/tests/draft4/definitions.json":218,"../jsonSchemaTestSuite/tests/draft4/dependencies.json":219,"../jsonSchemaTestSuite/tests/draft4/enum.json":220,"../jsonSchemaTestSuite/tests/draft4/items.json":221,"../jsonSchemaTestSuite/tests/draft4/maxItems.json":222,"../jsonSchemaTestSuite/tests/draft4/maxLength.json":223,"../jsonSchemaTestSuite/tests/draft4/maxProperties.json":224,"../jsonSchemaTestSuite/tests/draft4/maximum.json":225,"../jsonSchemaTestSuite/tests/draft4/minItems.json":226,"../jsonSchemaTestSuite/tests/draft4/minLength.json":227,"../jsonSchemaTestSuite/tests/draft4/minProperties.json":228,"../jsonSchemaTestSuite/tests/draft4/minimum.json":229,"../jsonSchemaTestSuite/tests/draft4/multipleOf.json":230,"../jsonSchemaTestSuite/tests/draft4/not.json":231,"../jsonSchemaTestSuite/tests/draft4/oneOf.json":232,"../jsonSchemaTestSuite/tests/draft4/optional/bignum.json":233,"../jsonSchemaTestSuite/tests/draft4/optional/format.json":234,"../jsonSchemaTestSuite/tests/draft4/pattern.json":235,"../jsonSchemaTestSuite/tests/draft4/patternProperties.json":236,"../jsonSchemaTestSuite/tests/draft4/properties.json":237,"../jsonSchemaTestSuite/tests/draft4/ref.json":238,"../jsonSchemaTestSuite/tests/draft4/refRemote.json":239,"../jsonSchemaTestSuite/tests/draft4/required.json":240,"../jsonSchemaTestSuite/tests/draft4/type.json":241,"../jsonSchemaTestSuite/tests/draft4/uniqueItems.json":242}],246:[function(require,module,exports){
26867
+ },{"../../src/ZSchema":132,"../files/draft-04-schema.json":212,"../jsonSchemaTestSuite/remotes/folder/folderInteger.json":213,"../jsonSchemaTestSuite/remotes/integer.json":214,"../jsonSchemaTestSuite/remotes/subSchemas.json":215,"../jsonSchemaTestSuite/tests/draft4/additionalItems.json":216,"../jsonSchemaTestSuite/tests/draft4/additionalProperties.json":217,"../jsonSchemaTestSuite/tests/draft4/allOf.json":218,"../jsonSchemaTestSuite/tests/draft4/anyOf.json":219,"../jsonSchemaTestSuite/tests/draft4/default.json":220,"../jsonSchemaTestSuite/tests/draft4/definitions.json":221,"../jsonSchemaTestSuite/tests/draft4/dependencies.json":222,"../jsonSchemaTestSuite/tests/draft4/enum.json":223,"../jsonSchemaTestSuite/tests/draft4/items.json":224,"../jsonSchemaTestSuite/tests/draft4/maxItems.json":225,"../jsonSchemaTestSuite/tests/draft4/maxLength.json":226,"../jsonSchemaTestSuite/tests/draft4/maxProperties.json":227,"../jsonSchemaTestSuite/tests/draft4/maximum.json":228,"../jsonSchemaTestSuite/tests/draft4/minItems.json":229,"../jsonSchemaTestSuite/tests/draft4/minLength.json":230,"../jsonSchemaTestSuite/tests/draft4/minProperties.json":231,"../jsonSchemaTestSuite/tests/draft4/minimum.json":232,"../jsonSchemaTestSuite/tests/draft4/multipleOf.json":233,"../jsonSchemaTestSuite/tests/draft4/not.json":234,"../jsonSchemaTestSuite/tests/draft4/oneOf.json":235,"../jsonSchemaTestSuite/tests/draft4/optional/bignum.json":236,"../jsonSchemaTestSuite/tests/draft4/optional/format.json":237,"../jsonSchemaTestSuite/tests/draft4/pattern.json":238,"../jsonSchemaTestSuite/tests/draft4/patternProperties.json":239,"../jsonSchemaTestSuite/tests/draft4/properties.json":240,"../jsonSchemaTestSuite/tests/draft4/ref.json":241,"../jsonSchemaTestSuite/tests/draft4/refRemote.json":242,"../jsonSchemaTestSuite/tests/draft4/required.json":243,"../jsonSchemaTestSuite/tests/draft4/type.json":244,"../jsonSchemaTestSuite/tests/draft4/uniqueItems.json":245}],249:[function(require,module,exports){
26673
26868
  "use strict";
26674
26869
 
26675
26870
  var ZSchema = require("../../src/ZSchema");
@@ -26703,7 +26898,7 @@ describe("Using multiple instances of Z-Schema", function () {
26703
26898
 
26704
26899
  });
26705
26900
 
26706
- },{"../../src/ZSchema":129}],247:[function(require,module,exports){
26901
+ },{"../../src/ZSchema":132}],250:[function(require,module,exports){
26707
26902
  /*jshint -W030 */
26708
26903
 
26709
26904
  "use strict";
@@ -26772,7 +26967,6 @@ var testSuiteFiles = [
26772
26967
  require("../ZSchemaTestSuite/Issue106.js"),
26773
26968
  require("../ZSchemaTestSuite/Issue107.js"),
26774
26969
  require("../ZSchemaTestSuite/Issue121.js"),
26775
- require("../ZSchemaTestSuite/Issue125.js"),
26776
26970
  require("../ZSchemaTestSuite/Issue126.js"),
26777
26971
  require("../ZSchemaTestSuite/Issue130.js"),
26778
26972
  require("../ZSchemaTestSuite/Issue131.js"),
@@ -26785,6 +26979,7 @@ var testSuiteFiles = [
26785
26979
  require("../ZSchemaTestSuite/Issue209.js"),
26786
26980
  require("../ZSchemaTestSuite/Issue222.js"),
26787
26981
  require("../ZSchemaTestSuite/Issue229.js"),
26982
+ require("../ZSchemaTestSuite/Issue250.js"),
26788
26983
 
26789
26984
  undefined
26790
26985
  ];
@@ -26798,10 +26993,6 @@ describe("ZSchemaTestSuite", function () {
26798
26993
  }
26799
26994
  }
26800
26995
 
26801
- it("should contain 73 files", function () {
26802
- expect(testSuiteFiles.length).toBe(73);
26803
- });
26804
-
26805
26996
  testSuiteFiles.forEach(function (testSuite) {
26806
26997
 
26807
26998
  testSuite.tests.forEach(function (test) {
@@ -26868,7 +27059,7 @@ describe("ZSchemaTestSuite", function () {
26868
27059
  }
26869
27060
 
26870
27061
  if (test.valid === true) {
26871
- expect(err).toBe(undefined, "errors are not undefined when test is valid");
27062
+ expect(err).toBe(null, "errors are not undefined when test is valid");
26872
27063
  }
26873
27064
 
26874
27065
  if (after) {
@@ -26891,7 +27082,7 @@ describe("ZSchemaTestSuite", function () {
26891
27082
  expect(typeof valid).toBe("boolean", "returned response is not a boolean");
26892
27083
  expect(valid).toBe(test.valid, "test result doesn't match expected test result");
26893
27084
  if (test.valid === true) {
26894
- expect(err).toBe(undefined, "errors are not undefined when test is valid");
27085
+ expect(err).toBe(null, "errors are not undefined when test is valid");
26895
27086
  }
26896
27087
  if (after) {
26897
27088
  after(err, valid, data);
@@ -26912,7 +27103,7 @@ describe("ZSchemaTestSuite", function () {
26912
27103
 
26913
27104
  });
26914
27105
 
26915
- },{"../../src/ZSchema":129,"../ZSchemaTestSuite/AssumeAdditional.js":132,"../ZSchemaTestSuite/CustomFormats.js":133,"../ZSchemaTestSuite/CustomFormatsAsync.js":134,"../ZSchemaTestSuite/CustomValidator.js":135,"../ZSchemaTestSuite/ErrorPathAsArray.js":136,"../ZSchemaTestSuite/ErrorPathAsJSONPointer.js":137,"../ZSchemaTestSuite/ErrorPathContainsIntegerIndex.js":138,"../ZSchemaTestSuite/ForceAdditional.js":139,"../ZSchemaTestSuite/ForceItems.js":140,"../ZSchemaTestSuite/ForceMaxItems.js":141,"../ZSchemaTestSuite/ForceMaxLength.js":142,"../ZSchemaTestSuite/ForceMinItems.js":143,"../ZSchemaTestSuite/ForceMinLength.js":144,"../ZSchemaTestSuite/ForceProperties.js":145,"../ZSchemaTestSuite/IgnoreUnresolvableReferences.js":146,"../ZSchemaTestSuite/IncludeErrors.js":147,"../ZSchemaTestSuite/InvalidId.js":148,"../ZSchemaTestSuite/Issue101.js":149,"../ZSchemaTestSuite/Issue102.js":150,"../ZSchemaTestSuite/Issue103.js":151,"../ZSchemaTestSuite/Issue106.js":152,"../ZSchemaTestSuite/Issue107.js":153,"../ZSchemaTestSuite/Issue12.js":154,"../ZSchemaTestSuite/Issue121.js":155,"../ZSchemaTestSuite/Issue125.js":156,"../ZSchemaTestSuite/Issue126.js":157,"../ZSchemaTestSuite/Issue13.js":158,"../ZSchemaTestSuite/Issue130.js":159,"../ZSchemaTestSuite/Issue131.js":160,"../ZSchemaTestSuite/Issue137.js":161,"../ZSchemaTestSuite/Issue139.js":162,"../ZSchemaTestSuite/Issue142.js":163,"../ZSchemaTestSuite/Issue146.js":164,"../ZSchemaTestSuite/Issue151.js":165,"../ZSchemaTestSuite/Issue16.js":166,"../ZSchemaTestSuite/Issue199.js":167,"../ZSchemaTestSuite/Issue209.js":168,"../ZSchemaTestSuite/Issue22.js":169,"../ZSchemaTestSuite/Issue222.js":170,"../ZSchemaTestSuite/Issue229.js":171,"../ZSchemaTestSuite/Issue25.js":172,"../ZSchemaTestSuite/Issue26.js":173,"../ZSchemaTestSuite/Issue37.js":174,"../ZSchemaTestSuite/Issue40.js":175,"../ZSchemaTestSuite/Issue41.js":176,"../ZSchemaTestSuite/Issue43.js":177,"../ZSchemaTestSuite/Issue44.js":178,"../ZSchemaTestSuite/Issue45.js":179,"../ZSchemaTestSuite/Issue47.js":180,"../ZSchemaTestSuite/Issue48.js":181,"../ZSchemaTestSuite/Issue49.js":182,"../ZSchemaTestSuite/Issue53.js":183,"../ZSchemaTestSuite/Issue56.js":184,"../ZSchemaTestSuite/Issue57.js":185,"../ZSchemaTestSuite/Issue58.js":186,"../ZSchemaTestSuite/Issue63.js":187,"../ZSchemaTestSuite/Issue64.js":188,"../ZSchemaTestSuite/Issue67.js":189,"../ZSchemaTestSuite/Issue71.js":190,"../ZSchemaTestSuite/Issue73.js":191,"../ZSchemaTestSuite/Issue76.js":192,"../ZSchemaTestSuite/Issue85.js":193,"../ZSchemaTestSuite/Issue94.js":194,"../ZSchemaTestSuite/Issue96.js":195,"../ZSchemaTestSuite/Issue98.js":196,"../ZSchemaTestSuite/MultipleSchemas.js":197,"../ZSchemaTestSuite/NoEmptyArrays.js":198,"../ZSchemaTestSuite/NoEmptyStrings.js":199,"../ZSchemaTestSuite/NoExtraKeywords.js":200,"../ZSchemaTestSuite/NoTypeless.js":201,"../ZSchemaTestSuite/PedanticCheck.js":202,"../ZSchemaTestSuite/StrictUris.js":203,"../ZSchemaTestSuite/getRegisteredFormats.js":208}],248:[function(require,module,exports){
27106
+ },{"../../src/ZSchema":132,"../ZSchemaTestSuite/AssumeAdditional.js":135,"../ZSchemaTestSuite/CustomFormats.js":136,"../ZSchemaTestSuite/CustomFormatsAsync.js":137,"../ZSchemaTestSuite/CustomValidator.js":138,"../ZSchemaTestSuite/ErrorPathAsArray.js":139,"../ZSchemaTestSuite/ErrorPathAsJSONPointer.js":140,"../ZSchemaTestSuite/ErrorPathContainsIntegerIndex.js":141,"../ZSchemaTestSuite/ForceAdditional.js":142,"../ZSchemaTestSuite/ForceItems.js":143,"../ZSchemaTestSuite/ForceMaxItems.js":144,"../ZSchemaTestSuite/ForceMaxLength.js":145,"../ZSchemaTestSuite/ForceMinItems.js":146,"../ZSchemaTestSuite/ForceMinLength.js":147,"../ZSchemaTestSuite/ForceProperties.js":148,"../ZSchemaTestSuite/IgnoreUnresolvableReferences.js":149,"../ZSchemaTestSuite/IncludeErrors.js":150,"../ZSchemaTestSuite/InvalidId.js":151,"../ZSchemaTestSuite/Issue101.js":152,"../ZSchemaTestSuite/Issue102.js":153,"../ZSchemaTestSuite/Issue103.js":154,"../ZSchemaTestSuite/Issue106.js":155,"../ZSchemaTestSuite/Issue107.js":156,"../ZSchemaTestSuite/Issue12.js":157,"../ZSchemaTestSuite/Issue121.js":158,"../ZSchemaTestSuite/Issue126.js":159,"../ZSchemaTestSuite/Issue13.js":160,"../ZSchemaTestSuite/Issue130.js":161,"../ZSchemaTestSuite/Issue131.js":162,"../ZSchemaTestSuite/Issue137.js":163,"../ZSchemaTestSuite/Issue139.js":164,"../ZSchemaTestSuite/Issue142.js":165,"../ZSchemaTestSuite/Issue146.js":166,"../ZSchemaTestSuite/Issue151.js":167,"../ZSchemaTestSuite/Issue16.js":168,"../ZSchemaTestSuite/Issue199.js":169,"../ZSchemaTestSuite/Issue209.js":170,"../ZSchemaTestSuite/Issue22.js":171,"../ZSchemaTestSuite/Issue222.js":172,"../ZSchemaTestSuite/Issue229.js":173,"../ZSchemaTestSuite/Issue25.js":174,"../ZSchemaTestSuite/Issue250.js":175,"../ZSchemaTestSuite/Issue26.js":176,"../ZSchemaTestSuite/Issue37.js":177,"../ZSchemaTestSuite/Issue40.js":178,"../ZSchemaTestSuite/Issue41.js":179,"../ZSchemaTestSuite/Issue43.js":180,"../ZSchemaTestSuite/Issue44.js":181,"../ZSchemaTestSuite/Issue45.js":182,"../ZSchemaTestSuite/Issue47.js":183,"../ZSchemaTestSuite/Issue48.js":184,"../ZSchemaTestSuite/Issue49.js":185,"../ZSchemaTestSuite/Issue53.js":186,"../ZSchemaTestSuite/Issue56.js":187,"../ZSchemaTestSuite/Issue57.js":188,"../ZSchemaTestSuite/Issue58.js":189,"../ZSchemaTestSuite/Issue63.js":190,"../ZSchemaTestSuite/Issue64.js":191,"../ZSchemaTestSuite/Issue67.js":192,"../ZSchemaTestSuite/Issue71.js":193,"../ZSchemaTestSuite/Issue73.js":194,"../ZSchemaTestSuite/Issue76.js":195,"../ZSchemaTestSuite/Issue85.js":196,"../ZSchemaTestSuite/Issue94.js":197,"../ZSchemaTestSuite/Issue96.js":198,"../ZSchemaTestSuite/Issue98.js":199,"../ZSchemaTestSuite/MultipleSchemas.js":200,"../ZSchemaTestSuite/NoEmptyArrays.js":201,"../ZSchemaTestSuite/NoEmptyStrings.js":202,"../ZSchemaTestSuite/NoExtraKeywords.js":203,"../ZSchemaTestSuite/NoTypeless.js":204,"../ZSchemaTestSuite/PedanticCheck.js":205,"../ZSchemaTestSuite/StrictUris.js":206,"../ZSchemaTestSuite/getRegisteredFormats.js":211}],251:[function(require,module,exports){
26916
27107
  "use strict";
26917
27108
 
26918
27109
  var ZSchema = require("../../src/ZSchema");
@@ -27011,4 +27202,4 @@ describe("Using path to schema as a third argument", function () {
27011
27202
 
27012
27203
  });
27013
27204
 
27014
- },{"../../src/ZSchema":129}]},{},[243,244,245,246,248,247]);
27205
+ },{"../../src/ZSchema":132}]},{},[246,247,248,249,251,250]);