UNPKG

postal-codes-js

Version:
2,428 lines (2,152 loc) 278 kB
/******/ (function(modules) { // webpackBootstrap /******/ // The module cache /******/ var installedModules = {}; /******/ /******/ // The require function /******/ function __webpack_require__(moduleId) { /******/ /******/ // Check if module is in cache /******/ if(installedModules[moduleId]) /******/ return installedModules[moduleId].exports; /******/ /******/ // Create a new module (and put it into the cache) /******/ var module = installedModules[moduleId] = { /******/ i: moduleId, /******/ l: false, /******/ exports: {} /******/ }; /******/ /******/ // Execute the module function /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__); /******/ /******/ // Flag the module as loaded /******/ module.l = true; /******/ /******/ // Return the exports of the module /******/ return module.exports; /******/ } /******/ /******/ /******/ // expose the modules object (__webpack_modules__) /******/ __webpack_require__.m = modules; /******/ /******/ // expose the module cache /******/ __webpack_require__.c = installedModules; /******/ /******/ // identity function for calling harmony imports with the correct context /******/ __webpack_require__.i = function(value) { return value; }; /******/ /******/ // define getter function for harmony exports /******/ __webpack_require__.d = function(exports, name, getter) { /******/ if(!__webpack_require__.o(exports, name)) { /******/ Object.defineProperty(exports, name, { /******/ configurable: false, /******/ enumerable: true, /******/ get: getter /******/ }); /******/ } /******/ }; /******/ /******/ // getDefaultExport function for compatibility with non-harmony modules /******/ __webpack_require__.n = function(module) { /******/ var getter = module && module.__esModule ? /******/ function getDefault() { return module['default']; } : /******/ function getModuleExports() { return module; }; /******/ __webpack_require__.d(getter, 'a', getter); /******/ return getter; /******/ }; /******/ /******/ // Object.prototype.hasOwnProperty.call /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); }; /******/ /******/ // __webpack_public_path__ /******/ __webpack_require__.p = ""; /******/ /******/ // Load entry module and return exports /******/ return __webpack_require__(__webpack_require__.s = 89); /******/ }) /************************************************************************/ /******/ ([ /* 0 */ /***/ (function(module, exports, __webpack_require__) { /* * should.js - assertion library * Copyright(c) 2010-2013 TJ Holowaychuk <tj@vision-media.ca> * Copyright(c) 2013-2016 Denis Bardadym <bardadymchik@gmail.com> * MIT Licensed */ var type = __webpack_require__(2); var config = __webpack_require__(63); /** * Check if given obj just a primitive type wrapper * @param {Object} obj * @returns {boolean} * @private */ exports.isWrapperType = function(obj) { return obj instanceof Number || obj instanceof String || obj instanceof Boolean; }; exports.merge = function(a, b) { if (a && b) { for (var key in b) { a[key] = b[key]; } } return a; }; var hasOwnProperty = Object.prototype.hasOwnProperty; exports.forEach = function forEach(obj, f, context) { if (exports.isGeneratorFunction(obj)) { return forEach(obj(), f, context); } else if (exports.isGeneratorObject(obj)) { var value = obj.next(); while (!value.done) { if (f.call(context, value.value, 'value', obj) === false) return; value = obj.next(); } } else { for (var prop in obj) { if (hasOwnProperty.call(obj, prop)) { if (f.call(context, obj[prop], prop, obj) === false) return; } } } }; exports.some = function(obj, f, context) { var res = false; exports.forEach(obj, function(value, key) { if (f.call(context, value, key, obj)) { res = true; return false; } }, context); return res; }; exports.isEmptyObject = function(obj) { for (var prop in obj) { if (hasOwnProperty.call(obj, prop)) { return false; } } return true; }; exports.isIndexable = function(obj) { var t = type(obj); return (t.type === type.OBJECT && t.cls === type.ARRAY) || (t.type === type.OBJECT && t.cls === type.BUFFER) || (t.type === type.OBJECT && t.cls === type.ARGUMENTS) || (t.type === type.OBJECT && t.cls === type.ARRAY_BUFFER) || (t.type === type.OBJECT && t.cls === type.TYPED_ARRAY) || (t.type === type.OBJECT && t.cls === type.DATA_VIEW) || (t.type === type.OBJECT && t.cls === type.STRING) || (t.type === type.STRING); }; exports.length = function(obj) { var t = type(obj); switch (t.type) { case type.STRING: return obj.length; case type.OBJECT: switch (t.cls) { case type.ARRAY_BUFFER: case type.TYPED_ARRAY: case type.DATA_VIEW: return obj.byteLength; case type.ARRAY: case type.BUFFER: case type.ARGUMENTS: case type.FUNCTION: return obj.length; } } }; exports.convertPropertyName = function(name) { if (typeof name == 'symbol') { return name; } else { return String(name); } }; exports.isGeneratorObject = function(obj) { if (!obj) return false; return typeof obj.next == 'function' && typeof obj[Symbol.iterator] == 'function' && obj[Symbol.iterator]() === obj; }; //TODO find better way exports.isGeneratorFunction = function(f) { if (typeof f != 'function') return false; return /^function\s*\*\s*/.test(f.toString()); }; exports.format = function(value, opts) { return config.getFormatter(opts).format(value); }; exports.functionName = __webpack_require__(62).Formatter.functionName; exports.formatProp = function(value) { return config.getFormatter().formatPropertyName(String(value)); }; /***/ }), /* 1 */ /***/ (function(module, exports, __webpack_require__) { var getType = __webpack_require__(2); var format = __webpack_require__(72); var hasOwnProperty = Object.prototype.hasOwnProperty; function makeResult(r, path, reason, a, b) { var o = {result: r}; if(!r) { o.path = path; o.reason = reason; o.a = a; o.b = b; } return o; } var EQUALS = makeResult(true); function typeToString(t) { return t.type + (t.cls ? '(' + t.cls + (t.sub ? ' ' + t.sub : '') + ')' : ''); } var REASON = { PLUS_0_AND_MINUS_0: '+0 is not equal to -0', DIFFERENT_TYPES: 'A has type %s and B has type %s', NAN_NUMBER: 'NaN is not equal to any number', EQUALITY: 'A is not equal to B', EQUALITY_PROTOTYPE: 'A and B have different prototypes', WRAPPED_VALUE: 'A wrapped value is not equal to B wrapped value', FUNCTION_SOURCES: 'function A is not equal to B by source code value (via .toString call)', MISSING_KEY: '%s has no key %s', CIRCULAR_VALUES: 'A has circular reference that was visited not in the same time as B', SET_MAP_MISSING_KEY: 'Set/Map missing key', MAP_VALUE_EQUALITY: 'Values of the same key in A and B is not equal' }; function eqInternal(a, b, opts, stackA, stackB, path, fails) { var r = EQUALS; function result(comparison, reason) { if(arguments.length > 2) { var args = Array.prototype.slice.call(arguments, 2); reason = format.apply(null, [reason].concat(args)); } var res = makeResult(comparison, path, reason, a, b); if(!comparison && opts.collectAllFails) { fails.push(res); } return res; } function checkPropertyEquality(property) { return eqInternal(a[property], b[property], opts, stackA, stackB, path.concat([property]), fails); } function checkAlso(a1, b1) { return eqInternal(a1, b1, opts, stackA, stackB, path, fails); } // equal a and b exit early if(a === b) { // check for +0 !== -0; return result(a !== 0 || (1 / a == 1 / b) || opts.plusZeroAndMinusZeroEqual, REASON.PLUS_0_AND_MINUS_0); } var l, p; var typeA = getType(a), typeB = getType(b); var key; // if objects has different types they are not equal var typeDifferent = typeA.type !== typeB.type || typeA.cls !== typeB.cls; if(typeDifferent || ((opts.checkSubType && typeA.sub !== typeB.sub) || !opts.checkSubType)) { return result(false, REASON.DIFFERENT_TYPES, typeToString(typeA), typeToString(typeB)); } //early checks for types switch(typeA.type) { case 'number': // NaN !== NaN return (a !== a) ? result(b !== b, REASON.NAN_NUMBER) : result(a === b, REASON.EQUALITY); case 'symbol': case 'boolean': case 'string': return result(a === b, REASON.EQUALITY); case 'function': // functions are compared by their source code r = checkAlso(a.toString(), b.toString()); if(!r.result) { r.reason = REASON.FUNCTION_SOURCES; if(!opts.collectAllFails) return r; } break;//check user properties case 'object': // additional checks for object instances switch(typeA.cls) { // check regexp flags // TODO add es6 flags case 'regexp': p = ['source', 'global', 'multiline', 'lastIndex', 'ignoreCase']; while(p.length) { r = checkPropertyEquality(p.shift()); if(!r.result && !opts.collectAllFails) return r; } break;//check user properties //check by timestamp only (using .valueOf) case 'date': if(+a !== +b) { r = result(false, REASON.EQUALITY); if(!r.result && !opts.collectAllFails) return r; } break;//check user properties //primitive type wrappers case 'number': case 'boolean': case 'string': //check their internal value r = checkAlso(a.valueOf(), b.valueOf()); if(!r.result) { r.reason = REASON.WRAPPED_VALUE; if(!opts.collectAllFails) return r; } break;//check user properties //node buffer case 'buffer': //if length different it is obviously different r = checkPropertyEquality('length'); if(!r.result && !opts.collectAllFails) return r; l = a.length; while(l--) { r = checkPropertyEquality(l); if(!r.result && !opts.collectAllFails) return r; } //we do not check for user properties because //node Buffer have some strange hidden properties return EQUALS; case 'error': //check defined properties p = ['name', 'message']; while(p.length) { r = checkPropertyEquality(p.shift()); if(!r.result && !opts.collectAllFails) return r; } break;//check user properties case 'array': case 'arguments': case 'typed-array': r = checkPropertyEquality('length'); if(!r.result && !opts.collectAllFails) return r; break;//check user properties case 'array-buffer': r = checkPropertyEquality('byteLength'); if(!r.result && !opts.collectAllFails) return r; break;//check user properties case 'map': case 'set': r = checkPropertyEquality('size'); if(!r.result && !opts.collectAllFails) return r; stackA.push(a); stackB.push(b); var itA = a.entries(); var nextA = itA.next(); while(!nextA.done) { key = nextA.value[0]; //first check for primitive key if we can do light check //using .has and .get if(getType(key).type != 'object') { if(b.has(key)) { if(typeA.cls == 'map') { //for map we also check its value to be equal var value = b.get(key); r = checkAlso(nextA.value[1], value); if(!r.result) { r.a = nextA.value; r.b = value; r.reason = REASON.MAP_VALUE_EQUALITY; if(!opts.collectAllFails) break; } } } else { r = result(false, REASON.SET_MAP_MISSING_KEY); r.a = key; r.b = key; if(!opts.collectAllFails) break; } } else { //heavy check //we search by iterator for key equality using equal var itB = b.entries(); var nextB = itB.next(); while(!nextB.done) { //first check for keys r = checkAlso(nextA.value[0], nextB.value[0]); if(!r.result) { r.reason = REASON.SET_MAP_MISSING_KEY; r.a = key; r.b = key; } else { if(typeA.cls == 'map') { r = checkAlso(nextA.value[1], nextB.value[1]); if(!r.result) { r.a = nextA.value; r.b = nextB.value; r.reason = REASON.MAP_VALUE_EQUALITY; } } if(!opts.collectAllFails) break; } nextB = itB.next(); } } if(!r.result && !opts.collectAllFails) break; nextA = itA.next(); } stackA.pop(); stackB.pop(); if(!r.result) { r.reason = REASON.SET_MAP_MISSING_ENTRY; if(!opts.collectAllFails) return r; } break; //check user properties } } // compare deep objects and arrays // stacks contain references only // l = stackA.length; while(l--) { if(stackA[l] === a) { return result(stackB[l] === b, REASON.CIRCULAR_VALUES); } } // add `a` and `b` to the stack of traversed objects stackA.push(a); stackB.push(b); for(key in b) { if(hasOwnProperty.call(b, key)) { r = result(hasOwnProperty.call(a, key), REASON.MISSING_KEY, 'A', key); if(!r.result && !opts.collectAllFails) break; if(r.result) { r = checkPropertyEquality(key); if(!r.result && !opts.collectAllFails) break; } } } if(r.result || opts.collectAllFails) { // ensure both objects have the same number of properties for(key in a) { if(hasOwnProperty.call(a, key)) { r = result(hasOwnProperty.call(b, key), REASON.MISSING_KEY, 'B', key); if(!r.result && !opts.collectAllFails) return r; } } } stackA.pop(); stackB.pop(); if(!r.result && !opts.collectAllFails) return r; var prototypesEquals = false, canComparePrototypes = false; if(opts.checkProtoEql) { if(Object.getPrototypeOf) {//TODO should i check prototypes for === or use eq? prototypesEquals = Object.getPrototypeOf(a) === Object.getPrototypeOf(b); canComparePrototypes = true; } if(canComparePrototypes && !prototypesEquals) { r = result(prototypesEquals, REASON.EQUALITY_PROTOTYPE); r.showReason = true; if(!r.result && !opts.collectAllFails) { return r; } } } return EQUALS; } var defaultOptions = { checkProtoEql: true, checkSubType: true, plusZeroAndMinusZeroEqual: false }; function eq(a, b, opts) { opts = opts || {}; var newOpts = { checkProtoEql: typeof opts.checkProtoEql !== 'boolean' ? defaultOptions.checkProtoEql : opts.checkProtoEql, checkSubType: typeof opts.checkSubType !== 'boolean' ? defaultOptions.checkSubType : opts.checkSubType, plusZeroAndMinusZeroEqual: typeof opts.plusZeroAndMinusZeroEqual !== 'boolean' ? defaultOptions.plusZeroAndMinusZeroEqual : opts.plusZeroAndMinusZeroEqual, }; var fails = []; var r = eqInternal(a, b, newOpts, [], [], [], fails); return opts.collectAllFails ? fails : r; } module.exports = eq; eq.r = REASON; /***/ }), /* 2 */ /***/ (function(module, exports, __webpack_require__) { /* WEBPACK VAR INJECTION */(function(Buffer) {var toString = Object.prototype.toString; var types = __webpack_require__(74); /** * Simple data function to store type information * @param {string} type Usually what is returned from typeof * @param {string} cls Sanitized @Class via Object.prototype.toString * @param {string} sub If type and cls the same, and need to specify somehow * @private * @example * * //for null * new Type('null'); * * //for Date * new Type('object', 'date'); * * //for Uint8Array * * new Type('object', 'typed-array', 'uint8'); */ function Type(type, cls, sub) { this.type = type; this.cls = cls; this.sub = sub; } /** * Function to store type checks * @private */ function TypeChecker() { this.checks = []; } TypeChecker.prototype = { add: function(func) { this.checks.push(func); return this; }, addTypeOf: function(type, res) { return this.add(function(obj, tpeOf) { if(tpeOf === type) { return new Type(res); } }); }, addClass: function(cls, res, sub) { return this.add(function(obj, tpeOf, objCls) { if(objCls === cls) { return new Type(types.OBJECT, res, sub); } }); }, getType: function(obj) { var typeOf = typeof obj; var cls = toString.call(obj); for(var i = 0, l = this.checks.length; i < l; i++) { var res = this.checks[i].call(this, obj, typeOf, cls); if(typeof res !== 'undefined') return res; } } }; var main = new TypeChecker(); //TODO add iterators main .addTypeOf(types.NUMBER, types.NUMBER) .addTypeOf(types.UNDEFINED, types.UNDEFINED) .addTypeOf(types.STRING, types.STRING) .addTypeOf(types.BOOLEAN, types.BOOLEAN) .addTypeOf(types.FUNCTION, types.FUNCTION) .addTypeOf(types.SYMBOL, types.SYMBOL) .add(function(obj, tpeOf) { if(obj === null) return new Type(types.NULL); }) .addClass('[object String]', types.STRING) .addClass('[object Boolean]', types.BOOLEAN) .addClass('[object Number]', types.NUMBER) .addClass('[object Array]', types.ARRAY) .addClass('[object RegExp]', types.REGEXP) .addClass('[object Error]', types.ERROR) .addClass('[object Date]', types.DATE) .addClass('[object Arguments]', types.ARGUMENTS) .addClass('[object Math]') .addClass('[object JSON]') .addClass('[object ArrayBuffer]', types.ARRAY_BUFFER) .addClass('[object Int8Array]', types.TYPED_ARRAY, 'int8') .addClass('[object Uint8Array]', types.TYPED_ARRAY, 'uint8') .addClass('[object Uint8ClampedArray]', types.TYPED_ARRAY, 'uint8clamped') .addClass('[object Int16Array]', types.TYPED_ARRAY, 'int16') .addClass('[object Uint16Array]', types.TYPED_ARRAY, 'uint16') .addClass('[object Int32Array]', types.TYPED_ARRAY, 'int32') .addClass('[object Uint32Array]', types.TYPED_ARRAY, 'uint32') .addClass('[object Float32Array]', types.TYPED_ARRAY, 'float32') .addClass('[object Float64Array]', types.TYPED_ARRAY, 'float64') .addClass('[object DataView]', types.DATA_VIEW) .addClass('[object Map]', types.MAP) .addClass('[object WeakMap]', types.WEAK_MAP) .addClass('[object Set]', types.SET) .addClass('[object WeakSet]', types.WEAK_SET) .addClass('[object Promise]', types.PROMISE) .addClass('[object Blob]', types.BLOB) .addClass('[object File]', types.FILE) .addClass('[object FileList]', types.FILE_LIST) .addClass('[object XMLHttpRequest]', types.XHR) .add(function(obj) { if((typeof Promise === types.FUNCTION && obj instanceof Promise) || (typeof obj.then === types.FUNCTION)) { return new Type(types.OBJECT, types.PROMISE); } }) .add(function(obj) { if(typeof Buffer !== 'undefined' && obj instanceof Buffer) { return new Type(types.OBJECT, types.BUFFER); } }) .add(function(obj) { if(typeof Node !== 'undefined' && obj instanceof Node) { return new Type(types.OBJECT, types.HTML_ELEMENT, obj.nodeName); } }) .add(function(obj) { // probably at the begginging should be enough these checks if(obj.Boolean === Boolean && obj.Number === Number && obj.String === String && obj.Date === Date) { return new Type(types.OBJECT, types.HOST); } }) .add(function() { return new Type(types.OBJECT); }); /** * Get type information of anything * * @param {any} obj Anything that could require type information * @return {Type} type info */ function getGlobalType(obj) { return main.getType(obj); } getGlobalType.checker = main; getGlobalType.TypeChecker = TypeChecker; getGlobalType.Type = Type; Object.keys(types).forEach(function(typeName) { getGlobalType[typeName] = types[typeName]; }); module.exports = getGlobalType; /* WEBPACK VAR INJECTION */}.call(exports, __webpack_require__(90).Buffer)) /***/ }), /* 3 */ /***/ (function(module, exports, __webpack_require__) { /* * should.js - assertion library * Copyright(c) 2010-2013 TJ Holowaychuk <tj@vision-media.ca> * Copyright(c) 2013-2016 Denis Bardadym <bardadymchik@gmail.com> * MIT Licensed */ var AssertionError = __webpack_require__(60); /** * should Assertion * @param {*} obj Given object for assertion * @constructor * @memberOf should * @static */ function Assertion(obj) { this.obj = obj; this.anyOne = false; this.negate = false; this.params = {actual: obj}; } Assertion.prototype = { constructor: Assertion, /** * Base method for assertions. * * Before calling this method need to fill Assertion#params object. This method usually called from other assertion methods. * `Assertion#params` can contain such properties: * * `operator` - required string containing description of this assertion * * `obj` - optional replacement for this.obj, it usefull if you prepare more clear object then given * * `message` - if this property filled with string any others will be ignored and this one used as assertion message * * `expected` - any object used when you need to assert relation between given object and expected. Like given == expected (== is a relation) * * `details` - additional string with details to generated message * * @memberOf Assertion * @category assertion * @param {*} expr Any expression that will be used as a condition for asserting. * @example * * var a = new should.Assertion(42); * * a.params = { * operator: 'to be magic number', * } * * a.assert(false); * //throws AssertionError: expected 42 to be magic number */ assert: function(expr) { if (expr) { return this; } var params = this.params; if ('obj' in params && !('actual' in params)) { params.actual = params.obj; } else if (!('obj' in params) && !('actual' in params)) { params.actual = this.obj; } params.stackStartFunction = params.stackStartFunction || this.assert; params.negate = this.negate; params.assertion = this; throw new AssertionError(params); }, /** * Shortcut for `Assertion#assert(false)`. * * @memberOf Assertion * @category assertion * @example * * var a = new should.Assertion(42); * * a.params = { * operator: 'to be magic number', * } * * a.fail(); * //throws AssertionError: expected 42 to be magic number */ fail: function() { return this.assert(false); } }; /** * Assertion used to delegate calls of Assertion methods inside of Promise. * It has almost all methods of Assertion.prototype * * @param {Promise} obj */ function PromisedAssertion(/* obj */) { Assertion.apply(this, arguments); } /** * Make PromisedAssertion to look like promise. Delegate resolve and reject to given promise. * * @private * @returns {Promise} */ PromisedAssertion.prototype.then = function(resolve, reject) { return this.obj.then(resolve, reject); }; /** * Way to extend Assertion function. It uses some logic * to define only positive assertions and itself rule with negative assertion. * * All actions happen in subcontext and this method take care about negation. * Potentially we can add some more modifiers that does not depends from state of assertion. * * @memberOf Assertion * @static * @param {String} name Name of assertion. It will be used for defining method or getter on Assertion.prototype * @param {Function} func Function that will be called on executing assertion * @example * * Assertion.add('asset', function() { * this.params = { operator: 'to be asset' } * * this.obj.should.have.property('id').which.is.a.Number() * this.obj.should.have.property('path') * }) */ Assertion.add = function(name, func) { Object.defineProperty(Assertion.prototype, name, { enumerable: true, configurable: true, value: function() { var context = new Assertion(this.obj, this, name); context.anyOne = this.anyOne; try { func.apply(context, arguments); } catch (e) { // check for fail if (e instanceof AssertionError) { // negative fail if (this.negate) { this.obj = context.obj; this.negate = false; return this; } if (context !== e.assertion) { context.params.previous = e; } // positive fail context.negate = false; context.fail(); } // throw if it is another exception throw e; } // negative pass if (this.negate) { context.negate = true; // because .fail will set negate context.params.details = 'false negative fail'; context.fail(); } // positive pass if (!this.params.operator) { this.params = context.params; // shortcut } this.obj = context.obj; this.negate = false; return this; } }); Object.defineProperty(PromisedAssertion.prototype, name, { enumerable: true, configurable: true, value: function() { var args = arguments; this.obj = this.obj.then(function(a) { return a[name].apply(a, args); }); return this; } }); }; /** * Add chaining getter to Assertion like .a, .which etc * * @memberOf Assertion * @static * @param {string} name name of getter * @param {function} [onCall] optional function to call */ Assertion.addChain = function(name, onCall) { onCall = onCall || function() {}; Object.defineProperty(Assertion.prototype, name, { get: function() { onCall.call(this); return this; }, enumerable: true }); Object.defineProperty(PromisedAssertion.prototype, name, { enumerable: true, configurable: true, get: function() { this.obj = this.obj.then(function(a) { return a[name]; }); return this; } }); }; /** * Create alias for some `Assertion` property * * @memberOf Assertion * @static * @param {String} from Name of to map * @param {String} to Name of alias * @example * * Assertion.alias('true', 'True') */ Assertion.alias = function(from, to) { var desc = Object.getOwnPropertyDescriptor(Assertion.prototype, from); if (!desc) throw new Error('Alias ' + from + ' -> ' + to + ' could not be created as ' + from + ' not defined'); Object.defineProperty(Assertion.prototype, to, desc); var desc2 = Object.getOwnPropertyDescriptor(PromisedAssertion.prototype, from); if (desc2) { Object.defineProperty(PromisedAssertion.prototype, to, desc2); } }; /** * Negation modifier. Current assertion chain become negated. Each call invert negation on current assertion. * * @name not * @property * @memberOf Assertion * @category assertion */ Assertion.addChain('not', function() { this.negate = !this.negate; }); /** * Any modifier - it affect on execution of sequenced assertion to do not `check all`, but `check any of`. * * @name any * @property * @memberOf Assertion * @category assertion */ Assertion.addChain('any', function() { this.anyOne = true; }); module.exports = Assertion; module.exports.PromisedAssertion = PromisedAssertion; /***/ }), /* 4 */ /***/ (function(module, exports) { module.exports = { "Description": "10-Digits - NNNNNNNNNN", "RedundantCharacters": " -", "ValidationRegex": "^[0-9]{10}$", "TestData": { "Valid": [ "1234567890", "5678567833" ], "Invalid": [ "12334545698", "123s33s12", "123456789" ] } }; /***/ }), /* 5 */ /***/ (function(module, exports) { module.exports = { "Description": "2-Digits - NN", "RedundantCharacters": " -", "ValidationRegex": "^[0-9]{2}$", "TestData": { "Valid": [ "12", "56" ], "Invalid": [ "012", "1s", "1", "x3" ] } }; /***/ }), /* 6 */ /***/ (function(module, exports) { module.exports = { "Description": "3-Digits - NNN", "RedundantCharacters": " -", "ValidationRegex": "^[0-9]{3}$", "TestData": { "Valid": [ "123", "567" ], "Invalid": [ "1234", "13s", "1x3" ] } }; /***/ }), /* 7 */ /***/ (function(module, exports) { module.exports = { "Description": "4-Digits - NNNN", "RedundantCharacters": " -", "ValidationRegex": "^[0-9]{4}$", "TestData": { "Valid": [ "1234", "5678" ], "Invalid": [ "12345", "123s", "12x3" ] } }; /***/ }), /* 8 */ /***/ (function(module, exports) { module.exports = { "Description": "5-Digits - NNNNN", "RedundantCharacters": " -", "ValidationRegex": "^[0-9]{5}$", "TestData": { "Valid": [ "12345", "56785" ], "Invalid": [ "123456", "1233s", "123x3" ] } }; /***/ }), /* 9 */ /***/ (function(module, exports) { module.exports = { "Description": "6-Digits - NNNNNN", "RedundantCharacters": " -", "ValidationRegex": "^[0-9]{6}$", "TestData": { "Valid": [ "123456", "567856" ], "Invalid": [ "1233456", "123s3s", "1s23x3" ] } }; /***/ }), /* 10 */ /***/ (function(module, exports) { module.exports = { "Description": "7-Digits - NNNNNNN", "RedundantCharacters": " -", "ValidationRegex": "^[0-9]{7}$", "TestData": { "Valid": [ "1234567", "5678567" ], "Invalid": [ "123345456", "123s33s", "1s23x3" ] } }; /***/ }), /* 11 */ /***/ (function(module, exports) { module.exports = { "Description": "8-Digits - NNNNNNNN", "RedundantCharacters": " -", "ValidationRegex": "^[0-9]{8}$", "TestData": { "Valid": [ "12345678", "56785678" ], "Invalid": [ "123345456", "123s33s", "1s23x3" ] } }; /***/ }), /* 12 */ /***/ (function(module, exports) { module.exports = { "Description": "AD : CCNNN", "RedundantCharacters": " -", "ValidationRegex": "^AD[0-9]{3}$", "TestData": { "Valid": [ "AD123", "AD001" ], "Invalid": [ "A1234", "AD12", "AD1234" ] } }; /***/ }), /* 13 */ /***/ (function(module, exports) { module.exports = { "Description": "AI : CC2640", "RedundantCharacters": " -", "ValidationRegex": "^AI2640$", "TestData": { "Valid": [ "AI2640", "AI-2640" ], "Invalid": [ "A2640", "AI02640", "AI-02640" ] } }; /***/ }), /* 14 */ /***/ (function(module, exports) { module.exports = { "Description": "AQ : BIQQ 1ZZ", "RedundantCharacters": " -", "ValidationRegex": "^BIQQ1ZZ$", "TestData": { "Valid": [ "BIQQ 1ZZ", "BIQQ1ZZ" ], "Invalid": [ "BIQQ1Z", "BIQQ01ZZ" ] } }; /***/ }), /* 15 */ /***/ (function(module, exports) { module.exports = { "Description": "AX : NNNNN, CC-NNNNN", "RedundantCharacters": " -", "ValidationRegex": "^(AX)?[0-9]{4}$", "TestData": { "Valid": [ "1234", "AX-1234", "AX1234" ], "Invalid": [ "AX123", "A1234", "AX-12345" ] } }; /***/ }), /* 16 */ /***/ (function(module, exports) { module.exports = { "Description": "AZ : CCNNNNN", "RedundantCharacters": " -", "ValidationRegex": "^AZ[0-9]{4}$", "TestData": { "Valid": [ "AZ1234", "AZ-1234" ], "Invalid": [ "AZ123", "A1234", "AZ-12345" ] } }; /***/ }), /* 17 */ /***/ (function(module, exports) { module.exports = { "Description": "BB : CCNNNNN", "RedundantCharacters": " -", "ValidationRegex": "^(BB)?[0-9]{5}$", "TestData": { "Valid": [ "BB12345", "12345" ], "Invalid": [ "x1231s", "1231sd" ] } }; /***/ }), /* 18 */ /***/ (function(module, exports) { module.exports = { "Description": "BH : NNN, NNNN", "RedundantCharacters": " -", "ValidationRegex": "^[0-9]{3,4}$", "TestData": { "Valid": [ "123", "1234" ], "Invalid": [ "12", "12345" ] } }; /***/ }), /* 19 */ /***/ (function(module, exports) { module.exports = { "Description": "BL : 97133", "RedundantCharacters": " -", "ValidationRegex": "^97133$", "TestData": { "Valid": [ "97133" ], "Invalid": [ "971330", "9713" ] } }; /***/ }), /* 20 */ /***/ (function(module, exports) { module.exports = { "Description": "BN : LLNNNN", "RedundantCharacters": " -", "ValidationRegex": "^[a-zA-Z]{2}[0-9]{4}$", "TestData": { "Valid": [ "AB1234", "tK0987" ], "Invalid": [ "abc123", "a12345", "at123", "BH12345" ] } }; /***/ }), /* 21 */ /***/ (function(module, exports) { module.exports = { "Description": "CA : A0A 0A0", "RedundantCharacters": " -", "ValidationRegex": "^[A-Z][0-9][A-Z][0-9][A-Z][0-9]$", "TestData": { "Valid": [ "A4B5X5", "A4B5A5" ], "Invalid": [ "123AAA", "12A5AA" ] } }; /***/ }), /* 22 */ /***/ (function(module, exports) { module.exports = { "Description": "FK : FIQQ 1ZZ", "RedundantCharacters": " -", "ValidationRegex": "^FIQQ1ZZ$", "TestData": { "Valid": [ "FIQQ 1ZZ", "FIQQ1ZZ" ], "Invalid": [ "FIQQ01ZZ", "FIQQ1ZZZ" ] } }; /***/ }), /* 23 */ /***/ (function(module, exports) { module.exports = { "Description": "GB", "RedundantCharacters": " -", "ValidationRegex": "[A-PR-UWYZ0-9][A-HK-Y0-9][AEHMNPRTVXY0-9]?[ABEHMNPRVWXY0-9]?[0-9][ABD-HJLN-UW-Z]{2}|GIR0AA", "ValidationRegex.DOC": "http://regexlib.com/REDetails.aspx?regexp_id=260&AspxAutoDetectCookieSupport=1", "TestData": { "Valid": [ "CW3 9SS", "SE5 0EG", "SE50EG", "WC2H 7LT", "se5 0eg", "Z29ZZ", "Z699ZZ", "ZX99ZZ", "ZC999ZZ", "EC1A 1BB", "W1A 0AX", "M1 1AE", "B33 8TH", "CR2 6XH", "DN55 1PT", "GIR 0AA" ], "Invalid": [ "WC2H 7LTa", "WC2H" ] } }; /***/ }), /* 24 */ /***/ (function(module, exports) { module.exports = { "Description": "GF : 973NN", "RedundantCharacters": " -", "ValidationRegex": "^973[0-9]{2}$", "TestData": { "Valid": [ "97300", "97390" ], "Invalid": [ "9732", "973999", "97290", "097390" ] } }; /***/ }), /* 25 */ /***/ (function(module, exports) { module.exports = { "Description": "GI : GX11 1AA", "RedundantCharacters": " -", "ValidationRegex": "^GX111AA$", "TestData": { "Valid": [ "GX111AA", "GX11 1AA" ], "Invalid": [ "GX1101AA", "GX111AAA" ] } }; /***/ }), /* 26 */ /***/ (function(module, exports) { module.exports = { "Description": "GP : 971NN", "RedundantCharacters": " -", "ValidationRegex": "^971[0-9]{2}$", "TestData": { "Valid": [ "97100", "97190" ], "Invalid": [ "9712", "971999", "97290", "097190" ] } }; /***/ }), /* 27 */ /***/ (function(module, exports) { module.exports = { "Description": "GS : SIQQ 1ZZ", "RedundantCharacters": " -", "ValidationRegex": "^SIQQ1ZZ$", "TestData": { "Valid": [ "SIQQ 1ZZ", "SIqq 1zz", "SIQQ1ZZ" ], "Invalid": [ "SIQQ01ZZ", "SIQQ1ZZZ" ] } }; /***/ }), /* 28 */ /***/ (function(module, exports) { module.exports = { "Description": "HN : CCNNNNN", "RedundantCharacters": " -", "ValidationRegex": "^(HN)?[0-9]{5}$", "TestData": { "Valid": [ "HN12345", "12345" ], "Invalid": [ "123456", "HN123456", "HN1234" ] } }; /***/ }), /* 29 */ /***/ (function(module, exports) { module.exports = { "Description": "IO : BBND 1ZZ", "RedundantCharacters": " -", "ValidationRegex": "^BBND1ZZ$", "TestData": { "Valid": [ "BBND 1ZZ", "BBND1ZZ" ], "Invalid": [ "BBND01ZZ", "BBND1ZZZ" ] } }; /***/ }), /* 30 */ /***/ (function(module, exports) { module.exports = { "Description": "KY : CCN-NNNN", "RedundantCharacters": " -", "ValidationRegex": "^KY[0-9]{5}$", "TestData": { "Valid": [ "KY1-1234", "KY12345" ], "Invalid": [ "KY1234", "KY123456", "K1-1234" ] } }; /***/ }), /* 31 */ /***/ (function(module, exports) { module.exports = { "Description": "LB : NNNNN, NNNN NNNN", "RedundantCharacters": " -", "ValidationRegex": "^[0-9]{4}(?:[0-9]{4})?$", "TestData": { "Valid": [ "1234", "1234 1234", "12341234" ], "Invalid": [ "123", "1234567", "123456789" ] } }; /***/ }), /* 32 */ /***/ (function(module, exports) { module.exports = { "Description": "LC : CCNN NNN", "RedundantCharacters": " -", "ValidationRegex": "^LC[0-9]{5}$", "TestData": { "Valid": [ "LC12 345", "LC12345" ], "Invalid": [ "12345", "x1231s", "1231sd" ] } }; /***/ }), /* 33 */ /***/ (function(module, exports) { module.exports = { "Description": "LT : LT-NNNNN", "RedundantCharacters": " -", "ValidationRegex": "^(LT)?[0-9]{5}$", "TestData": { "Valid": [ "12345", "LT12345", "LT-12345" ], "Invalid": [ "1234", "123456", "LT-1234" ] } }; /***/ }), /* 34 */ /***/ (function(module, exports) { module.exports = { "Description": "LV : NNNNN, CC-NNNNN", "RedundantCharacters": " -", "ValidationRegex": "^(LV)?[0-9]{4}$", "TestData": { "Valid": [ "1234", "LV-1234", "LV1234" ], "Invalid": [ "LV123", "L1234", "LV-12345" ] } }; /***/ }), /* 35 */ /***/ (function(module, exports) { module.exports = { "Description": "MD : CCNNNN, CC-NNNN", "RedundantCharacters": " -", "ValidationRegex": "^(MD)?[0-9]{4}$", "TestData": { "Valid": [ "1234", "MD1234", "MD-1234" ], "Invalid": [ "MD123", "M1234", "MD-12345" ] } }; /***/ }), /* 36 */ /***/ (function(module, exports) { module.exports = { "Description": "MF : 97150", "RedundantCharacters": " -", "ValidationRegex": "^97150$", "TestData": { "Valid": [ "97150" ], "Invalid": [ "971500", "9715" ] } }; /***/ }), /* 37 */ /***/ (function(module, exports) { module.exports = { "Description": "MS : MSR NNNN", "RedundantCharacters": " -", "ValidationRegex": "^(MSR)?[0-9]{4}$", "TestData": { "Valid": [ "MSR 1110", "MSR 1350", "1350" ], "Invalid": [ "MS1110", "MSR01350", "12345" ] } }; /***/ }), /* 38 */ /***/ (function(module, exports) { module.exports = { "Description": "MA : LLL NNNN", "RedundantCharacters": " -", "ValidationRegex": "^[A-Z]{3}[0-9]{4}$", "TestData": { "Valid": [ "abc1234", "ABC1234", "SHD4783" ], "Invalid": [ "ABCABC", "123ABCD" ] } }; /***/ }), /* 39 */ /***/ (function(module, exports) { module.exports = { "Description": "NC : 988NN", "RedundantCharacters": " -", "ValidationRegex": "^988[0-9]{2}$", "TestData": { "Valid": [ "98800", "98890" ], "Invalid": [ "9882", "988999", "98990", "098890" ] } }; /***/ }), /* 40 */ /***/ (function(module, exports) { module.exports = { "Description": "NL : CC-NNNN LL", "RedundantCharacters": " -", "ValidationRegex": "^(NL)?[0-9]{4}([A-Z]{2})?$", "TestData": { "Valid": [ "1235DF", "5983DH", "NL-1000 AP" ], "Invalid": [ "1235D", "12j4h", "k3j51l" ] } }; /***/ }), /* 41 */ /***/ (function(module, exports) { module.exports = { "Description": "PF : 987NN", "RedundantCharacters": " -", "ValidationRegex": "^987[0-9]{2}$", "TestData": { "Valid": [ "98700", "98790" ], "Invalid": [ "9872", "987999", "98690", "098790" ] } }; /***/ }), /* 42 */ /***/ (function(module, exports) { module.exports = { "Description": "PL : 99-999", "RedundantCharacters": " -", "ValidationRegex": "^[0-9]{5}$", "TestData": { "Valid": [ "44100", "44-100" ], "Invalid": [ "44f00", "e4410", "44-100d", "c44-100", "b44100", "44100a" ] } }; /***/ }), /* 43 */ /***/ (function(module, exports) { module.exports = { "Description": "PM : 97500", "RedundantCharacters": " -", "ValidationRegex": "^97500$", "TestData": { "Valid": [ "97500" ], "Invalid": [ "975000", "9750" ] } }; /***/ }), /* 44 */ /***/ (function(module, exports) { module.exports = { "Description": "PN : PCRN 1ZZ", "RedundantCharacters": " -", "ValidationRegex": "^PCRN1ZZ$", "TestData": { "Valid": [ "PCRN 1ZZ", "PCRN1ZZ" ], "Invalid": [ "PCRN01ZZ", "PCRN1ZZZ" ] } }; /***/ }), /* 45 */ /***/ (function(module, exports) { module.exports = { "Description": "PT : NNNN[ NNN]", "RedundantCharacters": " -", "ValidationRegex": "^([0-9]{4}-[0-9]{3})$", "TestData": { "Valid": [ "1234-123" ], "Invalid": [ "1255", "1234567", "1234 123", "x1231s", "1231sd", "1010101010", "1234 12" ] } }; /***/ }), /* 46 */ /***/ (function(module, exports) { module.exports = { "Description": "RE : 974NN", "RedundantCharacters": " -", "ValidationRegex": "^974[0-9]{2}$", "TestData": { "Valid": [ "97400", "97490" ], "Invalid": [ "9742", "974999", "97390", "097490" ] } }; /***/ }), /* 47 */ /***/ (function(module, exports) { module.exports = { "Description": "RU : NNN[-NNN]", "RedundantCharacters": " -", "ValidationRegex": "^[0-9]{3}([0-9]{3})?$", "TestData": { "Valid": [ "125", "123456" ], "Invalid": [ "x1231s", "1231sd", "1010101010" ] } }; /***/ }), /* 48 */ /***/ (function(module, exports) { module.exports = { "Description": "SH : STHL 1ZZ", "RedundantCharacters": " -", "ValidationRegex": "^STHL1ZZ$", "TestData": { "Valid": [ "STHL 1ZZ", "STHL1ZZ" ], "Invalid": [ "STHL01ZZ", "STHL1ZZZ" ] } }; /***/ }), /* 49 */ /***/ (function(module, exports) { module.exports = { "Description": "SM : 4789N", "RedundantCharacters": " -", "ValidationRegex": "^4789[0-9]{1}$", "TestData": { "Valid": [ "47890", "47899" ], "Invalid": [ "4789", "478900", "47889" ] } }; /***/ }), /* 50 */ /***/ (function(module, exports) { module.exports = { "Description": "SO : AA NNNNN", "RedundantCharacters": " -", "ValidationRegex": "^[a-zA-Z]{2}[0-9]{5}$", "TestData": { "Valid": [ "AW12345", "BN47899" ], "Invalid": [ "12345", "A12345", "SL123456" ] } }; /***/ }), /* 51 */ /***/ (function(module, exports) { module.exports = { "Description": "SZ : ANNN", "RedundantCharacters": " -", "ValidationRegex": "^[a-zA-Z]{1}[0-9]{3}$", "TestData": { "Valid": [ "S123", "a789" ], "Invalid": [ "F1234", "D12" ] } }; /***/ }), /* 52 */ /***/ (function(module, exports) { module.exports = { "Description": "TC : TKCA 1ZZ", "RedundantCharacters": " -", "ValidationRegex": "^TKCA1ZZ$", "TestData": { "Valid": [ "TKCA1ZZ", "TKCA 1ZZ" ], "Invalid": [ "TKCA01ZZ", "TKCA1ZZZ" ] } }; /***/ }), /* 53 */ /***/ (function(module, exports) { module.exports = { "Description": "US : NNNNN[-NNNN]", "RedundantCharacters": " -", "ValidationRegex": "^[0-9]{5}([0-9]{4})?$", "TestData": { "Valid": [ "12345", "12345-7689" ], "Invalid": [ "x1231s", "1231sd", "1010101010" ] } }; /***/ }), /* 54 */ /***/ (function(module, exports) { module.exports = { "Description": "VA : 00120", "RedundantCharacters": " -", "ValidationRegex": "^00120$", "TestData": { "Valid": [ "00120" ], "Invalid": [ "0012", "001200" ] } }; /***/ }), /* 55 */ /***/ (function(module, exports) { module.exports = { "Description": "VC : CCNNNNN", "RedundantCharacters": " -", "ValidationRegex": "^(VC)?[0-9]{4}$", "TestData": { "Valid": [ "1234", "VC1234", "VC-1234" ], "Invalid": [ "VC123", "V1234", "VC-12345" ] } }; /***/ }), /* 56 */ /***/ (function(module, exports) { module.exports = { "Description": "VE : NNNN, NNNN-A", "RedundantCharacters": " -", "ValidationRegex": "^[0-9]{4}[a-zA-Z]?$", "TestData": { "Valid": [ "1234", "1234-A" ], "Invalid": [ "123", "1234AA" ] } }; /***/ }), /* 57 */ /***/ (function(module, exports) { module.exports = { "Description": "VG : CCNNNN", "RedundantCharacters": " -", "ValidationRegex": "^(VG)?[0-9]{4}$", "TestData": { "Valid": [ "1234", "VG1234", "VG-1234" ], "Invalid": [ "VG123", "V1234", "VG-12345" ] } }; /***/ }), /* 58 */ /***/ (function(module, exports) { module.exports = { "Description": "WF : 986NN", "RedundantCharacters": " -", "ValidationRegex": "^986[0-9]{2}$", "TestData": { "Valid": [ "98600", "98690" ], "Invalid": [ "9862", "986999", "98990", "098690" ] } }; /***/ }), /* 59 */ /***/ (function(module, exports) { module.exports = { "Description": "WS : CCNNNNN", "RedundantCharacters": " -", "ValidationRegex": "^(WS)?[0-9]{4}$", "TestData": { "Valid": [ "1234", "WS1234", "WS-1234" ], "Invalid": [ "WS123", "V1234", "WS-12345" ] } }; /***/ }), /* 60 */ /***/ (function(module, exports, __webpack_require__) { /* * should.js - assertion library * Copyright(c) 2010-2013 TJ Holowaychuk <tj@vision-media.ca> * Copyright(c) 2013-2016 Denis Bardadym <bardadymchik@gmail.com> * MIT Licensed */ var util = __webpack_require__(0); /** * should AssertionError * @param {Object} options * @constructor * @memberOf should * @static */ var AssertionError = function AssertionError(options) { util.merge(this, options); if (!options.message) { Object.defineProperty(this, 'message', { get: function() { if (!this._message) { this._message = this.generateMessage(); this.generatedMessage = true; } return this._message; }, configurable: true, enumerable: false } ); } if (Error.captureStackTrace) { Error.captureStackTrace(this, this.stackStartFunction); } else { // non v8 browsers so we can have a stacktrace var err = new Error(); if (err.stack) { var out = err.stack; if (this.stackStartFunction) { // try to strip useless frames var fn_name = util.functionName(this.stackStartFunction); var idx = out.indexOf('\n' + fn_name); if (idx >= 0) { // once we have located the function frame // we need to strip out everything before it (and its line) var next_line = out.indexOf('\n', idx + 1); out = out.substring(next_line + 1); } } this.stack = out; } } }; var indent = ' '; function prependIndent(line) { return indent + line; } function indentLines(text) { return text.split('\n').map(prependIndent).join('\n'); } // assert.AssertionError instanceof Error AssertionError.prototype = Object.create(Error.prototype, { name: { value: 'AssertionError' }, generateMessage: { value: function() { if (!this.operator && this.previous) { return this.previous.message; } var actual = util.format(this.actual); var expected = 'expected' in this ? ' ' + util.format(this.expected) : ''; var details = 'details' in this && this.details ? ' (' + this.details + ')' : ''; var previous = this.previous ? '\n' + indentLines(this.previous.message) : ''; return 'expected ' + actual + (this.negate ? ' not ' : ' ') + this.operator + expected + details + previous; } } }); module.exports = AssertionError; /***/ }), /* 61 */ /***/ (function(module, exports) { module.exports = { "AF": { "countryName": "Afghanistan", "postalCodeFormat": "4Digits.json", "alpha2": "AF", "alpha3": "AFG", "numeric3": "4" }, "AX": { "countryName": "Aland Islands", "postalCodeFormat": "AX.json", "alpha2": "AX", "alpha3": "ALA", "numeric3": "248" }, "AL": { "countryName": "Albania", "postalCodeFormat": "4Digits.json", "alpha2": "AL", "alpha3": "ALB", "numeric3": "8" }, "DZ": { "countryName": "Algeria", "postalCodeFormat": "5Digits.json", "alpha2": "DZ", "alpha3": "DZA", "numeric3": "12" }, "AS": { "countryName": "American Samoa", "postalCodeFormat": "5Digits.json", "alpha2": "AS", "alpha3": "ASM", "numeric3": "16" }, "AD": { "countryName": "Andorra", "postalCodeFormat": "AD.json", "alpha2": "AD", "alpha3": "AND", "numeric3": "20" }, "AO": { "countryName": "Angola", "alpha2": "AO", "alpha3": "AGO", "numeric3": "24" }, "AI": { "countryName": "Anguilla", "postalCodeFormat": "AI.json", "alpha2": "AI", "alpha3": "AIA", "numeric3": "660" }, "AQ": { "countryName": "Antarctica", "postalCodeFormat": "AQ.json", "alpha2": "AQ", "alpha3": "ATA", "numeric3": "10" }, "AG": { "countryName": "Antigua and Barbuda", "alpha2": "AG", "alpha3": "ATG", "numeric3": "28" }, "AR": { "countryName": "Argentina", "postalCodeFormat": "4Digits.json", "alpha2": "AR", "alpha3": "ARG", "numeric3": "32" }, "AM": { "countryName": "Armenia", "postalCodeFormat": "4Digits.json", "alpha2": "AM", "alpha3": "ARM", "numeric3": "51" }, "AW": { "countryName": "Aruba", "alpha2": "AW", "alpha3": "ABW", "numeric3": "533" }, "AU": { "countryName": "Australia", "postalCodeFormat": "4Digits.json", "alpha2": "AU", "alpha3": "AUS", "numeric3": "36" }, "AT": { "countryName": "Austria", "postalCodeFormat": "4Digits.json", "alpha2": "AT", "alpha3": "AUT", "numeric3": "40" }, "AZ": { "countryName": "Azerbaijan", "postalCodeFormat": "AZ.json", "alpha2": "AZ", "alpha3": "AZE", "numeric3": "31" }, "BS": { "countryName": "Bahamas", "alpha2": "BS", "alpha3": "BHS", "numeric3": "44" }, "BH": { "count