UNPKG

@pro-script/as-is

Version:

Check your types at runtime with ESNext syntax by meta programing in node.js and browser with interfaces, types, strict object and more.

18 lines (16 loc) 487 B
const modules = await import('../../index.js'); const { Checker, MicroTest } = modules; const checker = new Checker(); const { as, is} = checker; const { IS, CHECK} = new MicroTest({ is, as }); export default { 'check.values':()=> { CHECK.true(true); CHECK.false(is.false(false)); IS.argument([]); CHECK['5 === 5'](5 === 5); CHECK['5 > 4'](5 > 4); CHECK['5 >= 5'](5 >= 5); CHECK['[2].includes(2)']([2].includes(2)); } }