UNPKG

1.05 kBHTMLView Raw
1<!DOCTYPE html>
2<html lang="en">
3 <head>
4 <meta charset="utf-8">
5 <title>lazy-ass</title>
6 <script src="index.js"></script>
7 <style>
8 #log {
9 margin: 10px 0px;
10 display: block;
11 white-space: pre;
12 font-family: monospace;
13 }
14 #log:before {
15 content: "the javascript:";
16 font-style: italic;
17 color: #555;
18 }
19 </style>
20 </head>
21 <body>
22 <h1>lazy-ass</h1>
23 <p>Simple assertions with as many arguments as needed and intelligent serialization</p>
24
25 <script src="https://rawgit.com/bahmutov/console-log-div/master/console-log-div.js"></script>
26
27 <script id="log">
28 if (typeof lazyAss === 'undefined') {
29 throw new Error('Cannot find lazyAss object');
30 }
31 console.log('Found lazyAss function');
32 var foo = 3;
33 lac(foo === 'foo', 'this is an async exception', foo);
34 console.log('after async exception');
35 la(typeof foo === 'string', 'sync exception, variable foo is a string', foo);
36 </script>
37 </body>
38</html>