browser.html (425B)
1 <!DOCTYPE html> 2 <html> 3 <head> 4 <title>typed-function | basic usage</title> 5 <script src="../typed-function.js"></script> 6 </head> 7 <body> 8 <script> 9 // create a typed function 10 var fn1 = typed({ 11 'number, string': function (a, b) { 12 return 'a is a number, b is a string'; 13 } 14 }); 15 16 // use the function 17 document.write(fn1(2, 'foo') + '<br>'); // outputs 'a is a number, b is a string' 18 </script> 19 </body> 20 </html>