Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bejs

Package Overview
Dependencies
Maintainers
2
Versions
35
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bejs - npm Package Compare versions

Comparing version 1.2.0 to 1.2.1

.jsdoc.json

4

dist/be.min.js

@@ -1,2 +0,2 @@

// [AIV] beJS Build version: 1.2.0
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.error=function(t){return o.classOf(t,"error")},o.argument=function(t){return o.classOf(t,"arguments")||o.object(t)&&"callee"in 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]},t.exports=r},function(t,e,n){"use strict";var r=n(1),i=n(0),o={};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.2.0"},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.2.0",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.2.1
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;if(i._isArray(u[0])&&(u=u[0]),!u.length)return!1;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.error=function(t){return o.classOf(t,"error")},o.argument=function(t){return o.classOf(t,"arguments")||o.object(t)&&"callee"in 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]},t.exports=r},function(t,e,n){"use strict";var r=n(1),i=n(0),o={};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.2.1"},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.arrayOfStrings=function(t){return r.all.string(t)},o.arrayOfObjects=function(t){return r.all.object(t)},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.2.1",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:"./node_modules/.bin/jsdoc --configure .jsdoc.json --verbose",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:["asserts","test","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",jsdoc:"^3.4.3",jsdom:"^11.0.0",minami:"^1.2.3",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"}}}]);
{
"name": "bejs",
"version": "1.2.0",
"version": "1.2.1",
"description": "Simple, light-weight assertions framework for javascript",

@@ -11,6 +11,8 @@ "main": "index.js",

"build": "webpack --progress",
"doc": "jsdox -i -r -o docs src",
"doc": "./node_modules/.bin/jsdoc --configure .jsdoc.json --verbose",
"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": [
"asserts",
"test",
"is",

@@ -44,4 +46,5 @@ "boolean",

"istanbul": "^0.4.5",
"jsdoc": "^3.4.3",
"jsdom": "^11.0.0",
"jsdox": "^0.4.10",
"minami": "^1.2.3",
"mocha": "^3.4.2",

@@ -48,0 +51,0 @@ "mocha-lcov-reporter": "^1.3.0",

@@ -1,2 +0,2 @@

![beJS](extra/logo.png?1)
![beJS](https://raw.githubusercontent.com/fabioricali/beJS/master/extra/logo.png)

@@ -53,20 +53,5 @@ ***to be, or not to be, that is the question***

## Documentation
See [https://be.js.org](https://be.js.org/)
## Docs
- [API](docs/be.md)
- [Arrays](docs/arrays.md)
- [Dates](docs/dates.md)
- [Envs](docs/envs.md)
- [Hashes](docs/hashes.md)
- [Mixed](docs/mixed.md)
- [Numbers](docs/numbers.md)
- [Objects](docs/objects.md)
- [Strings](docs/strings.md)
- [Types](docs/types.md)
- [Urls](docs/urls.md)
- [CreditCards](docs/creditCards.md)
- [PostalCodes](docs/postalCodes.md)
- [DOM](docs/dom.md)
## License

@@ -73,0 +58,0 @@ beJS is open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT)

/**
* @module be
* @description Arrays checks.
* @fileOverview Arrays checks.
* @module Array
*/

@@ -13,13 +13,15 @@

*
* **Interfaces**: `not`
* **Interface**: `not`
*
* @param value {Mixed} element to search
* @param array {array} array where search
* @returns {boolean}
* @function
* @name inArray
* @return {boolean}
* @example
* be.inArray('hello', ['hello', 'world']) //true
* be.inArray('ciao', ['hello', 'world']) //false
* be.inArray(1, true) //false
* be.not.inArray(1, true) //true
* be.Arrays.inArray(1, [1, 2, 3]) //true
* be.inArray('hello', ['hello', 'world']) //true
* be.inArray('ciao', ['hello', 'world']) //false
* be.inArray(1, true) //false
* be.not.inArray(1, true) //true
* be.Arrays.inArray(1, [1, 2, 3]) //true
*/

@@ -37,4 +39,45 @@ Arrays.inArray = (value, array) => {

/**
* Check if is an array of strings
*
* **Interfaces**: `all`, `any`, `not`
*
* @param value {array} array
* @function
* @name arrayOfStrings
* @returns {*|boolean}
* @example
* be.arrayOfStrings(['hello', 'world']) // true
* be.all.arrayOfStrings([
* ['hello', 'world'],
* ['ciao', 'mondo']
* ]) // true
*/
Arrays.arrayOfStrings = (value) => {
return Types.all.string(value);
};
/**
* Check if is an array of objects
*
* **Interfaces**: `all`, `any`, `not`
*
* @function
* @name arrayOfObjects
* @param value {array} array
* @returns {*|boolean}
* @example
* be.arrayOfObjects({a:1},{b:2}) // true
* be.all.arrayOfObjects([
* {a: 1},
* {b: 2},
* [1, 2, 3]
* ]) // false
*/
Arrays.arrayOfObjects = (value) => {
return Types.all.object(value);
};
Arrays = Interface.create(Arrays);
module.exports = Arrays;
/**
* @module be
* @description Credit cards checks.
* @fileOverview Credit cards checks.
* @module creditCard
*/

@@ -14,2 +14,4 @@

*
* @function
* @name creditCard
* @param value {string} version string

@@ -29,2 +31,4 @@ * @returns {boolean}

*
* @function
* @name amex
* @param value {string} version string

@@ -44,2 +48,4 @@ * @returns {boolean}

*
* @function
* @name dinersClub
* @param value {string} version string

@@ -59,2 +65,4 @@ * @returns {boolean}

*
* @function
* @name discover
* @param value {string} version string

@@ -74,2 +82,4 @@ * @returns {boolean}

*
* @function
* @name mastercard
* @param value {string} version string

@@ -89,2 +99,4 @@ * @returns {boolean}

*
* @function
* @name visa
* @param value {string} version string

@@ -91,0 +103,0 @@ * @returns {boolean}

/**
* @module be
* @description Dates checks.
* @fileOverview Dates checks.
* @module Dates
*/

@@ -41,2 +41,4 @@

*
* @function
* @name dateString
* @param value {string} string date

@@ -58,2 +60,4 @@ * @returns {boolean}

*
* @function
* @name timeString
* @param value {string} string time

@@ -73,2 +77,4 @@ * @returns {boolean}

*
* @function
* @name today
* @param date {Date} date object

@@ -89,2 +95,4 @@ * @returns {boolean}

*
* @function
* @name tomorrow
* @param date {Date} date object

@@ -108,2 +116,4 @@ * @returns {boolean}

*
* @function
* @name yesterday
* @param date {Date} date object

@@ -127,2 +137,4 @@ * @returns {boolean}

*
* @function
* @name past
* @param date {Date} date object

@@ -143,2 +155,4 @@ * @returns {boolean}

*
* @function
* @name future
* @param date {Date} date object

@@ -161,2 +175,4 @@ * @returns {boolean}

*
* @function
* @name day
* @param date {Date} date object

@@ -183,2 +199,4 @@ * @param day {string} day can be 'sunday','monday','tuesday','wednesday','thursday','friday','saturday'

*
* @function
* @name month
* @param date {Date} date object

@@ -205,2 +223,4 @@ * @param month {string} month can be 'january', 'february', 'march', 'april', 'may', 'june', 'july', 'august', 'september', 'october', 'november', 'december'

*
* @function
* @name year
* @param date {Date} date object

@@ -226,2 +246,4 @@ * @param year {number} year

*
* @function
* @name leapYear
* @param year {number} year

@@ -247,2 +269,4 @@ * @returns {boolean}

*
* @function
* @name weekend
* @param date {Date} date object

@@ -265,2 +289,4 @@ * @returns {boolean}

*
* @function
* @name weekday
* @param date {Date} date object

@@ -280,2 +306,4 @@ * @returns {boolean}

* Check if number is in week, between 0 and 6
* @function
* @name numberInWeek
* @param number {number} number

@@ -297,2 +325,4 @@ * @returns {boolean}

*
* @function
* @name dateBetween
* @param date {Date} date object

@@ -318,2 +348,4 @@ * @param startDate {Date} start date object

*
* @function
* @name dayLightSavingTime
* @param date {Date} date object

@@ -335,2 +367,2 @@ * @returns {boolean}

module.exports = Dates;
module.exports = Dates;
/**
* @module be
* @description DOM checks.
* @fileOverview DOM checks.
* @module DOM
*/

@@ -15,2 +15,4 @@

*
* @function
* @name domElement
* @param element {object} element object

@@ -33,2 +35,4 @@ * @returns {boolean}

*
* @function
* @name domElementTag
* @param element {object} element object

@@ -35,0 +39,0 @@ * @param tag {string} tag name

/**
* @module be
* @description Environments checks.
* @fileOverview Environments checks.
* @module Envs
*/

@@ -15,2 +15,4 @@

*
* @function
* @name commonjsEnv
* @returns {boolean}

@@ -31,2 +33,4 @@ * @example

*
* @function
* @name browserEnv
* @returns {boolean}

@@ -47,2 +51,4 @@ * @example

*
* @function
* @name amdEnv
* @returns {boolean}

@@ -63,2 +69,4 @@ * @example

*
* @function
* @name ios
* @returns {boolean}

@@ -80,2 +88,4 @@ * @example

*
* @function
* @name iphone
* @returns {boolean}

@@ -97,2 +107,4 @@ * @example

*
* @function
* @name ipad
* @returns {boolean}

@@ -114,2 +126,4 @@ * @example

*
* @function
* @name ipod
* @returns {boolean}

@@ -131,2 +145,4 @@ * @example

*
* @function
* @name android
* @returns {boolean}

@@ -148,2 +164,4 @@ * @example

*
* @function
* @name navigator
* @returns {boolean}

@@ -164,2 +182,4 @@ * @example

*
* @function
* @name firefox
* @returns {boolean}

@@ -181,2 +201,4 @@ * @example

*
* @function
* @name chrome
* @returns {boolean}

@@ -198,2 +220,4 @@ * @example

*
* @function
* @name safari
* @returns {boolean}

@@ -216,2 +240,4 @@ * @example

*
* @function
* @name userAgent
* @returns {boolean}

@@ -233,2 +259,4 @@ * @example

*
* @function
* @name mac
* @returns {boolean}

@@ -250,2 +278,4 @@ * @example

*
* @function
* @name online
* @returns {boolean}

@@ -263,2 +293,2 @@ * @example

module.exports = Envs;
module.exports = Envs;
/**
* @module be
* @description Hashes checks.
* @fileOverview Hashes checks.
* @module Hashes
*/

@@ -14,2 +14,4 @@

*
* @function
* @name md5
* @param value {string} hash string

@@ -30,2 +32,4 @@ * @returns {boolean}

*
* @function
* @name sha1
* @param value {string} hash string

@@ -43,2 +47,2 @@ * @returns {boolean}

module.exports = Hashes;
module.exports = Hashes;
/**
* @module be
* @description Various checks.
* @fileOverview Various checks.
* @module Mixed
*/

@@ -12,6 +12,7 @@

* Check if is valid email
*
* https://emailregex.com/
* **Interfaces**: `all`, `any`, `not`
*
* @link https://emailregex.com/
* @function
* @name email
* @param value {string} email

@@ -32,2 +33,4 @@ * @returns {boolean}

*
* @function
* @name hex
* @param value {string} hex string

@@ -47,2 +50,4 @@ * @returns {boolean}

*
* @function
* @name hexColor
* @param value {string} hex color string

@@ -68,2 +73,4 @@ * @returns {boolean}

*
* @function
* @name ipv4
* @param value {string} ip string

@@ -83,2 +90,4 @@ * @returns {boolean}

*
* @function
* @name ipv6
* @param value {string} ip string

@@ -98,2 +107,4 @@ * @returns {boolean}

*
* @function
* @name ipv
* @param value {string} ip string

@@ -113,2 +124,4 @@ * @returns {boolean}

*
* @function
* @name base64
* @param value {string} base64 string

@@ -128,2 +141,4 @@ * @returns {boolean}

*
* @function
* @name semVer
* @param value {string} version string

@@ -143,2 +158,4 @@ * @returns {boolean}

*
* @function
* @name equal
* @param value {Number|String|Boolean|RegExp} first

@@ -170,2 +187,4 @@ * @param other {Number|String|Boolean|RegExp} second

*
* @function
* @name fiscalCodeIT
* @param value {string} code string

@@ -185,2 +204,4 @@ * @returns {boolean}

*
* @function
* @name macAddress
* @param value {string} MAC string

@@ -187,0 +208,0 @@ * @returns {boolean}

/**
* @module be
* @description Numbers checks.
* @fileOverview Numbers checks.
* @module Numbers
*/

@@ -16,2 +16,4 @@

*
* @function
* @name int
* @param value {number} number

@@ -35,2 +37,4 @@ * @returns {boolean}

*
* @function
* @name float
* @param value {number} number

@@ -52,2 +56,4 @@ * @returns {boolean}

*
* @function
* @name nan
* @param value {number} number

@@ -67,2 +73,4 @@ * @returns {boolean}

*
* @function
* @name even
* @param value {number} number

@@ -83,2 +91,4 @@ * @returns {boolean}

*
* @function
* @name odd
* @param value {number} number

@@ -99,2 +109,4 @@ * @returns {boolean}

*
* @function
* @name positive
* @param value {number} number

@@ -115,2 +127,4 @@ * @returns {boolean}

*
* @function
* @name negative
* @param value {number} number

@@ -131,2 +145,4 @@ * @returns {boolean}

*
* @function
* @name negativeZero
* @param value {number} number

@@ -147,2 +163,4 @@ * @returns {boolean}

*
* @function
* @name positiveZero
* @param value {number} number

@@ -163,2 +181,4 @@ * @returns {boolean}

*
* @function
* @name infinity
* @param value {number} number

@@ -178,2 +198,4 @@ * @returns {boolean}

*
* @function
* @name infinityPositive
* @param value {number} number

@@ -194,2 +216,4 @@ * @returns {boolean}

*
* @function
* @name infinityNegative
* @param value {number} number

@@ -210,2 +234,4 @@ * @returns {boolean}

*
* @function
* @name between
* @param num {number} number

@@ -229,2 +255,4 @@ * @param min {number} number min

*
* @function
* @name greater
* @param value {number} value to check

@@ -248,2 +276,4 @@ * @param num {number} number target

*
* @function
* @name lesser
* @param value {number} value to check

@@ -267,2 +297,4 @@ * @param num {number} number target

*
* @function
* @name numeric
* @param value {number} number

@@ -280,2 +312,2 @@ * @returns {boolean}

module.exports = Numbers;
module.exports = Numbers;
/**
* @module be
* @description Objects checks.
* @fileOverview Objects checks.
* @module Objects
*/

@@ -15,2 +15,4 @@

*
* @function
* @name propertyOf
* @param value {Mixed} property that you want to search

@@ -34,2 +36,4 @@ * @param object {Object} object target

*
* @function
* @name propertyCount
* @param object {Object} object

@@ -55,2 +59,2 @@ * @param value {Integer} count

module.exports = Objects;
module.exports = Objects;
/**
* @module be
* @description Postal codes checks.
* @fileOverview Postal codes checks.
* @module postalCodes
*/

@@ -14,2 +14,4 @@

*
* @function
* @name postalCodeES
* @param value {string} version string

@@ -29,2 +31,4 @@ * @returns {boolean}

*
* @function
* @name postalCodeUK
* @param value {string} version string

@@ -44,2 +48,4 @@ * @returns {boolean}

*
* @function
* @name postalCodeUS
* @param value {string} version string

@@ -59,2 +65,4 @@ * @returns {boolean}

*
* @function
* @name postalCodeIT
* @param value {string} version string

@@ -74,2 +82,4 @@ * @returns {boolean}

*
* @function
* @name postalCodeDE
* @param value {string} version string

@@ -89,2 +99,4 @@ * @returns {boolean}

*
* @function
* @name postalCodeNL
* @param value {string} version string

@@ -91,0 +103,0 @@ * @returns {boolean}

/**
* @module be
* @description Strings checks.
* @fileOverview Strings checks.
* @module Strings
*/

@@ -17,2 +17,4 @@

*
* @function
* @name camelCase
* @param value {string} string

@@ -36,2 +38,4 @@ * @returns {boolean}

*
* @function
* @name snakeCase
* @param value {string} string

@@ -53,2 +57,4 @@ * @returns {boolean}

*
* @function
* @name kebabCase
* @param value {string} string

@@ -70,2 +76,4 @@ * @returns {boolean}

*
* @function
* @name similarity
* @param string1 {string} string

@@ -106,2 +114,4 @@ * @param string2 {string} string target

*
* @function
* @name contains
* @param string {string} string

@@ -125,2 +135,4 @@ * @param value {string} string target

*
* @function
* @name lowerCase
* @param value {string} string

@@ -141,2 +153,4 @@ * @returns {boolean}

*
* @function
* @name upperCase
* @param value {string} string

@@ -157,2 +171,4 @@ * @returns {boolean}

*
* @function
* @name word
* @param value {string} string

@@ -175,2 +191,4 @@ * @returns {boolean}

*
* @function
* @name capitalized
* @param value {string} string

@@ -200,2 +218,4 @@ * @returns {boolean}

*
* @function
* @name emptyString
* @param value {string} string

@@ -215,2 +235,4 @@ * @returns {boolean}

*
* @function
* @name alphanumeric
* @param value {string} string

@@ -231,2 +253,4 @@ * @returns {boolean}

*
* @function
* @name startWith
* @param value {string} start string

@@ -253,2 +277,4 @@ * @param string {string} string target

*
* @function
* @name palindrome
* @param value {string} string

@@ -270,2 +296,4 @@ * @returns {boolean}

*
* @function
* @name char
* @param value {string} string

@@ -286,2 +314,4 @@ * @returns {boolean}

*
* @function
* @name space
* @param value {string} string

@@ -302,2 +332,4 @@ * @returns {boolean}

*
* @function
* @name spaces
* @param value {string} string

@@ -315,2 +347,2 @@ * @returns {boolean}

module.exports = Strings;
module.exports = Strings;
/**
* @module be
* @description Types checks.
* @fileOverview Types checks.
* @module Types
*/

@@ -15,2 +15,4 @@

*
* @function
* @name classOf
* @param object {Mixed} object

@@ -38,2 +40,4 @@ * @param className {string} class name

*
* @function
* @name boolean
* @param value {Mixed} value

@@ -54,2 +58,4 @@ * @returns {boolean}

*
* @function
* @name booleanFalse
* @param value {Mixed} value

@@ -70,2 +76,4 @@ * @returns {boolean}

*
* @function
* @name booleanTrue
* @param value {Mixed} value

@@ -86,2 +94,4 @@ * @returns {boolean}

*
* @function
* @name number
* @param value {Mixed} value

@@ -102,2 +112,4 @@ * @returns {boolean}

*
* @function
* @name string
* @param value {Mixed} value

@@ -118,2 +130,4 @@ * @returns {boolean}

*
* @function
* @name undefined
* @param value {Mixed} value

@@ -134,2 +148,4 @@ * @returns {boolean}

*
* @function
* @name null
* @alias null

@@ -166,2 +182,4 @@ * @param value {Mixed} value

*
* @function
* @name array
* @param value {Mixed} value

@@ -182,2 +200,4 @@ * @returns {boolean}

*
* @function
* @name json
* @param value {Mixed} json string

@@ -203,2 +223,4 @@ * @returns {boolean}

*
* @function
* @name date
* @param value {Mixed} date object

@@ -219,2 +241,4 @@ * @returns {boolean}

*
* @function
* @name function
* @alias function

@@ -236,2 +260,4 @@ * @param value {Mixed} value

*
* @function
* @name regexp
* @param value {Mixed} value

@@ -253,2 +279,4 @@ * @returns {boolean}

*
* @function
* @name sameType
* @param value {Mixed} first

@@ -272,2 +300,4 @@ * @param other {Mixed} second

*
* @function
* @name empty
* @param value {Mixed} value

@@ -299,6 +329,7 @@ * @returns {boolean}

* Check if a falsy value
*
* https://developer.mozilla.org/it/docs/Glossary/Falsy
* **Interfaces**: `all`, `any`, `not`
*
* @link https://developer.mozilla.org/it/docs/Glossary/Falsy
* @function
* @name falsy
* @param value {Mixed} value

@@ -319,6 +350,7 @@ * @returns {boolean}

* Check if a truthy value
*
* https://developer.mozilla.org/en-US/docs/Glossary/Truthy
* **Interfaces**: `all`, `any`, `not`
*
* @link https://developer.mozilla.org/en-US/docs/Glossary/Truthy
* @function
* @name truthy
* @param value {Mixed}

@@ -344,2 +376,4 @@ * @returns {boolean}

*
* @function
* @name error
* @param value {Mixed} value

@@ -360,2 +394,4 @@ * @returns {boolean}

*
* @function
* @name argument
* @param value {Mixed} value

@@ -373,2 +409,2 @@ * @returns {boolean}

module.exports = Types;
module.exports = Types;
/**
* @module be
* @description Urls checks.
* @fileOverview Urls checks.
* @module Urls
*/

@@ -14,3 +14,4 @@

*
* @link https://gist.github.com/dperini/729294
* @function
* @name url
* @param value {string} url

@@ -33,2 +34,4 @@ * @returns {boolean}

*
* @function
* @name httpUrl
* @param value {string} url

@@ -51,2 +54,4 @@ * @returns {boolean}

*
* @function
* @name httpsUrl
* @param value {string} url

@@ -69,2 +74,4 @@ * @returns {boolean}

*
* @function
* @name urlEncoded
* @param value {string} url encoded

@@ -84,2 +91,4 @@ * @returns {boolean}

*
* @function
* @name ftpUrl
* @param value {string} url

@@ -102,2 +111,4 @@ * @returns {boolean}

*
* @function
* @name ftpsUrl
* @param value {string} url

@@ -117,2 +128,2 @@ * @returns {boolean}

module.exports = Urls;
module.exports = Urls;

@@ -38,2 +38,5 @@ /**

args = args[0];
if(!args.length) return false;
for (let a in args) {

@@ -50,2 +53,3 @@ if (args.hasOwnProperty(a) && !obj[i].call(this, args[a]))

args = args[0];
for (let a in args) {

@@ -52,0 +56,0 @@ if (args.hasOwnProperty(a) && obj[i].call(this, args[a]))

@@ -40,2 +40,59 @@ /**

});
});
describe('arrayOfStrings', function () {
it('should be return true', function () {
var result = be.arrayOfStrings(['ciao', 'bye', 'hello']);
console.log(result);
assert.equal(result, true);
});
it('should be return false', function () {
var result = be.arrayOfStrings(['ciao', 'bye', 2]);
console.log(result);
assert.equal(result, false);
});
it('interface all, different types, should be return false', function () {
var result = be.all.arrayOfStrings([
['ciao', 'bye'],
[2]
]);
console.log(result);
assert.equal(result, false);
});
it('[], should be return false', function () {
var result = be.arrayOfStrings([]);
console.log(result);
assert.equal(result, false);
});
});
describe('arrayOfObjects', function () {
it('should be return true', function () {
var result = be.arrayOfObjects([{a:1},{b:2}]);
console.log(result);
assert.equal(result, true);
});
it('interface all, should be return true', function () {
var result = be.all.arrayOfObjects([{a:1},{b:2}],[{a:1},{b:2}]);
console.log(result);
assert.equal(result, true);
});
it('interface all, different types, should be return false', function () {
var result = be.all.arrayOfObjects([
[{a:1},{b:2}],
false
]);
console.log(result);
assert.equal(result, false);
});
it('should be return false', function () {
var result = be.arrayOfObjects(['ciao', 'bye', 2]);
console.log(result);
assert.equal(result, false);
});
it('[], should be return false', function () {
var result = be.arrayOfObjects([]);
console.log(result);
assert.equal(result, false);
});
});

Sorry, the diff of this file is too big to display

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc