UNPKG

typeof--

Version:

retrieve the type of your value by using constructors when possible

25 lines (24 loc) 701 B
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>test amd implementation</title> <script src="../node_modules/requirejs/require.js"></script> <script> require.config({ baseUrl: "/", paths: { 'typeof--':'./index' //index.js file of typeof-- } }); requirejs(['typeof--'], function(typeOf) { alert(typeof typeOf); alert(typeOf(42)); alert(typeOf(42)==='Number'); alert(typeOf((new (/* (( */ ( /* ( */ function /* */ ie_test /* */ (){}))()))==='ie_test'); }); </script> </head> <body> </body> </html>