Comparing version 1.1.2 to 1.1.3
@@ -1,2 +0,2 @@ | ||
// [AIV] beJS Build version: 1.1.2 | ||
var be=function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=4)}([function(t,e,n){"use strict";var r=n(2),i={};i._isArray=function(t){return"[object Array]"===r.objectToString(t)},i.create=function(t){t.all={},t.any={},t.not={};for(var e in t)!function(e){t.hasOwnProperty(e)&&"function"==typeof t[e]&&(t.not[e]=function(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return!t[e].apply(void 0,r)},void 0===t[e].multiple&&(t.all[e]=function(){for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];var u=r;i._isArray(u[0])&&(u=u[0]);for(var a in u)if(u.hasOwnProperty(a)&&!t[e].call(void 0,u[a]))return!1;return!0},t.any[e]=function(){for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];var u=r;i._isArray(u[0])&&(u=u[0]);for(var a in u)if(u.hasOwnProperty(a)&&t[e].call(void 0,u[a]))return!0;return!1}))}(e);return t},t.exports=i},function(t,e,n){"use strict";var r=n(2),i=n(0),o={};o.classOf=function(t,e){return r.objectToString(t).toLowerCase()==="[object "+e+"]".toLowerCase()},o.classOf.multiple=!1,o.boolean=function(t){return o.classOf(t,"boolean")},o.booleanFalse=function(t){return o.boolean(t)&&!1===t},o.booleanTrue=function(t){return o.boolean(t)&&!0===t},o.number=function(t){return o.classOf(t,"number")&&!isNaN(t)},o.string=function(t){return o.classOf(t,"string")},o.undefined=function(t){return o.classOf(t,"undefined")},o.null=function(t){return o.classOf(t,"null")},o.object=function(t){return o.classOf(t,"object")&&!o.array(t)},o.array=function(t){return o.classOf(t,"array")},o.json=function(t){try{return JSON.parse(t),!0}catch(t){return!1}},o.date=function(t){return o.classOf(t,"date")},o.function=function(t){return o.classOf(t,"function")},o.regexp=function(t){return o.classOf(t,"regexp")},o.sameType=function(t,e){return r.objectToString(t)===r.objectToString(e)},o.sameType.multiple=!1,o.empty=function(t){if(o.null(t)||o.undefined(t))return!0;if(o.number(t)||o.function(t)||o.boolean(t))return!1;if(o.object(t)||o.array(t)){if(t.length>0)return!1;if(0===t.length)return!0;for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1}return!(o.string(t)&&t.length>0)},o.falsy=function(t){return!t},o.truthy=function(t){return!o.falsy(t)},o=i.create(o),t.exports=o},function(t,e,n){"use strict";var r={};r.getUserAgent=function(){if(arguments.length)return arguments.length<=0?void 0:arguments[0];if("undefined"==typeof window||void 0===window.navigator)throw new Error("test allowed only in browser environment");return navigator.userAgent},r.objectToString=function(t){return Object.prototype.toString.call(t)},r.getEditDistance=function(t,e){if(0===t.length)return e.length;if(0===e.length)return t.length;var n=[],r=void 0;for(r=0;r<=e.length;r++)n[r]=[r];var i=void 0;for(i=0;i<=t.length;i++)n[0][i]=i;for(r=1;r<=e.length;r++)for(i=1;i<=t.length;i++)e.charAt(r-1)===t.charAt(i-1)?n[r][i]=n[r-1][i-1]:n[r][i]=Math.min(n[r-1][i-1]+1,Math.min(n[r][i-1]+1,n[r-1][i]+1));return n[e.length][t.length]},r.mathSign=function(t){return t=+t,0===t||isNaN(t)?Number(t):t>0?1:-1},t.exports=r},function(t,e,n){"use strict";var r=n(1),i=n(0),o=(n(2),{});o.int=function(t){return r.number(t)&&isFinite(t)&&Math.floor(t)===t},o.float=function(t){return r.number(t)&&!o.int(t)},o.nan=function(t){return isNaN(t)},o.even=function(t){return r.number(t)&&t%2==0},o.odd=function(t){return r.number(t)&&!o.even(t)},o.positive=function(t){return r.number(t)&&(t>0||0===t&&1/t==1/0)},o.negative=function(t){return r.number(t)&&(t<0||0===t&&1/t==-1/0)},o.infinity=function(t){return o.infinityPositive(t)||o.infinityNegative(t)},o.infinityPositive=function(t){return t===Number.POSITIVE_INFINITY},o.infinityNegative=function(t){return t===Number.NEGATIVE_INFINITY},o.between=function(t,e,n){return r.all.number(t,e,n)&&t>=e&&t<=n},o.between.multiple=!1,o.greater=function(t,e){return r.all.number(t,e)&&t>e},o.greater.multiple=!1,o.lesser=function(t,e){return r.all.number(t,e)&&t<e},o.lesser.multiple=!1,o.numeric=function(t){return(r.number(t)||r.string(t))&&!isNaN(t-parseFloat(t))},o=i.create(o),t.exports=o},function(t,e,n){"use strict";t.exports=n(5)},function(t,e,n){"use strict";var r=n(2),i=n(0),o={};o._helpers=r;var u={Strings:n(6),Types:n(1),Numbers:n(3),Envs:n(7),Objects:n(10),Mixed:n(11),Arrays:n(12),Dates:n(13),Urls:n(14),Hashes:n(15),CreditCards:n(16),PostalCodes:n(17),DOM:n(18)};o.getVersion=function(){return u.Envs.commonjsEnv()?n(19).version:"1.1.2"},function(){for(var e in u)!function(t){if(u.hasOwnProperty(t)){for(var e in u[t])!function(e){u[t].hasOwnProperty(e)&&u.Types.function(u[t][e])&&(o[e]=function(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return u[t][e].apply(null,r)})}(e)}}(e);o=i.create(o);for(var n in u)u.hasOwnProperty(n)&&(o[n]=u[n]);t.exports=o}()},function(t,e,n){"use strict";var r=n(2),i=n(0),o=n(1),u={};u.camelCase=function(t){return o.string(t)&&!u.upperCase(t)&&u.alphanumeric(t)&&u.spaces(t.replace(/([A-Z])/g," $1"))},u.snakeCase=function(t){return u.lowerCase(t)&&/^[0-9a-z]*_[0-9a-z]/gi.test(t)},u.kebabCase=function(t){return u.lowerCase(t)&&/^[0-9a-z]*-[0-9a-z]/gi.test(t)},u.similarity=function(t,e,n){if(!o.all.string(t,e))return!1;(!o.number(n)||n<0||n>1)&&(n=1);var i=t,u=e;t.length<e.length&&(i=e,u=t);var a=i.length;return(a-r.getEditDistance(i,u))/parseFloat(a)>=n},u.similarity.multiple=!1,u.contains=function(t,e){return!!o.string(t)&&t.indexOf(e)>-1},u.contains.multiple=!1,u.lowerCase=function(t){return!!o.string(t)&&t.toLowerCase()===t},u.upperCase=function(t){return!!o.string(t)&&t.toUpperCase()===t},u.word=function(t){if(!o.string(t))return!1;var e=t.trim();return e.length>0&&1===e.split(" ").length},u.capitalized=function(t){if(!o.string(t))return!1;if(0===t.trim().length)return!1;var e=t.trim().split(" ");for(var n in e){var r=e[n].charAt(0);if(r!==r.toUpperCase())return!1}return!0},u.emptyString=function(t){return o.string(t)&&0===t.length},u.alphanumeric=function(t){return/^[a-z0-9]+$/i.test(t)&&o.string(t)},u.startWith=function(t,e,n){return o.falsy(n)&&(n=!1),new RegExp("^"+t,o.booleanTrue(n)?"i":"").test(e)},u.startWith.multiple=!1,u.palindrome=function(t){return!!o.string(t)&&(t=t.replace(/\s/g,"").toLowerCase())===t.split("").reverse().join("")},u.char=function(t){return o.string(t)&&1===t.length},u.space=function(t){return u.char(t)&&/\s/.test(t)},u.spaces=function(t){return/\s/.test(t)},u=i.create(u),t.exports=u},function(t,e,n){"use strict";(function(e){var r=n(2),i=n(0),o={};o.commonjsEnv=function(){return void 0!==e},o.commonjsEnv.multiple=!1,o.browserEnv=function(){return"undefined"!=typeof window},o.browserEnv.multiple=!1,o.amdEnv=function(){return n(9)},o.amdEnv.multiple=!1,o.ios=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return/iphone|ipad|ipod/i.test(r.getUserAgent.apply(void 0,e))},o.ios.multiple=!1,o.iphone=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return/iphone/i.test(r.getUserAgent.apply(void 0,e))},o.iphone.multiple=!1,o.ipad=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return/ipad/i.test(r.getUserAgent.apply(void 0,e))},o.ipad.multiple=!1,o.ipod=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return/ipod/i.test(r.getUserAgent.apply(void 0,e))},o.ipod.multiple=!1,o.android=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return/Android/i.test(r.getUserAgent.apply(void 0,e))},o.android.multiple=!1,o.navigator=function(){return o.browserEnv()&&void 0!==window.navigator},o.navigator.multiple=!1,o.firefox=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return/Firefox/i.test(r.getUserAgent.apply(void 0,e))},o.firefox.multiple=!1,o.chrome=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return/Chrome/i.test(r.getUserAgent.apply(void 0,e))},o.chrome.multiple=!1,o.safari=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];var i=r.getUserAgent.apply(void 0,e);return/Safari/i.test(i.replace("Chrome",""))&&!/Chrome/i.test(i.replace("Safari",""))},o.safari.multiple=!1,o.ie=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return/MSIE|Trident/i.test(r.getUserAgent.apply(void 0,e))},o.ie.multiple=!1,o.mac=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return/mac/i.test(r.getUserAgent.apply(void 0,e))},o.mac.multiple=!1,o.onLine=function(){return o.navigator()&&navigator.onLine},o.onLine.multiple=!1,o=i.create(o),t.exports=o}).call(e,n(8))},function(t,e,n){"use strict";function r(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function o(t){if(l===setTimeout)return setTimeout(t,0);if((l===r||!l)&&setTimeout)return l=setTimeout,setTimeout(t,0);try{return l(t,0)}catch(e){try{return l.call(null,t,0)}catch(e){return l.call(this,t,0)}}}function u(t){if(d===clearTimeout)return clearTimeout(t);if((d===i||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(t);try{return d(t)}catch(e){try{return d.call(null,t)}catch(e){return d.call(this,t)}}}function a(){v&&m&&(v=!1,m.length?g=m.concat(g):h=-1,g.length&&s())}function s(){if(!v){var t=o(a);v=!0;for(var e=g.length;e;){for(m=g,g=[];++h<e;)m&&m[h].run();h=-1,e=g.length}m=null,v=!1,u(t)}}function c(t,e){this.fun=t,this.array=e}function f(){}var l,d,p=t.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:r}catch(t){l=r}try{d="function"==typeof clearTimeout?clearTimeout:i}catch(t){d=i}}();var m,g=[],v=!1,h=-1;p.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];g.push(new c(t,e)),1!==g.length||v||o(s)},c.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=f,p.addListener=f,p.once=f,p.off=f,p.removeListener=f,p.removeAllListeners=f,p.emit=f,p.prependListener=f,p.prependOnceListener=f,p.listeners=function(t){return[]},p.binding=function(t){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(t){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},function(t,e){(function(e){t.exports=e}).call(e,{})},function(t,e,n){"use strict";var r=n(1),i=n(0),o={};o.propertyOf=function(t,e){return!!r.object(e)&&e.hasOwnProperty(t)},o.propertyOf.multiple=!1,o.propertyCount=function(t,e){if(!r.object(t)||!r.number(e))return!1;var n=0;for(var i in t)if(t.hasOwnProperty(i)&&++n>e)return!1;return n===e},o.propertyCount.multiple=!1,o=i.create(o),t.exports=o},function(t,e,n){"use strict";var r=n(1),i=n(0),o={};o.email=function(t){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(t)},o.hex=function(t){return/^(?:0x)?[a-f0-9]+$/.test(t)},o.hexColor=function(t){try{return t=t.replace("#",""),o.hex(t)&&(3===t.length||6===t.length)}catch(t){return!1}},o.ipv4=function(t){return/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(t)},o.ipv6=function(t){return/^(([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))$/.test(t)},o.ip=function(t){return o.ipv4(t)||o.ipv6(t)},o.base64=function(t){return/^([0-9a-zA-Z+\/]{4})*(([0-9a-zA-Z+\/]{2}==)|([0-9a-zA-Z+\/]{3}=))?$/.test(t)},o.semVer=function(t){return/^(\d*)\.(\d*)\.(\d*)(-(\d*|\d*[a-z-][0-9a-z-]*)(\.(\d*|\d*[a-z-][0-9a-z-]*))*)?(\+[0-9a-z-]+(\.[0-9a-z-]+)*)?$/i.test(t)},o.equal=function(t,e){return r.all.number(t,e)?t===e:r.all.string(t,e)||r.all.regexp(t,e)?t+""==""+e:!!r.all.boolean(t,e)&&t===e},o.equal.multiple=!1,o.fiscalCodeIT=function(t){return/^[A-Za-z]{6}[0-9]{2}[A-Za-z]{1}[0-9]{2}[A-Za-z]{1}[0-9]{3}[A-Za-z]{1}$/.test(t)},o.macAddress=function(t){return/^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$/.test(t)},o=i.create(o),t.exports=o},function(t,e,n){"use strict";var r=n(1),i=n(0),o={};o.inArray=function(t,e){if(!r.array(e))return!1;for(var n in e)if(e.hasOwnProperty(n)&&e[n]===t)return!0;return!1},o.inArray.multiple=!1,o=i.create(o),t.exports=o},function(t,e,n){"use strict";var r=n(1),i=n(3),o=n(0),u={},a=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],s=["january","february","march","april","may","june","july","august","september","october","november","december"];u.dateString=function(t){var e=Date.parse(t);return!isNaN(e)},u.timeString=function(t){return/^(?:(?:([01]?\d|2[0-3]):)?([0-5]?\d):)?([0-5]?\d)$/.test(t)},u.today=function(t){var e=new Date;return r.date(t)&&e.toDateString()===t.toDateString()},u.tomorrow=function(t){var e=new Date;return e.setDate(e.getDate()+1),r.date(t)&&e.toDateString()===t.toDateString()},u.yesterday=function(t){var e=new Date;return e.setDate(e.getDate()-1),r.date(t)&&e.toDateString()===t.toDateString()},u.past=function(t){var e=(new Date).getTime();return r.date(t)&&e>t.getTime()},u.future=function(t){return r.date(t)&&!u.past(t)},u.day=function(t,e){return r.date(t)&&r.string(e)&&a[t.getDay()]===e.toLowerCase()},u.day.multiple=!1,u.month=function(t,e){return r.date(t)&&r.string(e)&&s[t.getMonth()]===e.toLowerCase()},u.month.multiple=!1,u.year=function(t,e){return r.date(t)&&r.number(e)&&t.getFullYear()===e},u.year.multiple=!1,u.leapYear=function(t){return r.number(t)&&t%4==0&&t%100!=0||t%400==0},u.weekend=function(t){return u.day(t,"saturday")||u.day(t,"sunday")},u.weekday=function(t){return r.date(t)&&!u.weekend(t)},u.numberInWeek=function(t){return r.number(t)&&i.between(t,0,6)},u.dateBetween=function(t,e,n){return r.all.date(t,e,n)&&i.between(t.getTime(),e.getTime(),n.getTime())},u.dateBetween.multiple=!1,u.dayLightSavingTime=function(t){if(!r.date(t))return!1;var e=new Date(t.getFullYear(),0,1),n=new Date(t.getFullYear(),6,1),i=Math.max(e.getTimezoneOffset(),n.getTimezoneOffset());return t.getTimezoneOffset()<i},u=o.create(u),t.exports=u},function(t,e,n){"use strict";var r=n(0),i={};i.url=function(t){return/^(?:(?:https?|ftps?):\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,}))\.?)(?::\d{2,5})?(?:[\/?#]\S*)?$/i.test(t)},i.httpUrl=function(t){return i.url(t)&&/^http:/i.test(t)},i.httpsUrl=function(t){return i.url(t)&&/^https:/i.test(t)},i.urlEncoded=function(t){return/%[0-9a-f]{2}/i.test(t)},i.ftpUrl=function(t){return i.url(t)&&/^ftp:/i.test(t)},i.ftpsUrl=function(t){return i.url(t)&&/^ftps:/i.test(t)},i=r.create(i),t.exports=i},function(t,e,n){"use strict";var r=n(0),i={};i.md5=function(t){return/^[a-f0-9]{32}$/i.test(t)},i.sha1=function(t){return/^[a-f0-9]{40}$/i.test(t)},i=r.create(i),t.exports=i},function(t,e,n){"use strict";var r=n(0),i={};i.creditCard=function(t){return/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/.test(t)},i.amex=function(t){return/^3[47][0-9]{13}$/.test(t)},i.dinersClub=function(t){return/^3(?:0[0-5]|[68][0-9])[0-9]{11}$/.test(t)},i.discover=function(t){return/^6(?:011|5[0-9]{2})[0-9]{12}$/.test(t)},i.mastercard=function(t){return/^5[1-5][0-9]{14}$/.test(t)},i.visa=function(t){return/^4[0-9]{12}(?:[0-9]{3})?$/.test(t)},i=r.create(i),t.exports=i},function(t,e,n){"use strict";var r=n(0),i={};i.postalCodeES=function(t){return/^([1-9]{2}|[0-9][1-9]|[1-9][0-9])[0-9]{3}$/.test(t)},i.postalCodeUK=function(t){return/^[A-Z]{1,2}[0-9RCHNQ][0-9A-Z]?\s?[0-9][ABD-HJLNP-UW-Z]{2}$|^[A-Z]{2}-?[0-9]{4}$/.test(t)},i.postalCodeUS=function(t){return/(\d{5}([\-]\d{4})?)$/.test(t)},i.postalCodeIT=function(t){return/^\d{5}$/.test(t)},i.postalCodeDE=function(t){return/\b((?:0[1-46-9]\d{3})|(?:[1-357-9]\d{4})|(?:[4][0-24-9]\d{3})|(?:[6][013-9]\d{3}))\b/.test(t)},i.postalCodeNL=function(t){return/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(t)},i=r.create(i),t.exports=i},function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=n(0),o=n(1),u={};u.domElement=function(t){return"object"===("undefined"==typeof HTMLElement?"undefined":r(HTMLElement))?t instanceof HTMLElement:t&&"object"===(void 0===t?"undefined":r(t))&&1===t.nodeType&&"string"==typeof t.nodeName},u.domElementTag=function(t,e){return u.domElement(t)&&o.string(e)&&t.tagName.toLowerCase()===e.toLowerCase()},u.domElementTag.multiple=!1,u=i.create(u),t.exports=u},function(t,e){t.exports={name:"bejs",version:"1.1.2",description:"Simple, light-weight assertions framework for javascript",main:"index.js",scripts:{"version:major":"webpack --env.major && npm run-script doc && version-to-tag.sh && npm publish","version:minor":"webpack --env.minor && npm run-script doc && version-to-tag.sh && npm publish","version:patch":"webpack --env.patch && npm run-script doc && version-to-tag.sh && npm publish",build:"webpack --progress",doc:"jsdox -i -r -o docs src",test:"istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage"},keywords:["is","boolean","url","number","string","email","object","check","float","alphanumeric"],author:{name:"Fabio Ricali",email:"fabio@rica.li"},contributors:[{name:"Davide Polano",email:"info@mdslab.org"}],license:"MIT",devDependencies:{"babel-core":"^6.25.0","babel-loader":"^7.1.0","babel-preset-es2015":"^6.24.1",coveralls:"^2.13.1",istanbul:"^0.4.5",jsdom:"^11.0.0",jsdox:"^0.4.10",mocha:"^3.4.2","mocha-lcov-reporter":"^1.3.0","unminified-webpack-plugin":"^1.2.0",webpack:"^3.0.0","webpack-auto-inject-version":"^0.5.14"},repository:{type:"git",url:"https://github.com/fabioricali/beJS"}}}]); | ||
// [AIV] beJS Build version: 1.1.3 | ||
var be=function(t){function e(r){if(n[r])return n[r].exports;var i=n[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,e),i.l=!0,i.exports}var n={};return e.m=t,e.c=n,e.d=function(t,n,r){e.o(t,n)||Object.defineProperty(t,n,{configurable:!1,enumerable:!0,get:r})},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},e.p="",e(e.s=4)}([function(t,e,n){"use strict";var r=n(2),i={};i._isArray=function(t){return"[object Array]"===r.objectToString(t)},i.create=function(t){t.all={},t.any={},t.not={};for(var e in t)!function(e){t.hasOwnProperty(e)&&"function"==typeof t[e]&&(t.not[e]=function(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return!t[e].apply(void 0,r)},void 0===t[e].multiple&&(t.all[e]=function(){for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];var u=r;i._isArray(u[0])&&(u=u[0]);for(var a in u)if(u.hasOwnProperty(a)&&!t[e].call(void 0,u[a]))return!1;return!0},t.any[e]=function(){for(var n=arguments.length,r=Array(n),o=0;o<n;o++)r[o]=arguments[o];var u=r;i._isArray(u[0])&&(u=u[0]);for(var a in u)if(u.hasOwnProperty(a)&&t[e].call(void 0,u[a]))return!0;return!1}))}(e);return t},t.exports=i},function(t,e,n){"use strict";var r=n(2),i=n(0),o={};o.classOf=function(t,e){return r.objectToString(t).toLowerCase()==="[object "+e+"]".toLowerCase()},o.classOf.multiple=!1,o.boolean=function(t){return o.classOf(t,"boolean")},o.booleanFalse=function(t){return o.boolean(t)&&!1===t},o.booleanTrue=function(t){return o.boolean(t)&&!0===t},o.number=function(t){return o.classOf(t,"number")&&!isNaN(t)},o.string=function(t){return o.classOf(t,"string")},o.undefined=function(t){return o.classOf(t,"undefined")},o.null=function(t){return o.classOf(t,"null")},o.object=function(t){return o.classOf(t,"object")&&!o.array(t)},o.array=function(t){return o.classOf(t,"array")},o.json=function(t){try{return JSON.parse(t),!0}catch(t){return!1}},o.date=function(t){return o.classOf(t,"date")},o.function=function(t){return o.classOf(t,"function")},o.regexp=function(t){return o.classOf(t,"regexp")},o.sameType=function(t,e){return r.objectToString(t)===r.objectToString(e)},o.sameType.multiple=!1,o.empty=function(t){if(o.null(t)||o.undefined(t))return!0;if(o.number(t)||o.function(t)||o.boolean(t))return!1;if(o.object(t)||o.array(t)){if(t.length>0)return!1;if(0===t.length)return!0;for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))return!1}return!(o.string(t)&&t.length>0)},o.falsy=function(t){return!t},o.truthy=function(t){return!o.falsy(t)},o=i.create(o),t.exports=o},function(t,e,n){"use strict";var r={};r.getUserAgent=function(){if(arguments.length)return arguments.length<=0?void 0:arguments[0];if("undefined"==typeof window||void 0===window.navigator)throw new Error("test allowed only in browser environment");return navigator.userAgent},r.objectToString=function(t){return Object.prototype.toString.call(t)},r.getEditDistance=function(t,e){if(0===t.length)return e.length;if(0===e.length)return t.length;var n=[],r=void 0;for(r=0;r<=e.length;r++)n[r]=[r];var i=void 0;for(i=0;i<=t.length;i++)n[0][i]=i;for(r=1;r<=e.length;r++)for(i=1;i<=t.length;i++)e.charAt(r-1)===t.charAt(i-1)?n[r][i]=n[r-1][i-1]:n[r][i]=Math.min(n[r-1][i-1]+1,Math.min(n[r][i-1]+1,n[r-1][i]+1));return n[e.length][t.length]},r.mathSign=function(t){return t=+t,0===t||isNaN(t)?Number(t):t>0?1:-1},t.exports=r},function(t,e,n){"use strict";var r=n(1),i=n(0),o=(n(2),{});o.int=function(t){return r.number(t)&&isFinite(t)&&Math.floor(t)===t},o.float=function(t){return r.number(t)&&!o.int(t)},o.nan=function(t){return isNaN(t)},o.even=function(t){return r.number(t)&&t%2==0},o.odd=function(t){return r.number(t)&&!o.even(t)},o.positive=function(t){return r.number(t)&&(t>0||o.positiveZero(t))},o.negative=function(t){return r.number(t)&&(t<0||o.negativeZero(t))},o.negativeZero=function(t){return r.number(t)&&0===t&&1/t===Number.NEGATIVE_INFINITY},o.positiveZero=function(t){return r.number(t)&&0===t&&1/t===Number.POSITIVE_INFINITY},o.infinity=function(t){return o.infinityPositive(t)||o.infinityNegative(t)},o.infinityPositive=function(t){return t===Number.POSITIVE_INFINITY},o.infinityNegative=function(t){return t===Number.NEGATIVE_INFINITY},o.between=function(t,e,n){return r.all.number(t,e,n)&&t>=e&&t<=n},o.between.multiple=!1,o.greater=function(t,e){return r.all.number(t,e)&&t>e},o.greater.multiple=!1,o.lesser=function(t,e){return r.all.number(t,e)&&t<e},o.lesser.multiple=!1,o.numeric=function(t){return(r.number(t)||r.string(t))&&!isNaN(t-parseFloat(t))},o=i.create(o),t.exports=o},function(t,e,n){"use strict";t.exports=n(5)},function(t,e,n){"use strict";var r=n(2),i=n(0),o={};o._helpers=r;var u={Strings:n(6),Types:n(1),Numbers:n(3),Envs:n(7),Objects:n(10),Mixed:n(11),Arrays:n(12),Dates:n(13),Urls:n(14),Hashes:n(15),CreditCards:n(16),PostalCodes:n(17),DOM:n(18)};o.getVersion=function(){return u.Envs.commonjsEnv()?n(19).version:"1.1.3"},function(){for(var e in u)!function(t){if(u.hasOwnProperty(t)){for(var e in u[t])!function(e){u[t].hasOwnProperty(e)&&u.Types.function(u[t][e])&&(o[e]=function(){for(var n=arguments.length,r=Array(n),i=0;i<n;i++)r[i]=arguments[i];return u[t][e].apply(null,r)})}(e)}}(e);o=i.create(o);for(var n in u)u.hasOwnProperty(n)&&(o[n]=u[n]);t.exports=o}()},function(t,e,n){"use strict";var r=n(2),i=n(0),o=n(1),u={};u.camelCase=function(t){return o.string(t)&&!u.upperCase(t)&&u.alphanumeric(t)&&u.spaces(t.replace(/([A-Z])/g," $1"))},u.snakeCase=function(t){return u.lowerCase(t)&&/^[0-9a-z]*_[0-9a-z]/gi.test(t)},u.kebabCase=function(t){return u.lowerCase(t)&&/^[0-9a-z]*-[0-9a-z]/gi.test(t)},u.similarity=function(t,e,n){if(!o.all.string(t,e))return!1;(!o.number(n)||n<0||n>1)&&(n=1);var i=t,u=e;t.length<e.length&&(i=e,u=t);var a=i.length;return(a-r.getEditDistance(i,u))/parseFloat(a)>=n},u.similarity.multiple=!1,u.contains=function(t,e){return!!o.string(t)&&t.indexOf(e)>-1},u.contains.multiple=!1,u.lowerCase=function(t){return!!o.string(t)&&t.toLowerCase()===t},u.upperCase=function(t){return!!o.string(t)&&t.toUpperCase()===t},u.word=function(t){if(!o.string(t))return!1;var e=t.trim();return e.length>0&&1===e.split(" ").length},u.capitalized=function(t){if(!o.string(t))return!1;if(0===t.trim().length)return!1;var e=t.trim().split(" ");for(var n in e){var r=e[n].charAt(0);if(r!==r.toUpperCase())return!1}return!0},u.emptyString=function(t){return o.string(t)&&0===t.length},u.alphanumeric=function(t){return/^[a-z0-9]+$/i.test(t)&&o.string(t)},u.startWith=function(t,e,n){return o.falsy(n)&&(n=!1),new RegExp("^"+t,o.booleanTrue(n)?"i":"").test(e)},u.startWith.multiple=!1,u.palindrome=function(t){return!!o.string(t)&&(t=t.replace(/\s/g,"").toLowerCase())===t.split("").reverse().join("")},u.char=function(t){return o.string(t)&&1===t.length},u.space=function(t){return u.char(t)&&/\s/.test(t)},u.spaces=function(t){return/\s/.test(t)},u=i.create(u),t.exports=u},function(t,e,n){"use strict";(function(e){var r=n(2),i=n(0),o={};o.commonjsEnv=function(){return void 0!==e},o.commonjsEnv.multiple=!1,o.browserEnv=function(){return"undefined"!=typeof window},o.browserEnv.multiple=!1,o.amdEnv=function(){return n(9)},o.amdEnv.multiple=!1,o.ios=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return/iphone|ipad|ipod/i.test(r.getUserAgent.apply(void 0,e))},o.ios.multiple=!1,o.iphone=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return/iphone/i.test(r.getUserAgent.apply(void 0,e))},o.iphone.multiple=!1,o.ipad=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return/ipad/i.test(r.getUserAgent.apply(void 0,e))},o.ipad.multiple=!1,o.ipod=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return/ipod/i.test(r.getUserAgent.apply(void 0,e))},o.ipod.multiple=!1,o.android=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return/Android/i.test(r.getUserAgent.apply(void 0,e))},o.android.multiple=!1,o.navigator=function(){return o.browserEnv()&&void 0!==window.navigator},o.navigator.multiple=!1,o.firefox=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return/Firefox/i.test(r.getUserAgent.apply(void 0,e))},o.firefox.multiple=!1,o.chrome=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return/Chrome/i.test(r.getUserAgent.apply(void 0,e))},o.chrome.multiple=!1,o.safari=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];var i=r.getUserAgent.apply(void 0,e);return/Safari/i.test(i.replace("Chrome",""))&&!/Chrome/i.test(i.replace("Safari",""))},o.safari.multiple=!1,o.ie=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return/MSIE|Trident/i.test(r.getUserAgent.apply(void 0,e))},o.ie.multiple=!1,o.mac=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return/mac/i.test(r.getUserAgent.apply(void 0,e))},o.mac.multiple=!1,o.onLine=function(){return o.navigator()&&navigator.onLine},o.onLine.multiple=!1,o=i.create(o),t.exports=o}).call(e,n(8))},function(t,e,n){"use strict";function r(){throw new Error("setTimeout has not been defined")}function i(){throw new Error("clearTimeout has not been defined")}function o(t){if(l===setTimeout)return setTimeout(t,0);if((l===r||!l)&&setTimeout)return l=setTimeout,setTimeout(t,0);try{return l(t,0)}catch(e){try{return l.call(null,t,0)}catch(e){return l.call(this,t,0)}}}function u(t){if(d===clearTimeout)return clearTimeout(t);if((d===i||!d)&&clearTimeout)return d=clearTimeout,clearTimeout(t);try{return d(t)}catch(e){try{return d.call(null,t)}catch(e){return d.call(this,t)}}}function a(){v&&m&&(v=!1,m.length?g=m.concat(g):h=-1,g.length&&s())}function s(){if(!v){var t=o(a);v=!0;for(var e=g.length;e;){for(m=g,g=[];++h<e;)m&&m[h].run();h=-1,e=g.length}m=null,v=!1,u(t)}}function c(t,e){this.fun=t,this.array=e}function f(){}var l,d,p=t.exports={};!function(){try{l="function"==typeof setTimeout?setTimeout:r}catch(t){l=r}try{d="function"==typeof clearTimeout?clearTimeout:i}catch(t){d=i}}();var m,g=[],v=!1,h=-1;p.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];g.push(new c(t,e)),1!==g.length||v||o(s)},c.prototype.run=function(){this.fun.apply(null,this.array)},p.title="browser",p.browser=!0,p.env={},p.argv=[],p.version="",p.versions={},p.on=f,p.addListener=f,p.once=f,p.off=f,p.removeListener=f,p.removeAllListeners=f,p.emit=f,p.prependListener=f,p.prependOnceListener=f,p.listeners=function(t){return[]},p.binding=function(t){throw new Error("process.binding is not supported")},p.cwd=function(){return"/"},p.chdir=function(t){throw new Error("process.chdir is not supported")},p.umask=function(){return 0}},function(t,e){(function(e){t.exports=e}).call(e,{})},function(t,e,n){"use strict";var r=n(1),i=n(0),o={};o.propertyOf=function(t,e){return!!r.object(e)&&e.hasOwnProperty(t)},o.propertyOf.multiple=!1,o.propertyCount=function(t,e){if(!r.object(t)||!r.number(e))return!1;var n=0;for(var i in t)if(t.hasOwnProperty(i)&&++n>e)return!1;return n===e},o.propertyCount.multiple=!1,o=i.create(o),t.exports=o},function(t,e,n){"use strict";var r=n(1),i=n(0),o={};o.email=function(t){return/^(([^<>()\[\]\\.,;:\s@"]+(\.[^<>()\[\]\\.,;:\s@"]+)*)|(".+"))@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}])|(([a-zA-Z\-0-9]+\.)+[a-zA-Z]{2,}))$/.test(t)},o.hex=function(t){return/^(?:0x)?[a-f0-9]+$/.test(t)},o.hexColor=function(t){try{return t=t.replace("#",""),o.hex(t)&&(3===t.length||6===t.length)}catch(t){return!1}},o.ipv4=function(t){return/^(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.(25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$/.test(t)},o.ipv6=function(t){return/^(([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))$/.test(t)},o.ip=function(t){return o.ipv4(t)||o.ipv6(t)},o.base64=function(t){return/^([0-9a-zA-Z+\/]{4})*(([0-9a-zA-Z+\/]{2}==)|([0-9a-zA-Z+\/]{3}=))?$/.test(t)},o.semVer=function(t){return/^(\d*)\.(\d*)\.(\d*)(-(\d*|\d*[a-z-][0-9a-z-]*)(\.(\d*|\d*[a-z-][0-9a-z-]*))*)?(\+[0-9a-z-]+(\.[0-9a-z-]+)*)?$/i.test(t)},o.equal=function(t,e){return r.all.number(t,e)?t===e:r.all.string(t,e)||r.all.regexp(t,e)?t+""==""+e:!!r.all.boolean(t,e)&&t===e},o.equal.multiple=!1,o.fiscalCodeIT=function(t){return/^[A-Za-z]{6}[0-9]{2}[A-Za-z]{1}[0-9]{2}[A-Za-z]{1}[0-9]{3}[A-Za-z]{1}$/.test(t)},o.macAddress=function(t){return/^([0-9A-Fa-f]{2}[:-]){5}([0-9A-Fa-f]{2})$/.test(t)},o=i.create(o),t.exports=o},function(t,e,n){"use strict";var r=n(1),i=n(0),o={};o.inArray=function(t,e){if(!r.array(e))return!1;for(var n in e)if(e.hasOwnProperty(n)&&e[n]===t)return!0;return!1},o.inArray.multiple=!1,o=i.create(o),t.exports=o},function(t,e,n){"use strict";var r=n(1),i=n(3),o=n(0),u={},a=["sunday","monday","tuesday","wednesday","thursday","friday","saturday"],s=["january","february","march","april","may","june","july","august","september","october","november","december"];u.dateString=function(t){var e=Date.parse(t);return!isNaN(e)},u.timeString=function(t){return/^(?:(?:([01]?\d|2[0-3]):)?([0-5]?\d):)?([0-5]?\d)$/.test(t)},u.today=function(t){var e=new Date;return r.date(t)&&e.toDateString()===t.toDateString()},u.tomorrow=function(t){var e=new Date;return e.setDate(e.getDate()+1),r.date(t)&&e.toDateString()===t.toDateString()},u.yesterday=function(t){var e=new Date;return e.setDate(e.getDate()-1),r.date(t)&&e.toDateString()===t.toDateString()},u.past=function(t){var e=(new Date).getTime();return r.date(t)&&e>t.getTime()},u.future=function(t){return r.date(t)&&!u.past(t)},u.day=function(t,e){return r.date(t)&&r.string(e)&&a[t.getDay()]===e.toLowerCase()},u.day.multiple=!1,u.month=function(t,e){return r.date(t)&&r.string(e)&&s[t.getMonth()]===e.toLowerCase()},u.month.multiple=!1,u.year=function(t,e){return r.date(t)&&r.number(e)&&t.getFullYear()===e},u.year.multiple=!1,u.leapYear=function(t){return r.number(t)&&t%4==0&&t%100!=0||t%400==0},u.weekend=function(t){return u.day(t,"saturday")||u.day(t,"sunday")},u.weekday=function(t){return r.date(t)&&!u.weekend(t)},u.numberInWeek=function(t){return r.number(t)&&i.between(t,0,6)},u.dateBetween=function(t,e,n){return r.all.date(t,e,n)&&i.between(t.getTime(),e.getTime(),n.getTime())},u.dateBetween.multiple=!1,u.dayLightSavingTime=function(t){if(!r.date(t))return!1;var e=new Date(t.getFullYear(),0,1),n=new Date(t.getFullYear(),6,1),i=Math.max(e.getTimezoneOffset(),n.getTimezoneOffset());return t.getTimezoneOffset()<i},u=o.create(u),t.exports=u},function(t,e,n){"use strict";var r=n(0),i={};i.url=function(t){return/^(?:(?:https?|ftps?):\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)(?:\.(?:[a-z\u00a1-\uffff0-9]-*)*[a-z\u00a1-\uffff0-9]+)*(?:\.(?:[a-z\u00a1-\uffff]{2,}))\.?)(?::\d{2,5})?(?:[\/?#]\S*)?$/i.test(t)},i.httpUrl=function(t){return i.url(t)&&/^http:/i.test(t)},i.httpsUrl=function(t){return i.url(t)&&/^https:/i.test(t)},i.urlEncoded=function(t){return/%[0-9a-f]{2}/i.test(t)},i.ftpUrl=function(t){return i.url(t)&&/^ftp:/i.test(t)},i.ftpsUrl=function(t){return i.url(t)&&/^ftps:/i.test(t)},i=r.create(i),t.exports=i},function(t,e,n){"use strict";var r=n(0),i={};i.md5=function(t){return/^[a-f0-9]{32}$/i.test(t)},i.sha1=function(t){return/^[a-f0-9]{40}$/i.test(t)},i=r.create(i),t.exports=i},function(t,e,n){"use strict";var r=n(0),i={};i.creditCard=function(t){return/^(?:(4[0-9]{12}(?:[0-9]{3})?)|(5[1-5][0-9]{14})|(6(?:011|5[0-9]{2})[0-9]{12})|(3[47][0-9]{13})|(3(?:0[0-5]|[68][0-9])[0-9]{11})|((?:2131|1800|35[0-9]{3})[0-9]{11}))$/.test(t)},i.amex=function(t){return/^3[47][0-9]{13}$/.test(t)},i.dinersClub=function(t){return/^3(?:0[0-5]|[68][0-9])[0-9]{11}$/.test(t)},i.discover=function(t){return/^6(?:011|5[0-9]{2})[0-9]{12}$/.test(t)},i.mastercard=function(t){return/^5[1-5][0-9]{14}$/.test(t)},i.visa=function(t){return/^4[0-9]{12}(?:[0-9]{3})?$/.test(t)},i=r.create(i),t.exports=i},function(t,e,n){"use strict";var r=n(0),i={};i.postalCodeES=function(t){return/^([1-9]{2}|[0-9][1-9]|[1-9][0-9])[0-9]{3}$/.test(t)},i.postalCodeUK=function(t){return/^[A-Z]{1,2}[0-9RCHNQ][0-9A-Z]?\s?[0-9][ABD-HJLNP-UW-Z]{2}$|^[A-Z]{2}-?[0-9]{4}$/.test(t)},i.postalCodeUS=function(t){return/(\d{5}([\-]\d{4})?)$/.test(t)},i.postalCodeIT=function(t){return/^\d{5}$/.test(t)},i.postalCodeDE=function(t){return/\b((?:0[1-46-9]\d{3})|(?:[1-357-9]\d{4})|(?:[4][0-24-9]\d{3})|(?:[6][013-9]\d{3}))\b/.test(t)},i.postalCodeNL=function(t){return/^[1-9][0-9]{3}\s?[a-zA-Z]{2}$/.test(t)},i=r.create(i),t.exports=i},function(t,e,n){"use strict";var r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i=n(0),o=n(1),u={};u.domElement=function(t){return"object"===("undefined"==typeof HTMLElement?"undefined":r(HTMLElement))?t instanceof HTMLElement:t&&"object"===(void 0===t?"undefined":r(t))&&1===t.nodeType&&"string"==typeof t.nodeName},u.domElementTag=function(t,e){return u.domElement(t)&&o.string(e)&&t.tagName.toLowerCase()===e.toLowerCase()},u.domElementTag.multiple=!1,u=i.create(u),t.exports=u},function(t,e){t.exports={name:"bejs",version:"1.1.3",description:"Simple, light-weight assertions framework for javascript",main:"index.js",scripts:{"version:major":"webpack --env.major && npm run-script doc && version-to-tag.sh && npm publish","version:minor":"webpack --env.minor && npm run-script doc && version-to-tag.sh && npm publish","version:patch":"webpack --env.patch && npm run-script doc && version-to-tag.sh && npm publish",build:"webpack --progress",doc:"jsdox -i -r -o docs src",test:"istanbul cover ./node_modules/mocha/bin/_mocha --report lcovonly -- -R spec && cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js && rm -rf ./coverage"},keywords:["is","boolean","url","number","string","email","object","check","float","alphanumeric"],author:{name:"Fabio Ricali",email:"fabio@rica.li"},contributors:[{name:"Davide Polano",email:"info@mdslab.org"}],license:"MIT",devDependencies:{"babel-core":"^6.25.0","babel-loader":"^7.1.0","babel-preset-es2015":"^6.24.1",coveralls:"^2.13.1",istanbul:"^0.4.5",jsdom:"^11.0.0",jsdox:"^0.4.10",mocha:"^3.4.2","mocha-lcov-reporter":"^1.3.0","unminified-webpack-plugin":"^1.2.0",webpack:"^3.0.0","webpack-auto-inject-version":"^0.5.14"},repository:{type:"git",url:"https://github.com/fabioricali/beJS"}}}]); |
@@ -390,2 +390,7 @@ Functions | ||
###[negativeZero](numbers.md): | ||
Check if is negative zero (in [..\src\asserts\numbers.js](..\src\asserts\numbers.js)) | ||
###[null](types.md): | ||
@@ -446,2 +451,7 @@ Check if is null **Interfaces**: `all`, `any`, `not` (in [..\src\asserts\types.js](..\src\asserts\types.js)) | ||
###[positiveZero](numbers.md): | ||
Check if is negative zero (in [..\src\asserts\numbers.js](..\src\asserts\numbers.js)) | ||
###[postalCodeDE](postalCodes.md): | ||
@@ -448,0 +458,0 @@ Check if is an DE postal code **Interfaces**: `all`, `any`, `not` (in [..\src\asserts\postalCodes.js](..\src\asserts\postalCodes.js)) |
@@ -121,2 +121,34 @@ # be | ||
### be.negativeZero(value) | ||
Check if is negative zero | ||
**Parameters** | ||
**value**: `number`, number | ||
**Returns**: `boolean` | ||
**Example**: | ||
```js | ||
be.negativeZero(-0) // true be.negativeZero(0) // false | ||
``` | ||
### be.positiveZero(value) | ||
Check if is negative zero | ||
**Parameters** | ||
**value**: `number`, number | ||
**Returns**: `boolean` | ||
**Example**: | ||
```js | ||
be.positiveZero(+0) // true be.positiveZero(0) // true | ||
``` | ||
### be.infinity(value) | ||
@@ -123,0 +155,0 @@ |
{ | ||
"name": "bejs", | ||
"version": "1.1.2", | ||
"version": "1.1.3", | ||
"description": "Simple, light-weight assertions framework for javascript", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -102,3 +102,3 @@ /** | ||
Numbers.positive = (value) => { | ||
return Types.number(value) && (value > 0 || (value === 0 && 1 / value === Infinity)); | ||
return Types.number(value) && (value > 0 || Numbers.positiveZero(value)); | ||
}; | ||
@@ -118,6 +118,30 @@ | ||
Numbers.negative = (value) => { | ||
return Types.number(value) && (value < 0 || (value === 0 && 1 / value === -Infinity)); | ||
return Types.number(value) && (value < 0 || Numbers.negativeZero(value)); | ||
}; | ||
/** | ||
* Check if is negative zero | ||
* @param value {number} number | ||
* @returns {boolean} | ||
* @example | ||
* be.negativeZero(-0) // true | ||
* be.negativeZero(0) // false | ||
*/ | ||
Numbers.negativeZero = (value) => { | ||
return Types.number(value) && value === 0 && 1 / value === Number.NEGATIVE_INFINITY; | ||
}; | ||
/** | ||
* Check if is negative zero | ||
* @param value {number} number | ||
* @returns {boolean} | ||
* @example | ||
* be.positiveZero(+0) // true | ||
* be.positiveZero(0) // true | ||
*/ | ||
Numbers.positiveZero = (value) => { | ||
return Types.number(value) && value === 0 && 1 / value === Number.POSITIVE_INFINITY; | ||
}; | ||
/** | ||
* Check if number is infinity | ||
@@ -124,0 +148,0 @@ * |
@@ -321,2 +321,33 @@ /** | ||
}); | ||
}); | ||
describe('negativeZero', function () { | ||
it('-0, should be return true', function () { | ||
var result = be.negativeZero(-0); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
it('0, should be return false', function () { | ||
var result = be.negativeZero(0); | ||
console.log(result); | ||
assert.equal(result, false); | ||
}); | ||
}); | ||
describe('positiveZero', function () { | ||
it('0, should be return true', function () { | ||
var result = be.positiveZero(0); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
it('+0, should be return true', function () { | ||
var result = be.positiveZero(+0); | ||
console.log(result); | ||
assert.equal(result, true); | ||
}); | ||
it('-0, should be return false', function () { | ||
var result = be.positiveZero(-0); | ||
console.log(result); | ||
assert.equal(result, false); | ||
}); | ||
}); |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
484667
7059