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

@simpleview/assertlib

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@simpleview/assertlib - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

4

dist/index.min.js

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

!function(e,t){if("object"==typeof exports&&"object"==typeof module)module.exports=t(require("cheerio"));else if("function"==typeof define&&define.amd)define(["cheerio"],t);else{var r="object"==typeof exports?t(require("cheerio")):t(e.cheerio);for(var n in r)("object"==typeof exports?exports:e)[n]=r[n]}}(window,function(e){return function(e){var t={};function r(n){if(t[n])return t[n].exports;var o=t[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)r.d(n,o,function(t){return e[t]}.bind(null,o));return n},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=1)}([function(e,t){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(e){"object"==typeof window&&(r=window)}e.exports=r},function(e,t,r){var n=r(2),o=r(7),i=r(8),a=function(e,t){c(e,t,["root"])},c=function(e,t,r,o){var u=typeof t,s=["boolean","number","undefined"],l=["type","data","class","calls","allowExtraKeys"],f=t instanceof Date,p=t instanceof Array,d=null===t,y="function"===u,h=!1===f&&!1===p&&!1===d&&"object"===u,m=s.indexOf(u)>-1,g="string"===u,v=h&&0===Object.keys(t).filter(e=>-1===l.indexOf(e)).length&&void 0!==t.type,b=m||g||f||d||p||y||h&&!1===v,x=b?{type:y?"function":f?"date":h?"object":p?"array":d?"null":u,data:t}:t;b&&h&&void 0!==x.data._deepCheck_allowExtraKeys&&(x.allowExtraKeys=x.data._deepCheck_allowExtraKeys);i.validate(x,{type:"object",schema:[{name:"type",type:"string",enum:["boolean","string","array","number","undefined","function","object","date","null"],required:!0},{name:"data",type:"any"},{name:"class",type:"function"},{name:"calls",type:"array",schema:{type:"object",schema:[{name:"args",type:"array",default:function(){return[]}},{name:"result",type:"any"}],allowExtraKeys:!1}},{name:"allowExtraKeys",type:"boolean"}],throwOnInvalid:!0,allowExtraKeys:!1});if(s.indexOf(x.type)>-1)n.strictEqual(typeof e,x.type,"data at "+r.join(".")+" was not a "+x.type+", but it should be"),void 0!==x.data&&n.strictEqual(e,x.data,"data '"+e+"' did not equal '"+x.data+"' at "+r.join("."));else if("string"===x.type){if(n.strictEqual(typeof e,x.type,"data at "+r.join(".")+" was not a "+x.type+", but it should be"),void 0!==x.data)(x.data instanceof Array?x.data:[x.data]).forEach(function(t){t instanceof RegExp?n.ok(e.match(t),"data '"+e+"' did not contain '"+t+"' at "+r.join(".")):n.strictEqual(e,t,"data '"+e+"' did not equal '"+t+"' at "+r.join("."))})}else if("object"===x.type){if(n.strictEqual(typeof e,"object","data at "+r.join(".")+" was not an object, but it should be"),void 0!==x.class&&n.strictEqual(e instanceof x.class,!0,"data at "+r.join(".")+" was not instanceof the proper class"),!1===x.allowExtraKeys){var E=Object.keys(e),w=Object.keys(x.data);E.forEach(e=>n.strictEqual(w.indexOf(e)>-1,!0,"extra key '"+e+"' at "+r.join(".")))}void 0!==x.data&&Object.keys(x.data).forEach(function(t,n){if("_deepCheck_allowExtraKeys"!==t){var o=r.slice(0);o.push(t),c(e[t],x.data[t],o,e)}})}else if("array"===x.type)n.strictEqual(e instanceof Array,!0,"data at "+r.join(".")+" was not an array, but it should be"),void 0!==x.data&&(n.strictEqual(e.length,x.data.length,"data at "+r.join(".")+" was length "+e.length+", should have been length "+x.data.length),x.data.forEach(function(t,n){var o=r.slice(0);o.push(n),c(e[n],x.data[n],o)}));else if("date"===x.type){if(n.strictEqual(e instanceof Date,!0,"data at "+r.join(".")+" was not of type date"),void 0!==x.data){var j=x.data instanceof Date?x.data.toISOString():x.data;n.strictEqual(e.toISOString(),j,"date data '"+e.toISOString()+"' did not equal '"+j+"' at "+r.join("."))}}else"function"===x.type?(n.strictEqual(typeof e,"function","data at "+r.join(".")+" was not of type function"),void 0!==x.data&&n.strictEqual(e,x.data,"data at "+r.join(".")+" was not the correct function reference"),void 0!==x.calls&&x.calls.forEach(function(t,i){var c=e.apply(o,t.args);try{a(c,t.result)}catch(e){n(!1,"data '"+c+"' did not match '"+t.result+"' returned by the function at "+r.join(".")+" on call index "+i)}})):"null"===x.type&&n.strictEqual(e,null,"data at "+r.join(".")+" was not null, but it should be")},u=function(e,t){i.validate(t,{type:"object",schema:[{name:"selector",type:"string"},{name:"count",type:"number"},{name:"childCount",type:"number"},{name:"html",type:"string"},{name:"text",type:"string"},{name:"textRegex",type:"regex"},{name:"eq",type:"number"},{name:"attrs",type:"indexObject"},{name:"css",type:"indexObject"},{name:"checks",type:"object"}],allowExtraKeys:!1,throwOnInvalid:!0});var r=void 0!==t.selector?e.find(t.selector):e,o=void 0!==t.eq?r.eq(t.eq):r;if(void 0!==t.count&&n.strictEqual(o.length,t.count,`Count mismatch for selector '${t.selector}'. ${o.length} !== ${t.count}`),void 0!==t.html){var a=o.html().replace(/\s+/g," ").trim();n.strictEqual(a,t.html,`Html mismatch for selector '${t.selector}'. '${a}' !== '${t.html}'`)}if(void 0!==t.text){var c=o.text().replace(/\s+/g," ").trim();n.strictEqual(c,t.text,`Text mismatch for selector '${t.selector}'. '${c}' !== '${t.text}'`)}if(void 0!==t.textRegex){var s=o.text();n.ok(s.match(t.textRegex),`textRegex mismatch for selector '${t.selector}'. '${s}' did not contain '${t.textRegex}'`)}if(void 0!==t.childCount){var l=o.children().length;n.strictEqual(l,t.childCount,`childCount mismatch for selector '${t.selector}'. ${l} !== ${t.childCount}`)}if(void 0!==t.attrs)for(var f in t.attrs){var p=t.attrs[f],d=o.attr(f);(p instanceof Array?p:[p]).forEach(function(e){e instanceof RegExp?n.ok(d.match(e),`attrs mismatch for selector '${t.selector}' attr '${f}'. '${d}' did not contain '${e}'`):n.strictEqual(d,e,`attrs mismatch for selector '${t.selector}' attr '${f}'. '${d}' !== '${e}'`)})}if(void 0!==t.css)for(var f in t.css){p=t.css[f];var y=o.css(f);n.strictEqual(y,p,`css mismatch for selector '${t.selector}' css '${f}'. '${y}' !== '${p}'`)}void 0!==t.checks&&t.checks.forEach(function(e){u(o,e)})};e.exports={assertHtml:function(e,t){if("string"==typeof e)var r=o.load(e,{decodeEntities:!1}).root();else r=e;return t.forEach(function(e,t){u(r,e)}),!0},deepCheck:a,throws:function(e,t){try{e()}catch(e){return void("string"==typeof t?n.strictEqual(e.message,t,e.message+" !== "+t):t instanceof RegExp?n.ok(e.message.match(t),"'"+e.message+"'.match("+t+") === null"):"function"==typeof t&&t(e))}throw new Error("Was supposed to throw but didn't")},trimErr:function(e,t){var r=function(e){return e.replace(/\s+/g," ").trim()},o=r(e.message),i=r(t);n.strictEqual(o,i,"'"+o+"' !== '"+i+"'")},xor:function(e,t){if(!1==(!0===e&&!1===t||!1===e&&!0===t))throw new Error(e+" === "+t)}}},function(e,t,r){"use strict";(function(t){
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("cheerio"),require("jsvalidator"));else if("function"==typeof define&&define.amd)define(["cheerio","jsvalidator"],e);else{var n="object"==typeof exports?e(require("cheerio"),require("jsvalidator")):e(t.cheerio,t.jsvalidator);for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(window,function(t,e){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var o=e[r]={i:r,l:!1,exports:{}};return t[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)n.d(r,o,function(e){return t[e]}.bind(null,o));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=1)}([function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){var r=n(2),o=n(7),i=n(8),a=function(t,e){c(t,e,["root"])},c=function(t,e,n,o){var u=typeof e,s=["boolean","number","undefined"],l=["type","data","class","calls","allowExtraKeys"],f=e instanceof Date,p=e instanceof Array,d=null===e,y="function"===u,h=!1===f&&!1===p&&!1===d&&"object"===u,g=s.indexOf(u)>-1,m="string"===u,v=h&&0===Object.keys(e).filter(t=>-1===l.indexOf(t)).length&&void 0!==e.type,b=g||m||f||d||p||y||h&&!1===v,E=b?{type:y?"function":f?"date":h?"object":p?"array":d?"null":u,data:e}:e;b&&h&&void 0!==E.data._deepCheck_allowExtraKeys&&(E.allowExtraKeys=E.data._deepCheck_allowExtraKeys);i.validate(E,{type:"object",schema:[{name:"type",type:"string",enum:["boolean","string","array","number","undefined","function","object","date","null"],required:!0},{name:"data",type:"any"},{name:"class",type:"function"},{name:"calls",type:"array",schema:{type:"object",schema:[{name:"args",type:"array",default:function(){return[]}},{name:"result",type:"any"}],allowExtraKeys:!1}},{name:"allowExtraKeys",type:"boolean"}],throwOnInvalid:!0,allowExtraKeys:!1});if(s.indexOf(E.type)>-1)r.strictEqual(typeof t,E.type,"data at "+n.join(".")+" was not a "+E.type+", but it should be"),void 0!==E.data&&r.strictEqual(t,E.data,"data '"+t+"' did not equal '"+E.data+"' at "+n.join("."));else if("string"===E.type){if(r.strictEqual(typeof t,E.type,"data at "+n.join(".")+" was not a "+E.type+", but it should be"),void 0!==E.data)(E.data instanceof Array?E.data:[E.data]).forEach(function(e){e instanceof RegExp?r.ok(t.match(e),"data '"+t+"' did not contain '"+e+"' at "+n.join(".")):r.strictEqual(t,e,"data '"+t+"' did not equal '"+e+"' at "+n.join("."))})}else if("object"===E.type){if(r.strictEqual(typeof t,"object","data at "+n.join(".")+" was not an object, but it should be"),void 0!==E.class&&r.strictEqual(t instanceof E.class,!0,"data at "+n.join(".")+" was not instanceof the proper class"),!1===E.allowExtraKeys){var x=Object.keys(t),w=Object.keys(E.data);x.forEach(t=>r.strictEqual(w.indexOf(t)>-1,!0,"extra key '"+t+"' at "+n.join(".")))}void 0!==E.data&&Object.keys(E.data).forEach(function(e,r){if("_deepCheck_allowExtraKeys"!==e){var o=n.slice(0);o.push(e),c(t[e],E.data[e],o,t)}})}else if("array"===E.type)r.strictEqual(t instanceof Array,!0,"data at "+n.join(".")+" was not an array, but it should be"),void 0!==E.data&&(r.strictEqual(t.length,E.data.length,"data at "+n.join(".")+" was length "+t.length+", should have been length "+E.data.length),E.data.forEach(function(e,r){var o=n.slice(0);o.push(r),c(t[r],E.data[r],o)}));else if("date"===E.type){if(r.strictEqual(t instanceof Date,!0,"data at "+n.join(".")+" was not of type date"),void 0!==E.data){var j=E.data instanceof Date?E.data.toISOString():E.data;r.strictEqual(t.toISOString(),j,"date data '"+t.toISOString()+"' did not equal '"+j+"' at "+n.join("."))}}else"function"===E.type?(r.strictEqual(typeof t,"function","data at "+n.join(".")+" was not of type function"),void 0!==E.data&&r.strictEqual(t,E.data,"data at "+n.join(".")+" was not the correct function reference"),void 0!==E.calls&&E.calls.forEach(function(e,i){var c=t.apply(o,e.args);try{a(c,e.result)}catch(t){r(!1,"data '"+c+"' did not match '"+e.result+"' returned by the function at "+n.join(".")+" on call index "+i)}})):"null"===E.type&&r.strictEqual(t,null,"data at "+n.join(".")+" was not null, but it should be")},u=function(t,e){i.validate(e,{type:"object",schema:[{name:"selector",type:"string"},{name:"count",type:"number"},{name:"childCount",type:"number"},{name:"html",type:"string"},{name:"text",type:"string"},{name:"textRegex",type:"regex"},{name:"eq",type:"number"},{name:"attrs",type:"indexObject"},{name:"css",type:"indexObject"},{name:"checks",type:"object"}],allowExtraKeys:!1,throwOnInvalid:!0});var n=void 0!==e.selector?t.find(e.selector):t,o=void 0!==e.eq?n.eq(e.eq):n;if(void 0!==e.count&&r.strictEqual(o.length,e.count,`Count mismatch for selector '${e.selector}'. ${o.length} !== ${e.count}`),void 0!==e.html){var a=o.html().replace(/\s+/g," ").trim();r.strictEqual(a,e.html,`Html mismatch for selector '${e.selector}'. '${a}' !== '${e.html}'`)}if(void 0!==e.text){var c=o.text().replace(/\s+/g," ").trim();r.strictEqual(c,e.text,`Text mismatch for selector '${e.selector}'. '${c}' !== '${e.text}'`)}if(void 0!==e.textRegex){var s=o.text();r.ok(s.match(e.textRegex),`textRegex mismatch for selector '${e.selector}'. '${s}' did not contain '${e.textRegex}'`)}if(void 0!==e.childCount){var l=o.children().length;r.strictEqual(l,e.childCount,`childCount mismatch for selector '${e.selector}'. ${l} !== ${e.childCount}`)}if(void 0!==e.attrs)for(var f in e.attrs){var p=e.attrs[f],d=o.attr(f);(p instanceof Array?p:[p]).forEach(function(t){t instanceof RegExp?r.ok(d.match(t),`attrs mismatch for selector '${e.selector}' attr '${f}'. '${d}' did not contain '${t}'`):r.strictEqual(d,t,`attrs mismatch for selector '${e.selector}' attr '${f}'. '${d}' !== '${t}'`)})}if(void 0!==e.css)for(var f in e.css){p=e.css[f];var y=o.css(f);r.strictEqual(y,p,`css mismatch for selector '${e.selector}' css '${f}'. '${y}' !== '${p}'`)}void 0!==e.checks&&e.checks.forEach(function(t){u(o,t)})};t.exports={assertHtml:function(t,e){if("string"==typeof t)var n=o.load(t,{decodeEntities:!1}).root();else n=t;return e.forEach(function(t,e){u(n,t)}),!0},deepCheck:a,throws:function(t,e){try{t()}catch(t){return void("string"==typeof e?r.strictEqual(t.message,e,t.message+" !== "+e):e instanceof RegExp?r.ok(t.message.match(e),"'"+t.message+"'.match("+e+") === null"):"function"==typeof e&&e(t))}throw new Error("Was supposed to throw but didn't")},trimErr:function(t,e){var n=function(t){return t.replace(/\s+/g," ").trim()},o=n(t.message),i=n(e);r.strictEqual(o,i,"'"+o+"' !== '"+i+"'")},xor:function(t,e){if(!1==(!0===t&&!1===e||!1===t&&!0===e))throw new Error(t+" === "+e)}}},function(t,e,n){"use strict";(function(e){
/*!

@@ -8,2 +8,2 @@ * The buffer module from node.js, for the browser.

*/
function n(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0}function o(e){return t.Buffer&&"function"==typeof t.Buffer.isBuffer?t.Buffer.isBuffer(e):!(null==e||!e._isBuffer)}var i=r(3),a=Object.prototype.hasOwnProperty,c=Array.prototype.slice,u="foo"===function(){}.name;function s(e){return Object.prototype.toString.call(e)}function l(e){return!o(e)&&("function"==typeof t.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):!!e&&(e instanceof DataView||!!(e.buffer&&e.buffer instanceof ArrayBuffer))))}var f=e.exports=g,p=/\s*function\s+([^\(\s]*)\s*/;function d(e){if(i.isFunction(e)){if(u)return e.name;var t=e.toString().match(p);return t&&t[1]}}function y(e,t){return"string"==typeof e?e.length<t?e:e.slice(0,t):e}function h(e){if(u||!i.isFunction(e))return i.inspect(e);var t=d(e);return"[Function"+(t?": "+t:"")+"]"}function m(e,t,r,n,o){throw new f.AssertionError({message:r,actual:e,expected:t,operator:n,stackStartFunction:o})}function g(e,t){e||m(e,!0,t,"==",f.ok)}function v(e,t,r,a){if(e===t)return!0;if(o(e)&&o(t))return 0===n(e,t);if(i.isDate(e)&&i.isDate(t))return e.getTime()===t.getTime();if(i.isRegExp(e)&&i.isRegExp(t))return e.source===t.source&&e.global===t.global&&e.multiline===t.multiline&&e.lastIndex===t.lastIndex&&e.ignoreCase===t.ignoreCase;if(null!==e&&"object"==typeof e||null!==t&&"object"==typeof t){if(l(e)&&l(t)&&s(e)===s(t)&&!(e instanceof Float32Array||e instanceof Float64Array))return 0===n(new Uint8Array(e.buffer),new Uint8Array(t.buffer));if(o(e)!==o(t))return!1;var u=(a=a||{actual:[],expected:[]}).actual.indexOf(e);return-1!==u&&u===a.expected.indexOf(t)||(a.actual.push(e),a.expected.push(t),function(e,t,r,n){if(null==e||null==t)return!1;if(i.isPrimitive(e)||i.isPrimitive(t))return e===t;if(r&&Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1;var o=b(e),a=b(t);if(o&&!a||!o&&a)return!1;if(o)return e=c.call(e),t=c.call(t),v(e,t,r);var u,s,l=w(e),f=w(t);if(l.length!==f.length)return!1;for(l.sort(),f.sort(),s=l.length-1;s>=0;s--)if(l[s]!==f[s])return!1;for(s=l.length-1;s>=0;s--)if(u=l[s],!v(e[u],t[u],r,n))return!1;return!0}(e,t,r,a))}return r?e===t:e==t}function b(e){return"[object Arguments]"==Object.prototype.toString.call(e)}function x(e,t){if(!e||!t)return!1;if("[object RegExp]"==Object.prototype.toString.call(t))return t.test(e);try{if(e instanceof t)return!0}catch(e){}return!Error.isPrototypeOf(t)&&!0===t.call({},e)}function E(e,t,r,n){var o;if("function"!=typeof t)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),o=function(e){var t;try{e()}catch(e){t=e}return t}(t),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),e&&!o&&m(o,r,"Missing expected exception"+n);var a="string"==typeof n,c=!e&&o&&!r;if((!e&&i.isError(o)&&a&&x(o,r)||c)&&m(o,r,"Got unwanted exception"+n),e&&o&&r&&!x(o,r)||!e&&o)throw o}f.AssertionError=function(e){var t;this.name="AssertionError",this.actual=e.actual,this.expected=e.expected,this.operator=e.operator,e.message?(this.message=e.message,this.generatedMessage=!1):(this.message=y(h((t=this).actual),128)+" "+t.operator+" "+y(h(t.expected),128),this.generatedMessage=!0);var r=e.stackStartFunction||m;if(Error.captureStackTrace)Error.captureStackTrace(this,r);else{var n=new Error;if(n.stack){var o=n.stack,i=d(r),a=o.indexOf("\n"+i);if(a>=0){var c=o.indexOf("\n",a+1);o=o.substring(c+1)}this.stack=o}}},i.inherits(f.AssertionError,Error),f.fail=m,f.ok=g,f.equal=function(e,t,r){e!=t&&m(e,t,r,"==",f.equal)},f.notEqual=function(e,t,r){e==t&&m(e,t,r,"!=",f.notEqual)},f.deepEqual=function(e,t,r){v(e,t,!1)||m(e,t,r,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(e,t,r){v(e,t,!0)||m(e,t,r,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(e,t,r){v(e,t,!1)&&m(e,t,r,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function e(t,r,n){v(t,r,!0)&&m(t,r,n,"notDeepStrictEqual",e)},f.strictEqual=function(e,t,r){e!==t&&m(e,t,r,"===",f.strictEqual)},f.notStrictEqual=function(e,t,r){e===t&&m(e,t,r,"!==",f.notStrictEqual)},f.throws=function(e,t,r){E(!0,e,t,r)},f.doesNotThrow=function(e,t,r){E(!1,e,t,r)},f.ifError=function(e){if(e)throw e};var w=Object.keys||function(e){var t=[];for(var r in e)a.call(e,r)&&t.push(r);return t}}).call(this,r(0))},function(e,t,r){(function(e,n){var o=/%[sdj%]/g;t.format=function(e){if(!g(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(c(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,i=n.length,a=String(e).replace(o,function(e){if("%%"===e)return"%";if(r>=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}}),u=n[r];r<i;u=n[++r])h(u)||!x(u)?a+=" "+u:a+=" "+c(u);return a},t.deprecate=function(r,o){if(v(e.process))return function(){return t.deprecate(r,o).apply(this,arguments)};if(!0===n.noDeprecation)return r;var i=!1;return function(){if(!i){if(n.throwDeprecation)throw new Error(o);n.traceDeprecation?console.trace(o):console.error(o),i=!0}return r.apply(this,arguments)}};var i,a={};function c(e,r){var n={seen:[],stylize:s};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),y(r)?n.showHidden=r:r&&t._extend(n,r),v(n.showHidden)&&(n.showHidden=!1),v(n.depth)&&(n.depth=2),v(n.colors)&&(n.colors=!1),v(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),l(n,e,n.depth)}function u(e,t){var r=c.styles[t];return r?"["+c.colors[r][0]+"m"+e+"["+c.colors[r][1]+"m":e}function s(e,t){return e}function l(e,r,n){if(e.customInspect&&r&&j(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,e);return g(o)||(o=l(e,o,n)),o}var i=function(e,t){if(v(t))return e.stylize("undefined","undefined");if(g(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(m(t))return e.stylize(""+t,"number");if(y(t))return e.stylize(""+t,"boolean");if(h(t))return e.stylize("null","null")}(e,r);if(i)return i;var a=Object.keys(r),c=function(e){var t={};return e.forEach(function(e,r){t[e]=!0}),t}(a);if(e.showHidden&&(a=Object.getOwnPropertyNames(r)),w(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return f(r);if(0===a.length){if(j(r)){var u=r.name?": "+r.name:"";return e.stylize("[Function"+u+"]","special")}if(b(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(E(r))return e.stylize(Date.prototype.toString.call(r),"date");if(w(r))return f(r)}var s,x="",O=!1,q=["{","}"];(d(r)&&(O=!0,q=["[","]"]),j(r))&&(x=" [Function"+(r.name?": "+r.name:"")+"]");return b(r)&&(x=" "+RegExp.prototype.toString.call(r)),E(r)&&(x=" "+Date.prototype.toUTCString.call(r)),w(r)&&(x=" "+f(r)),0!==a.length||O&&0!=r.length?n<0?b(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),s=O?function(e,t,r,n,o){for(var i=[],a=0,c=t.length;a<c;++a)A(t,String(a))?i.push(p(e,t,r,n,String(a),!0)):i.push("");return o.forEach(function(o){o.match(/^\d+$/)||i.push(p(e,t,r,n,o,!0))}),i}(e,r,n,c,a):a.map(function(t){return p(e,r,n,c,t,O)}),e.seen.pop(),function(e,t,r){if(e.reduce(function(e,t){return 0,t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(s,x,q)):q[0]+x+q[1]}function f(e){return"["+Error.prototype.toString.call(e)+"]"}function p(e,t,r,n,o,i){var a,c,u;if((u=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?c=u.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):u.set&&(c=e.stylize("[Setter]","special")),A(n,o)||(a="["+o+"]"),c||(e.seen.indexOf(u.value)<0?(c=h(r)?l(e,u.value,null):l(e,u.value,r-1)).indexOf("\n")>-1&&(c=i?c.split("\n").map(function(e){return" "+e}).join("\n").substr(2):"\n"+c.split("\n").map(function(e){return" "+e}).join("\n")):c=e.stylize("[Circular]","special")),v(a)){if(i&&o.match(/^\d+$/))return c;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=e.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=e.stylize(a,"string"))}return a+": "+c}function d(e){return Array.isArray(e)}function y(e){return"boolean"==typeof e}function h(e){return null===e}function m(e){return"number"==typeof e}function g(e){return"string"==typeof e}function v(e){return void 0===e}function b(e){return x(e)&&"[object RegExp]"===O(e)}function x(e){return"object"==typeof e&&null!==e}function E(e){return x(e)&&"[object Date]"===O(e)}function w(e){return x(e)&&("[object Error]"===O(e)||e instanceof Error)}function j(e){return"function"==typeof e}function O(e){return Object.prototype.toString.call(e)}function q(e){return e<10?"0"+e.toString(10):e.toString(10)}t.debuglog=function(e){if(v(i)&&(i=n.env.NODE_DEBUG||""),e=e.toUpperCase(),!a[e])if(new RegExp("\\b"+e+"\\b","i").test(i)){var r=n.pid;a[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else a[e]=function(){};return a[e]},t.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.isArray=d,t.isBoolean=y,t.isNull=h,t.isNullOrUndefined=function(e){return null==e},t.isNumber=m,t.isString=g,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=v,t.isRegExp=b,t.isObject=x,t.isDate=E,t.isError=w,t.isFunction=j,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(5);var S=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function A(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;console.log("%s - %s",(e=new Date,r=[q(e.getHours()),q(e.getMinutes()),q(e.getSeconds())].join(":"),[e.getDate(),S[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(6),t._extend=function(e,t){if(!t||!x(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e}}).call(this,r(0),r(4))},function(e,t){var r,n,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(e){if(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(e){n=a}}();var u,s=[],l=!1,f=-1;function p(){l&&u&&(l=!1,u.length?s=u.concat(s):f=-1,s.length&&d())}function d(){if(!l){var e=c(p);l=!0;for(var t=s.length;t;){for(u=s,s=[];++f<t;)u&&u[f].run();f=-1,t=s.length}u=null,l=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function y(e,t){this.fun=e,this.array=t}function h(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var r=1;r<arguments.length;r++)t[r-1]=arguments[r];s.push(new y(e,t)),1!==s.length||l||c(d)},y.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=h,o.addListener=h,o.once=h,o.off=h,o.removeListener=h,o.removeAllListeners=h,o.emit=h,o.prependListener=h,o.prependOnceListener=h,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t){e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},function(e,t){"function"==typeof Object.create?e.exports=function(e,t){e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}})}:e.exports=function(e,t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}},function(t,r){t.exports=e},function(e,t){var r,n,o,i,a=[],c=function(e){var t={type:e.type,name:e.name,enum:e.enum,default:e.default,max:e.max,min:e.min,regex:e.regex,class:e.class,custom:e.custom,required:void 0!==e.required&&!0===e.required,schema:"indexObject"===e.type&&e.schema instanceof Array?[{type:"object",schema:e.schema,deleteExtraKeys:e.deleteExtraKeys,allowExtraKeys:e.allowExtraKeys}]:e.schema instanceof Array?e.schema:void 0!==e.schema?[e.schema]:void 0,allowExtraKeys:void 0===e.allowExtraKeys||!0===e.allowExtraKeys,deleteExtraKeys:void 0!==e.deleteExtraKeys&&!0===e.deleteExtraKeys,throwOnInvalid:void 0!==e.throwOnInvalid&&!0===e.throwOnInvalid};if(void 0!==t.schema)for(var r=0;r<t.schema.length;r++)t.schema[r]=c(t.schema[r]);return t},u=function(e,t){var n=void 0!==e,c=t.schema,u=t.type,g=t.throwOnInvalid,v=t.required,b=t.custom;if(!n&&v){var x=new Error("Required field"+h(r)+"does not exist.");if(g)throw x;return a.push({err:x,contextArray:r}),e}if(!n&&!v&&void 0===t.default)return e;if(!n&&!v&&void 0!==t.default){if(e=y(e,t),"object"!==t.type&&"array"!==t.type)return e;n=!0}if(!n)throw new Error("Wtf, this case should never happen.");var E=!1;if("any"===u);else if("string"===u)"string"!=typeof e?E=!0:d(e,t);else if("boolean"===u)"boolean"!=typeof e&&(E=!0);else if("number"===u)"number"!=typeof e&&(E=!0);else if("function"===u)"function"!=typeof e&&(E=!0);else if("class"===u)e instanceof t.class||(E=!0);else if("date"===u)e instanceof Date||(E=!0);else if("indexObject"===u)"object"!=typeof e?E=!0:void 0!==c&&f(e,t);else if("object"===u)"object"!=typeof e?E=!0:void 0!==c&&l(e,t);else if("array"===u)e instanceof Array?void 0!==c&&s(e,t):E=!0;else if("simpleObject"===u)"object"!=typeof e?E=!0:p(e,t);else{if("regex"!==u)throw new Error("Field"+h(r)+"should be type '"+t.type+"' but that type isn't supported by jsvalidator.");e instanceof RegExp==!1&&(E=!0)}if(E){var w="Field"+h(r)+"should be type '"+t.type+"' but is type '"+typeof e+"'.";["boolean","number","string"].indexOf(typeof e)>-1&&(w+=" Value is "+JSON.stringify(e)+".");x=new Error(w);a.push({err:x,contextArray:r})}else void 0!==b&&b.forEach(function(t,n){if(!t.fn({value:e,current:i})){var o=new Error("Field"+h(r)+"failed custom validation '"+t.label+"'.");a.push({err:o,contextArray:r})}});if(a.length>0&&!0===g)throw m(o,a);return e},s=function(e,t){for(var o,a=0;a<e.length;a++){o=e[a],r.push(a),n.push(e);var c=i;i=e;var s=u(o,t.schema[0]);i=c,r.pop(),n.pop(),e[a]=s}},l=function(e,t){for(var o,c=[],s=0;s<t.schema.length;s++){o=t.schema[s],c.push(o.name),r.push(o.name),n.push(e);var l=i;i=e;var f=u(e[o.name],o);i=l,r.pop(),n.pop(),void 0!==f&&(e[o.name]=f)}if(!1===t.allowExtraKeys||!0===t.deleteExtraKeys)for(var s in e)-1===c.indexOf(s)&&(!0===t.deleteExtraKeys?delete e[s]:a.push({err:new Error("Object"+h(r)+"contains extra key '"+s+"' not declared in schema."),contextArray:r}))},f=function(e,t){var o;for(var a in e){o=e[a],r.push(a),n.push(e);var c=i;i=e;u(o,t.schema[0]);i=c,r.pop(),n.pop()}},p=function(e,t){var o;for(var a in e){o=e[a],r.push(a),n.push(e);var c=i;i=e;u(o,t.schema[0]);i=c,r.pop(),n.pop()}},d=function(e,t){if(void 0!==t.enum&&-1===t.enum.indexOf(e)){var n=new Error("Field"+h(r)+"must be a value in '"+t.enum+"'.");a.push({err:n,contextArray:r})}if(void 0!==t.min&&e.length<t.min){n=new Error("Field"+h(r)+"has a minimum length of '"+t.min+"'.");a.push({err:n,contextArray:r})}if(void 0!==t.max&&e.length>t.max){n=new Error("Field"+h(r)+"has a maximum length of '"+t.max+"'.");a.push({err:n,contextArray:r})}if(void 0!==t.regex&&!e.match(t.regex)){n=new Error("Field"+h(r)+"does not match a regex of '"+t.regex+"'.");a.push({err:n,contextArray:r})}},y=function(e,t){if("function"==typeof t.default){var a={rootObj:o,value:e,def:t,contextArray:r,contextArrayObj:n,current:i};return n[n.length-2]instanceof Array&&(a.i=r[r.length-2]),t.default(a)}return t.default},h=function(e){return 0===e.length?" ":" '"+e.join(".")+"' "},m=function(e,t){var r=t.map(function(e){return e.err.message}).join("\r\n\t");return new Error("Validation Error\r\n\t"+r)};e.exports={validate:function(e,t){r=[],n=[],a=[],o=e,i=e;var s=c(t),l={data:u(e,s),errors:a,err:null,success:!1};return l.success=0===l.errors.length,l.errors.length>0&&(l.err=m(e,l.errors)),l}}}])});
function r(t,e){if(t===e)return 0;for(var n=t.length,r=e.length,o=0,i=Math.min(n,r);o<i;++o)if(t[o]!==e[o]){n=t[o],r=e[o];break}return n<r?-1:r<n?1:0}function o(t){return e.Buffer&&"function"==typeof e.Buffer.isBuffer?e.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}var i=n(3),a=Object.prototype.hasOwnProperty,c=Array.prototype.slice,u="foo"===function(){}.name;function s(t){return Object.prototype.toString.call(t)}function l(t){return!o(t)&&("function"==typeof e.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}var f=t.exports=m,p=/\s*function\s+([^\(\s]*)\s*/;function d(t){if(i.isFunction(t)){if(u)return t.name;var e=t.toString().match(p);return e&&e[1]}}function y(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function h(t){if(u||!i.isFunction(t))return i.inspect(t);var e=d(t);return"[Function"+(e?": "+e:"")+"]"}function g(t,e,n,r,o){throw new f.AssertionError({message:n,actual:t,expected:e,operator:r,stackStartFunction:o})}function m(t,e){t||g(t,!0,e,"==",f.ok)}function v(t,e,n,a){if(t===e)return!0;if(o(t)&&o(e))return 0===r(t,e);if(i.isDate(t)&&i.isDate(e))return t.getTime()===e.getTime();if(i.isRegExp(t)&&i.isRegExp(e))return t.source===e.source&&t.global===e.global&&t.multiline===e.multiline&&t.lastIndex===e.lastIndex&&t.ignoreCase===e.ignoreCase;if(null!==t&&"object"==typeof t||null!==e&&"object"==typeof e){if(l(t)&&l(e)&&s(t)===s(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===r(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(o(t)!==o(e))return!1;var u=(a=a||{actual:[],expected:[]}).actual.indexOf(t);return-1!==u&&u===a.expected.indexOf(e)||(a.actual.push(t),a.expected.push(e),function(t,e,n,r){if(null==t||null==e)return!1;if(i.isPrimitive(t)||i.isPrimitive(e))return t===e;if(n&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var o=b(t),a=b(e);if(o&&!a||!o&&a)return!1;if(o)return t=c.call(t),e=c.call(e),v(t,e,n);var u,s,l=w(t),f=w(e);if(l.length!==f.length)return!1;for(l.sort(),f.sort(),s=l.length-1;s>=0;s--)if(l[s]!==f[s])return!1;for(s=l.length-1;s>=0;s--)if(u=l[s],!v(t[u],e[u],n,r))return!1;return!0}(t,e,n,a))}return n?t===e:t==e}function b(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function E(t,e){if(!t||!e)return!1;if("[object RegExp]"==Object.prototype.toString.call(e))return e.test(t);try{if(t instanceof e)return!0}catch(t){}return!Error.isPrototypeOf(e)&&!0===e.call({},t)}function x(t,e,n,r){var o;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof n&&(r=n,n=null),o=function(t){var e;try{t()}catch(t){e=t}return e}(e),r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),t&&!o&&g(o,n,"Missing expected exception"+r);var a="string"==typeof r,c=!t&&o&&!n;if((!t&&i.isError(o)&&a&&E(o,n)||c)&&g(o,n,"Got unwanted exception"+r),t&&o&&n&&!E(o,n)||!t&&o)throw o}f.AssertionError=function(t){var e;this.name="AssertionError",this.actual=t.actual,this.expected=t.expected,this.operator=t.operator,t.message?(this.message=t.message,this.generatedMessage=!1):(this.message=y(h((e=this).actual),128)+" "+e.operator+" "+y(h(e.expected),128),this.generatedMessage=!0);var n=t.stackStartFunction||g;if(Error.captureStackTrace)Error.captureStackTrace(this,n);else{var r=new Error;if(r.stack){var o=r.stack,i=d(n),a=o.indexOf("\n"+i);if(a>=0){var c=o.indexOf("\n",a+1);o=o.substring(c+1)}this.stack=o}}},i.inherits(f.AssertionError,Error),f.fail=g,f.ok=m,f.equal=function(t,e,n){t!=e&&g(t,e,n,"==",f.equal)},f.notEqual=function(t,e,n){t==e&&g(t,e,n,"!=",f.notEqual)},f.deepEqual=function(t,e,n){v(t,e,!1)||g(t,e,n,"deepEqual",f.deepEqual)},f.deepStrictEqual=function(t,e,n){v(t,e,!0)||g(t,e,n,"deepStrictEqual",f.deepStrictEqual)},f.notDeepEqual=function(t,e,n){v(t,e,!1)&&g(t,e,n,"notDeepEqual",f.notDeepEqual)},f.notDeepStrictEqual=function t(e,n,r){v(e,n,!0)&&g(e,n,r,"notDeepStrictEqual",t)},f.strictEqual=function(t,e,n){t!==e&&g(t,e,n,"===",f.strictEqual)},f.notStrictEqual=function(t,e,n){t===e&&g(t,e,n,"!==",f.notStrictEqual)},f.throws=function(t,e,n){x(!0,t,e,n)},f.doesNotThrow=function(t,e,n){x(!1,t,e,n)},f.ifError=function(t){if(t)throw t};var w=Object.keys||function(t){var e=[];for(var n in t)a.call(t,n)&&e.push(n);return e}}).call(this,n(0))},function(t,e,n){(function(t,r){var o=/%[sdj%]/g;e.format=function(t){if(!m(t)){for(var e=[],n=0;n<arguments.length;n++)e.push(c(arguments[n]));return e.join(" ")}n=1;for(var r=arguments,i=r.length,a=String(t).replace(o,function(t){if("%%"===t)return"%";if(n>=i)return t;switch(t){case"%s":return String(r[n++]);case"%d":return Number(r[n++]);case"%j":try{return JSON.stringify(r[n++])}catch(t){return"[Circular]"}default:return t}}),u=r[n];n<i;u=r[++n])h(u)||!E(u)?a+=" "+u:a+=" "+c(u);return a},e.deprecate=function(n,o){if(v(t.process))return function(){return e.deprecate(n,o).apply(this,arguments)};if(!0===r.noDeprecation)return n;var i=!1;return function(){if(!i){if(r.throwDeprecation)throw new Error(o);r.traceDeprecation?console.trace(o):console.error(o),i=!0}return n.apply(this,arguments)}};var i,a={};function c(t,n){var r={seen:[],stylize:s};return arguments.length>=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),y(n)?r.showHidden=n:n&&e._extend(r,n),v(r.showHidden)&&(r.showHidden=!1),v(r.depth)&&(r.depth=2),v(r.colors)&&(r.colors=!1),v(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=u),l(r,t,r.depth)}function u(t,e){var n=c.styles[e];return n?"["+c.colors[n][0]+"m"+t+"["+c.colors[n][1]+"m":t}function s(t,e){return t}function l(t,n,r){if(t.customInspect&&n&&j(n.inspect)&&n.inspect!==e.inspect&&(!n.constructor||n.constructor.prototype!==n)){var o=n.inspect(r,t);return m(o)||(o=l(t,o,r)),o}var i=function(t,e){if(v(e))return t.stylize("undefined","undefined");if(m(e)){var n="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(n,"string")}if(g(e))return t.stylize(""+e,"number");if(y(e))return t.stylize(""+e,"boolean");if(h(e))return t.stylize("null","null")}(t,n);if(i)return i;var a=Object.keys(n),c=function(t){var e={};return t.forEach(function(t,n){e[t]=!0}),e}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(n)),w(n)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return f(n);if(0===a.length){if(j(n)){var u=n.name?": "+n.name:"";return t.stylize("[Function"+u+"]","special")}if(b(n))return t.stylize(RegExp.prototype.toString.call(n),"regexp");if(x(n))return t.stylize(Date.prototype.toString.call(n),"date");if(w(n))return f(n)}var s,E="",O=!1,q=["{","}"];(d(n)&&(O=!0,q=["[","]"]),j(n))&&(E=" [Function"+(n.name?": "+n.name:"")+"]");return b(n)&&(E=" "+RegExp.prototype.toString.call(n)),x(n)&&(E=" "+Date.prototype.toUTCString.call(n)),w(n)&&(E=" "+f(n)),0!==a.length||O&&0!=n.length?r<0?b(n)?t.stylize(RegExp.prototype.toString.call(n),"regexp"):t.stylize("[Object]","special"):(t.seen.push(n),s=O?function(t,e,n,r,o){for(var i=[],a=0,c=e.length;a<c;++a)k(e,String(a))?i.push(p(t,e,n,r,String(a),!0)):i.push("");return o.forEach(function(o){o.match(/^\d+$/)||i.push(p(t,e,n,r,o,!0))}),i}(t,n,r,c,a):a.map(function(e){return p(t,n,r,c,e,O)}),t.seen.pop(),function(t,e,n){if(t.reduce(function(t,e){return 0,e.indexOf("\n")>=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60)return n[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+n[1];return n[0]+e+" "+t.join(", ")+" "+n[1]}(s,E,q)):q[0]+E+q[1]}function f(t){return"["+Error.prototype.toString.call(t)+"]"}function p(t,e,n,r,o,i){var a,c,u;if((u=Object.getOwnPropertyDescriptor(e,o)||{value:e[o]}).get?c=u.set?t.stylize("[Getter/Setter]","special"):t.stylize("[Getter]","special"):u.set&&(c=t.stylize("[Setter]","special")),k(r,o)||(a="["+o+"]"),c||(t.seen.indexOf(u.value)<0?(c=h(n)?l(t,u.value,null):l(t,u.value,n-1)).indexOf("\n")>-1&&(c=i?c.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+c.split("\n").map(function(t){return" "+t}).join("\n")):c=t.stylize("[Circular]","special")),v(a)){if(i&&o.match(/^\d+$/))return c;(a=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(a=a.substr(1,a.length-2),a=t.stylize(a,"name")):(a=a.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),a=t.stylize(a,"string"))}return a+": "+c}function d(t){return Array.isArray(t)}function y(t){return"boolean"==typeof t}function h(t){return null===t}function g(t){return"number"==typeof t}function m(t){return"string"==typeof t}function v(t){return void 0===t}function b(t){return E(t)&&"[object RegExp]"===O(t)}function E(t){return"object"==typeof t&&null!==t}function x(t){return E(t)&&"[object Date]"===O(t)}function w(t){return E(t)&&("[object Error]"===O(t)||t instanceof Error)}function j(t){return"function"==typeof t}function O(t){return Object.prototype.toString.call(t)}function q(t){return t<10?"0"+t.toString(10):t.toString(10)}e.debuglog=function(t){if(v(i)&&(i=r.env.NODE_DEBUG||""),t=t.toUpperCase(),!a[t])if(new RegExp("\\b"+t+"\\b","i").test(i)){var n=r.pid;a[t]=function(){var r=e.format.apply(e,arguments);console.error("%s %d: %s",t,n,r)}}else a[t]=function(){};return a[t]},e.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},e.isArray=d,e.isBoolean=y,e.isNull=h,e.isNullOrUndefined=function(t){return null==t},e.isNumber=g,e.isString=m,e.isSymbol=function(t){return"symbol"==typeof t},e.isUndefined=v,e.isRegExp=b,e.isObject=E,e.isDate=x,e.isError=w,e.isFunction=j,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=n(5);var S=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){var t,n;console.log("%s - %s",(t=new Date,n=[q(t.getHours()),q(t.getMinutes()),q(t.getSeconds())].join(":"),[t.getDate(),S[t.getMonth()],n].join(" ")),e.format.apply(e,arguments))},e.inherits=n(6),e._extend=function(t,e){if(!e||!E(e))return t;for(var n=Object.keys(e),r=n.length;r--;)t[n[r]]=e[n[r]];return t}}).call(this,n(0),n(4))},function(t,e){var n,r,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function a(){throw new Error("clearTimeout has not been defined")}function c(t){if(n===setTimeout)return setTimeout(t,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(t){n=i}try{r="function"==typeof clearTimeout?clearTimeout:a}catch(t){r=a}}();var u,s=[],l=!1,f=-1;function p(){l&&u&&(l=!1,u.length?s=u.concat(s):f=-1,s.length&&d())}function d(){if(!l){var t=c(p);l=!0;for(var e=s.length;e;){for(u=s,s=[];++f<e;)u&&u[f].run();f=-1,e=s.length}u=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===a||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function y(t,e){this.fun=t,this.array=e}function h(){}o.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];s.push(new y(t,e)),1!==s.length||l||c(d)},y.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=h,o.addListener=h,o.once=h,o.off=h,o.removeListener=h,o.removeAllListeners=h,o.emit=h,o.prependListener=h,o.prependOnceListener=h,o.listeners=function(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e){t.exports=function(t){return t&&"object"==typeof t&&"function"==typeof t.copy&&"function"==typeof t.fill&&"function"==typeof t.readUInt8}},function(t,e){"function"==typeof Object.create?t.exports=function(t,e){t.super_=e,t.prototype=Object.create(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})}:t.exports=function(t,e){t.super_=e;var n=function(){};n.prototype=e.prototype,t.prototype=new n,t.prototype.constructor=t}},function(e,n){e.exports=t},function(t,n){t.exports=e}])});
{
"name" : "@simpleview/assertlib",
"version" : "1.0.0",
"version" : "1.0.1",
"description" : "Assertion helper",
"author" : "Owen Allen <owenallenaz@gmail.com>",
"devDependencies" : {
"jsvalidator" : "1.2.0",
"mocha" : "5.2.0",
"cheerio" : "0.22.0",
"webpack" : "4.28.1",
"webpack-cli" : "3.2.1"
},
"dependencies" : {
"cheerio" : "0.22.0",
"jsvalidator" : "1.2.0"
},
"main" : "src/index.js",

@@ -14,0 +16,0 @@ "scripts" : {

@@ -10,4 +10,5 @@ module.exports = {

externals : {
cheerio : "cheerio"
cheerio : "cheerio",
jsvalidator : "jsvalidator"
}
}
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