UNPKG

@httpx/assert

Version:
2 lines 755 B
'use strict';var r="Value is expected to be",n=e=>{let t=typeof e;switch(true){case e instanceof Date:{t="Date";break}case e instanceof Error:{t="Error";break}case typeof e=="function":{t="function";break}case e===null:{t="null";break}case e===void 0:{t="undefined";break}case typeof e=="bigint":{t=`bigint(length:${e.toString().length})`;break}case Array.isArray(e):{t=`array(size:${e.length})`;break}case Number.isNaN(e):{t="NaN";break}case typeof e=="number":{t=`number(length:${e.toString().length})`;break}case(e===false||e===true):{t=`boolean(${e})`;break}case typeof e=="string":{t=`string(length:${e.length})`;break}}return t};exports.errPfx=r;exports.getTypeInfo=n;//# sourceMappingURL=getTypeInfo.cjs.map //# sourceMappingURL=getTypeInfo.cjs.map