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

@simpleview/assertlib

Package Overview
Dependencies
Maintainers
6
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.1.1 to 1.2.0

6

dist/index.min.js

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

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

@@ -7,3 +7,3 @@ * The buffer module from node.js, for the browser.

* @license MIT
*/function o(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,o=0,i=Math.min(r,n);o<i;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0}function i(t){return e.Buffer&&"function"==typeof e.Buffer.isBuffer?e.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}var a=r(4),c=Object.prototype.hasOwnProperty,u=Array.prototype.slice,s="foo"===function(){}.name;function f(t){return Object.prototype.toString.call(t)}function l(t){return!i(t)&&("function"==typeof e.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}var p=t.exports=b,d=/\s*function\s+([^\(\s]*)\s*/;function y(t){if(a.isFunction(t)){if(s)return t.name;var e=t.toString().match(d);return e&&e[1]}}function h(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function g(t){if(s||!a.isFunction(t))return a.inspect(t);var e=y(t);return"[Function"+(e?": "+e:"")+"]"}function m(t,e,r,n,o){throw new p.AssertionError({message:r,actual:t,expected:e,operator:n,stackStartFunction:o})}function b(t,e){t||m(t,!0,e,"==",p.ok)}function v(t,e,r,n){if(t===e)return!0;if(i(t)&&i(e))return 0===o(t,e);if(a.isDate(t)&&a.isDate(e))return t.getTime()===e.getTime();if(a.isRegExp(t)&&a.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)&&f(t)===f(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===o(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(i(t)!==i(e))return!1;var c=(n=n||{actual:[],expected:[]}).actual.indexOf(t);return-1!==c&&c===n.expected.indexOf(e)||(n.actual.push(t),n.expected.push(e),function(t,e,r,n){if(null==t||null==e)return!1;if(a.isPrimitive(t)||a.isPrimitive(e))return t===e;if(r&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var o=E(t),i=E(e);if(o&&!i||!o&&i)return!1;if(o)return t=u.call(t),e=u.call(e),v(t,e,r);var c,s,f=x(t),l=x(e);if(f.length!==l.length)return!1;for(f.sort(),l.sort(),s=f.length-1;s>=0;s--)if(f[s]!==l[s])return!1;for(s=f.length-1;s>=0;s--)if(c=f[s],!v(t[c],e[c],r,n))return!1;return!0}(t,e,r,n))}return r?t===e:t==e}function E(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function j(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 w(t,e,r,n){var o;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),o=function(t){var e;try{t()}catch(t){e=t}return e}(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!o&&m(o,r,"Missing expected exception"+n);var i="string"==typeof n,c=!t&&o&&!r;if((!t&&a.isError(o)&&i&&j(o,r)||c)&&m(o,r,"Got unwanted exception"+n),t&&o&&r&&!j(o,r)||!t&&o)throw o}p.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=h(g((e=this).actual),128)+" "+e.operator+" "+h(g(e.expected),128),this.generatedMessage=!0);var r=t.stackStartFunction||m;if(Error.captureStackTrace)Error.captureStackTrace(this,r);else{var n=new Error;if(n.stack){var o=n.stack,i=y(r),a=o.indexOf("\n"+i);if(a>=0){var c=o.indexOf("\n",a+1);o=o.substring(c+1)}this.stack=o}}},a.inherits(p.AssertionError,Error),p.fail=m,p.ok=b,p.equal=function(t,e,r){t!=e&&m(t,e,r,"==",p.equal)},p.notEqual=function(t,e,r){t==e&&m(t,e,r,"!=",p.notEqual)},p.deepEqual=function(t,e,r){v(t,e,!1)||m(t,e,r,"deepEqual",p.deepEqual)},p.deepStrictEqual=function(t,e,r){v(t,e,!0)||m(t,e,r,"deepStrictEqual",p.deepStrictEqual)},p.notDeepEqual=function(t,e,r){v(t,e,!1)&&m(t,e,r,"notDeepEqual",p.notDeepEqual)},p.notDeepStrictEqual=function t(e,r,n){v(e,r,!0)&&m(e,r,n,"notDeepStrictEqual",t)},p.strictEqual=function(t,e,r){t!==e&&m(t,e,r,"===",p.strictEqual)},p.notStrictEqual=function(t,e,r){t===e&&m(t,e,r,"!==",p.notStrictEqual)},p.throws=function(t,e,r){w(!0,t,e,r)},p.doesNotThrow=function(t,e,r){w(!1,t,e,r)},p.ifError=function(t){if(t)throw t},p.strict=n(function t(e,r){e||m(e,!0,r,"==",t)},p,{equal:p.strictEqual,deepEqual:p.deepStrictEqual,notEqual:p.notStrictEqual,notDeepEqual:p.notDeepStrictEqual}),p.strict.strict=p.strict;var x=Object.keys||function(t){var e=[];for(var r in t)c.call(t,r)&&e.push(r);return e}}).call(this,r(2))},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";
*/function o(t,e){if(t===e)return 0;for(var r=t.length,n=e.length,o=0,i=Math.min(r,n);o<i;++o)if(t[o]!==e[o]){r=t[o],n=e[o];break}return r<n?-1:n<r?1:0}function i(t){return e.Buffer&&"function"==typeof e.Buffer.isBuffer?e.Buffer.isBuffer(t):!(null==t||!t._isBuffer)}var a=r(4),c=Object.prototype.hasOwnProperty,u=Array.prototype.slice,s="foo"===function(){}.name;function f(t){return Object.prototype.toString.call(t)}function l(t){return!i(t)&&("function"==typeof e.ArrayBuffer&&("function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(t):!!t&&(t instanceof DataView||!!(t.buffer&&t.buffer instanceof ArrayBuffer))))}var p=t.exports=b,d=/\s*function\s+([^\(\s]*)\s*/;function y(t){if(a.isFunction(t)){if(s)return t.name;var e=t.toString().match(d);return e&&e[1]}}function h(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function g(t){if(s||!a.isFunction(t))return a.inspect(t);var e=y(t);return"[Function"+(e?": "+e:"")+"]"}function m(t,e,r,n,o){throw new p.AssertionError({message:r,actual:t,expected:e,operator:n,stackStartFunction:o})}function b(t,e){t||m(t,!0,e,"==",p.ok)}function v(t,e,r,n){if(t===e)return!0;if(i(t)&&i(e))return 0===o(t,e);if(a.isDate(t)&&a.isDate(e))return t.getTime()===e.getTime();if(a.isRegExp(t)&&a.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)&&f(t)===f(e)&&!(t instanceof Float32Array||t instanceof Float64Array))return 0===o(new Uint8Array(t.buffer),new Uint8Array(e.buffer));if(i(t)!==i(e))return!1;var c=(n=n||{actual:[],expected:[]}).actual.indexOf(t);return-1!==c&&c===n.expected.indexOf(e)||(n.actual.push(t),n.expected.push(e),function(t,e,r,n){if(null==t||null==e)return!1;if(a.isPrimitive(t)||a.isPrimitive(e))return t===e;if(r&&Object.getPrototypeOf(t)!==Object.getPrototypeOf(e))return!1;var o=E(t),i=E(e);if(o&&!i||!o&&i)return!1;if(o)return t=u.call(t),e=u.call(e),v(t,e,r);var c,s,f=x(t),l=x(e);if(f.length!==l.length)return!1;for(f.sort(),l.sort(),s=f.length-1;s>=0;s--)if(f[s]!==l[s])return!1;for(s=f.length-1;s>=0;s--)if(c=f[s],!v(t[c],e[c],r,n))return!1;return!0}(t,e,r,n))}return r?t===e:t==e}function E(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function j(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 w(t,e,r,n){var o;if("function"!=typeof e)throw new TypeError('"block" argument must be a function');"string"==typeof r&&(n=r,r=null),o=function(t){var e;try{t()}catch(t){e=t}return e}(e),n=(r&&r.name?" ("+r.name+").":".")+(n?" "+n:"."),t&&!o&&m(o,r,"Missing expected exception"+n);var i="string"==typeof n,c=!t&&o&&!r;if((!t&&a.isError(o)&&i&&j(o,r)||c)&&m(o,r,"Got unwanted exception"+n),t&&o&&r&&!j(o,r)||!t&&o)throw o}p.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=h(g((e=this).actual),128)+" "+e.operator+" "+h(g(e.expected),128),this.generatedMessage=!0);var r=t.stackStartFunction||m;if(Error.captureStackTrace)Error.captureStackTrace(this,r);else{var n=new Error;if(n.stack){var o=n.stack,i=y(r),a=o.indexOf("\n"+i);if(a>=0){var c=o.indexOf("\n",a+1);o=o.substring(c+1)}this.stack=o}}},a.inherits(p.AssertionError,Error),p.fail=m,p.ok=b,p.equal=function(t,e,r){t!=e&&m(t,e,r,"==",p.equal)},p.notEqual=function(t,e,r){t==e&&m(t,e,r,"!=",p.notEqual)},p.deepEqual=function(t,e,r){v(t,e,!1)||m(t,e,r,"deepEqual",p.deepEqual)},p.deepStrictEqual=function(t,e,r){v(t,e,!0)||m(t,e,r,"deepStrictEqual",p.deepStrictEqual)},p.notDeepEqual=function(t,e,r){v(t,e,!1)&&m(t,e,r,"notDeepEqual",p.notDeepEqual)},p.notDeepStrictEqual=function t(e,r,n){v(e,r,!0)&&m(e,r,n,"notDeepStrictEqual",t)},p.strictEqual=function(t,e,r){t!==e&&m(t,e,r,"===",p.strictEqual)},p.notStrictEqual=function(t,e,r){t===e&&m(t,e,r,"!==",p.notStrictEqual)},p.throws=function(t,e,r){w(!0,t,e,r)},p.doesNotThrow=function(t,e,r){w(!1,t,e,r)},p.ifError=function(t){if(t)throw t},p.strict=n((function t(e,r){e||m(e,!0,r,"==",t)}),p,{equal:p.strictEqual,deepEqual:p.deepStrictEqual,notEqual:p.notStrictEqual,notDeepEqual:p.notDeepStrictEqual}),p.strict.strict=p.strict;var x=Object.keys||function(t){var e=[];for(var r in t)c.call(t,r)&&e.push(r);return e}}).call(this,r(2))},function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e,r){"use strict";
/*

@@ -13,2 +13,2 @@ object-assign

@license MIT
*/var n=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(t){n[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,c,u=a(t),s=1;s<arguments.length;s++){for(var f in r=Object(arguments[s]))o.call(r,f)&&(u[f]=r[f]);if(n){c=n(r);for(var l=0;l<c.length;l++)i.call(r,c[l])&&(u[c[l]]=r[c[l]])}}return u}},function(t,e,r){(function(t){var n=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++)r[e[n]]=Object.getOwnPropertyDescriptor(t,e[n]);return r},o=/%[sdj%]/g;e.format=function(t){if(!m(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(c(arguments[r]));return e.join(" ")}r=1;for(var n=arguments,i=n.length,a=String(t).replace(o,function(t){if("%%"===t)return"%";if(r>=i)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}}),u=n[r];r<i;u=n[++r])h(u)||!E(u)?a+=" "+u:a+=" "+c(u);return a},e.deprecate=function(r,n){if(void 0!==t&&!0===t.noDeprecation)return r;if(void 0===t)return function(){return e.deprecate(r,n).apply(this,arguments)};var o=!1;return function(){if(!o){if(t.throwDeprecation)throw new Error(n);t.traceDeprecation?console.trace(n):console.error(n),o=!0}return r.apply(this,arguments)}};var i,a={};function c(t,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&&e._extend(n,r),b(n.showHidden)&&(n.showHidden=!1),b(n.depth)&&(n.depth=2),b(n.colors)&&(n.colors=!1),b(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),f(n,t,n.depth)}function u(t,e){var r=c.styles[e];return r?"["+c.colors[r][0]+"m"+t+"["+c.colors[r][1]+"m":t}function s(t,e){return t}function f(t,r,n){if(t.customInspect&&r&&x(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,t);return m(o)||(o=f(t,o,n)),o}var i=function(t,e){if(b(e))return t.stylize("undefined","undefined");if(m(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"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,r);if(i)return i;var a=Object.keys(r),c=function(t){var e={};return t.forEach(function(t,r){e[t]=!0}),e}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(r)),w(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return l(r);if(0===a.length){if(x(r)){var u=r.name?": "+r.name:"";return t.stylize("[Function"+u+"]","special")}if(v(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(j(r))return t.stylize(Date.prototype.toString.call(r),"date");if(w(r))return l(r)}var s,E="",O=!1,q=["{","}"];(d(r)&&(O=!0,q=["[","]"]),x(r))&&(E=" [Function"+(r.name?": "+r.name:"")+"]");return v(r)&&(E=" "+RegExp.prototype.toString.call(r)),j(r)&&(E=" "+Date.prototype.toUTCString.call(r)),w(r)&&(E=" "+l(r)),0!==a.length||O&&0!=r.length?n<0?v(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),s=O?function(t,e,r,n,o){for(var i=[],a=0,c=e.length;a<c;++a)T(e,String(a))?i.push(p(t,e,r,n,String(a),!0)):i.push("");return o.forEach(function(o){o.match(/^\d+$/)||i.push(p(t,e,r,n,o,!0))}),i}(t,r,n,c,a):a.map(function(e){return p(t,r,n,c,e,O)}),t.seen.pop(),function(t,e,r){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 r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(s,E,q)):q[0]+E+q[1]}function l(t){return"["+Error.prototype.toString.call(t)+"]"}function p(t,e,r,n,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")),T(n,o)||(a="["+o+"]"),c||(t.seen.indexOf(u.value)<0?(c=h(r)?f(t,u.value,null):f(t,u.value,r-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")),b(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 b(t){return void 0===t}function v(t){return E(t)&&"[object RegExp]"===O(t)}function E(t){return"object"==typeof t&&null!==t}function j(t){return E(t)&&"[object Date]"===O(t)}function w(t){return E(t)&&("[object Error]"===O(t)||t instanceof Error)}function x(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(r){if(b(i)&&(i=t.env.NODE_DEBUG||""),r=r.toUpperCase(),!a[r])if(new RegExp("\\b"+r+"\\b","i").test(i)){var n=t.pid;a[r]=function(){var t=e.format.apply(e,arguments);console.error("%s %d: %s",r,n,t)}}else a[r]=function(){};return a[r]},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=b,e.isRegExp=v,e.isObject=E,e.isDate=j,e.isError=w,e.isFunction=x,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(6);var S=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(){var t=new Date,e=[q(t.getHours()),q(t.getMinutes()),q(t.getSeconds())].join(":");return[t.getDate(),S[t.getMonth()],e].join(" ")}function T(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",k(),e.format.apply(e,arguments))},e.inherits=r(7),e._extend=function(t,e){if(!e||!E(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};var $="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function P(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if($&&t[$]){var e;if("function"!=typeof(e=t[$]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,$,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,n=new Promise(function(t,n){e=t,r=n}),o=[],i=0;i<arguments.length;i++)o.push(arguments[i]);o.push(function(t,n){t?r(t):e(n)});try{t.apply(this,o)}catch(t){r(t)}return n}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),$&&Object.defineProperty(e,$,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,n(t))},e.promisify.custom=$,e.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function r(){for(var r=[],n=0;n<arguments.length;n++)r.push(arguments[n]);var o=r.pop();if("function"!=typeof o)throw new TypeError("The last argument must be of type Function");var i=this,a=function(){return o.apply(i,arguments)};e.apply(this,r).then(function(e){t.nextTick(a,null,e)},function(e){t.nextTick(P,e,a)})}return Object.setPrototypeOf(r,Object.getPrototypeOf(e)),Object.defineProperties(r,n(e)),r}}).call(this,r(5))},function(t,e){var r,n,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(r===setTimeout)return setTimeout(t,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(t){r=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();var u,s=[],f=!1,l=-1;function p(){f&&u&&(f=!1,u.length?s=u.concat(s):l=-1,s.length&&d())}function d(){if(!f){var t=c(p);f=!0;for(var e=s.length;e;){for(u=s,s=[];++l<e;)u&&u[l].run();l=-1,e=s.length}u=null,f=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.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 r=1;r<arguments.length;r++)e[r-1]=arguments[r];s.push(new y(t,e)),1!==s.length||f||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 r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(e,r){e.exports=t},function(t,r){t.exports=e}])});
*/var n=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,i=Object.prototype.propertyIsEnumerable;function a(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map((function(t){return e[t]})).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach((function(t){n[t]=t})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,c,u=a(t),s=1;s<arguments.length;s++){for(var f in r=Object(arguments[s]))o.call(r,f)&&(u[f]=r[f]);if(n){c=n(r);for(var l=0;l<c.length;l++)i.call(r,c[l])&&(u[c[l]]=r[c[l]])}}return u}},function(t,e,r){(function(t){var n=Object.getOwnPropertyDescriptors||function(t){for(var e=Object.keys(t),r={},n=0;n<e.length;n++)r[e[n]]=Object.getOwnPropertyDescriptor(t,e[n]);return r},o=/%[sdj%]/g;e.format=function(t){if(!m(t)){for(var e=[],r=0;r<arguments.length;r++)e.push(c(arguments[r]));return e.join(" ")}r=1;for(var n=arguments,i=n.length,a=String(t).replace(o,(function(t){if("%%"===t)return"%";if(r>=i)return t;switch(t){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(t){return"[Circular]"}default:return t}})),u=n[r];r<i;u=n[++r])h(u)||!E(u)?a+=" "+u:a+=" "+c(u);return a},e.deprecate=function(r,n){if(void 0!==t&&!0===t.noDeprecation)return r;if(void 0===t)return function(){return e.deprecate(r,n).apply(this,arguments)};var o=!1;return function(){if(!o){if(t.throwDeprecation)throw new Error(n);t.traceDeprecation?console.trace(n):console.error(n),o=!0}return r.apply(this,arguments)}};var i,a={};function c(t,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&&e._extend(n,r),b(n.showHidden)&&(n.showHidden=!1),b(n.depth)&&(n.depth=2),b(n.colors)&&(n.colors=!1),b(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),f(n,t,n.depth)}function u(t,e){var r=c.styles[e];return r?"["+c.colors[r][0]+"m"+t+"["+c.colors[r][1]+"m":t}function s(t,e){return t}function f(t,r,n){if(t.customInspect&&r&&x(r.inspect)&&r.inspect!==e.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,t);return m(o)||(o=f(t,o,n)),o}var i=function(t,e){if(b(e))return t.stylize("undefined","undefined");if(m(e)){var r="'"+JSON.stringify(e).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return t.stylize(r,"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,r);if(i)return i;var a=Object.keys(r),c=function(t){var e={};return t.forEach((function(t,r){e[t]=!0})),e}(a);if(t.showHidden&&(a=Object.getOwnPropertyNames(r)),w(r)&&(a.indexOf("message")>=0||a.indexOf("description")>=0))return l(r);if(0===a.length){if(x(r)){var u=r.name?": "+r.name:"";return t.stylize("[Function"+u+"]","special")}if(v(r))return t.stylize(RegExp.prototype.toString.call(r),"regexp");if(j(r))return t.stylize(Date.prototype.toString.call(r),"date");if(w(r))return l(r)}var s,E="",O=!1,q=["{","}"];(d(r)&&(O=!0,q=["[","]"]),x(r))&&(E=" [Function"+(r.name?": "+r.name:"")+"]");return v(r)&&(E=" "+RegExp.prototype.toString.call(r)),j(r)&&(E=" "+Date.prototype.toUTCString.call(r)),w(r)&&(E=" "+l(r)),0!==a.length||O&&0!=r.length?n<0?v(r)?t.stylize(RegExp.prototype.toString.call(r),"regexp"):t.stylize("[Object]","special"):(t.seen.push(r),s=O?function(t,e,r,n,o){for(var i=[],a=0,c=e.length;a<c;++a)T(e,String(a))?i.push(p(t,e,r,n,String(a),!0)):i.push("");return o.forEach((function(o){o.match(/^\d+$/)||i.push(p(t,e,r,n,o,!0))})),i}(t,r,n,c,a):a.map((function(e){return p(t,r,n,c,e,O)})),t.seen.pop(),function(t,e,r){if(t.reduce((function(t,e){return e.indexOf("\n")>=0&&0,t+e.replace(/\u001b\[\d\d?m/g,"").length+1}),0)>60)return r[0]+(""===e?"":e+"\n ")+" "+t.join(",\n ")+" "+r[1];return r[0]+e+" "+t.join(", ")+" "+r[1]}(s,E,q)):q[0]+E+q[1]}function l(t){return"["+Error.prototype.toString.call(t)+"]"}function p(t,e,r,n,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")),T(n,o)||(a="["+o+"]"),c||(t.seen.indexOf(u.value)<0?(c=h(r)?f(t,u.value,null):f(t,u.value,r-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")),b(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 b(t){return void 0===t}function v(t){return E(t)&&"[object RegExp]"===O(t)}function E(t){return"object"==typeof t&&null!==t}function j(t){return E(t)&&"[object Date]"===O(t)}function w(t){return E(t)&&("[object Error]"===O(t)||t instanceof Error)}function x(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(r){if(b(i)&&(i=t.env.NODE_DEBUG||""),r=r.toUpperCase(),!a[r])if(new RegExp("\\b"+r+"\\b","i").test(i)){var n=t.pid;a[r]=function(){var t=e.format.apply(e,arguments);console.error("%s %d: %s",r,n,t)}}else a[r]=function(){};return a[r]},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=b,e.isRegExp=v,e.isObject=E,e.isDate=j,e.isError=w,e.isFunction=x,e.isPrimitive=function(t){return null===t||"boolean"==typeof t||"number"==typeof t||"string"==typeof t||"symbol"==typeof t||void 0===t},e.isBuffer=r(6);var S=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function k(){var t=new Date,e=[q(t.getHours()),q(t.getMinutes()),q(t.getSeconds())].join(":");return[t.getDate(),S[t.getMonth()],e].join(" ")}function T(t,e){return Object.prototype.hasOwnProperty.call(t,e)}e.log=function(){console.log("%s - %s",k(),e.format.apply(e,arguments))},e.inherits=r(7),e._extend=function(t,e){if(!e||!E(e))return t;for(var r=Object.keys(e),n=r.length;n--;)t[r[n]]=e[r[n]];return t};var $="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function P(t,e){if(!t){var r=new Error("Promise was rejected with a falsy value");r.reason=t,t=r}return e(t)}e.promisify=function(t){if("function"!=typeof t)throw new TypeError('The "original" argument must be of type Function');if($&&t[$]){var e;if("function"!=typeof(e=t[$]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(e,$,{value:e,enumerable:!1,writable:!1,configurable:!0}),e}function e(){for(var e,r,n=new Promise((function(t,n){e=t,r=n})),o=[],i=0;i<arguments.length;i++)o.push(arguments[i]);o.push((function(t,n){t?r(t):e(n)}));try{t.apply(this,o)}catch(t){r(t)}return n}return Object.setPrototypeOf(e,Object.getPrototypeOf(t)),$&&Object.defineProperty(e,$,{value:e,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(e,n(t))},e.promisify.custom=$,e.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function r(){for(var r=[],n=0;n<arguments.length;n++)r.push(arguments[n]);var o=r.pop();if("function"!=typeof o)throw new TypeError("The last argument must be of type Function");var i=this,a=function(){return o.apply(i,arguments)};e.apply(this,r).then((function(e){t.nextTick(a,null,e)}),(function(e){t.nextTick(P,e,a)}))}return Object.setPrototypeOf(r,Object.getPrototypeOf(e)),Object.defineProperties(r,n(e)),r}}).call(this,r(5))},function(t,e){var r,n,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(r===setTimeout)return setTimeout(t,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(t){r=i}try{n="function"==typeof clearTimeout?clearTimeout:a}catch(t){n=a}}();var u,s=[],f=!1,l=-1;function p(){f&&u&&(f=!1,u.length?s=u.concat(s):l=-1,s.length&&d())}function d(){if(!f){var t=c(p);f=!0;for(var e=s.length;e;){for(u=s,s=[];++l<e;)u&&u[l].run();l=-1,e=s.length}u=null,f=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===a||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.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 r=1;r<arguments.length;r++)e[r-1]=arguments[r];s.push(new y(t,e)),1!==s.length||f||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 r=function(){};r.prototype=e.prototype,t.prototype=new r,t.prototype.constructor=t}},function(e,r){e.exports=t},function(t,r){t.exports=e}])}));
{
"name": "@simpleview/assertlib",
"version": "1.1.1",
"version": "1.2.0",
"description": "Assertion helper",

@@ -5,0 +5,0 @@ "author": "Owen Allen <owenallenaz@gmail.com>",

@@ -48,3 +48,13 @@ var assert = require("assert");

options = options || {};
_deepCheck(data, schema, ["root"], undefined, options);
try {
_deepCheck(data, schema, ["root"], undefined, options);
} catch(e) {
try {
console.log("deepCheck data:", JSON.stringify(data));
} catch(e) {
// if we're unable to stringify the result, we fail silently
}
throw e;
}
}

@@ -51,0 +61,0 @@

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