UNPKG

542 BJavaScriptView Raw
1
2
3 var type = require( "./" );
4
5
6
7 console.log( type.s( "some string" ) );
8 console.log( type.number( new Number(55) ) );
9 console.log( type.boolean( false ) );
10 console.log( type.function( function(){} ) );
11 console.log( type.object( {} ) );
12 console.log( type.date( new Date() ) );
13 console.log( type.error( new Error() ) );
14 console.log( type.regexp( /gg/ ) );
15 console.log( type.array( [] ) );
16
17
18
19 console.log( type.stringArray( [ 1, "asas" ] ) );
20 console.log( type.ba( [ true, false ] ) );
21
22
23 console.log( type( "ee" ), type( /f/ ) );