-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
81 lines (78 loc) · 2.9 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Typeis.js - it's the smart and simple javaScript type checker</title>
<meta name="description" content="Typeis. it's the smart and simple javaScript type checker;">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="refresh" content="0; url=https://typeis.gitbooks.io/docs/" />
<link href="https://fonts.googleapis.com/css?family=Roboto:400,700&subset=latin-ext" rel="stylesheet">
<link rel="apple-touch-icon" href="typeis.png">
<link rel="stylesheet" href="style/style.css">
<link rel="stylesheet" href="style/monokai-sublime.css">
</head>
<body>
<div id="header"></div>
<header>
<div id="head">
<img src="typeis.png" alt="Typeis. it's the smart and simple javaScript type checker">
<h1>typeis.js</h1>
<h3>Typeis. it's the smart and simple javaScript type checker</h3>
<div class="github-buttons">
<a href="https://github.com/typeis/typeisjs" class="github" ><img src="images/mark-github.svg" alt="Github"><span>Github </span></a>
</div>
<div id="terminal">
<span id="usage"></span>
</div>
<h5>Try at</h5>
<div class="code-playgrounds">
<a href="https://jsfiddle.net/27q079d1/" target="_blank">JSFiddle</a>
<a href="https://codepen.io/anon/pen/pNvrNQ" target="_blank">CodePen</a>
<a href="http://jsbin.com/vogixulice/edit?output" target="_blank">JS Bin</a>
<a href="https://plnkr.co/edit/jjAf4TrajIw7sDQvvAsb?p=preview" target="_blank">Plunker</a>
</div>
<p>Also you can try at the console (Developer tools (F12)).</p>
</div>
</header>
<section>
<h4>npm</h4>
<pre>
<code class="javascript">npm install typeis</code>
</pre>
<h4>bower</h4>
<pre>
<code class="javascript">bower install typeis</code>
</pre>
<h3>examples</h3>
<pre>
<code class="javascript">
var regexp = /test/gi
var arr = ['test'];
var now = new Date();
var obj = {};
console.log(regexp.typeis()); //RegExp;
console.log(regexp.typeis('regexp')); //true;
console.log(regexp.typeis('object')); //false;
console.log(arr.typeis()); //Array;
console.log(arr.typeis('array')); //true;
console.log(now.typeis()); //Date;
console.log(obj.typeis()); //Object;
</code>
</pre>
<h3>Real World Usage</h3>
<pre>
<code class="javascript">
function realWorld( options ){
if(options.typeis('object')){
//do something
} else {
//do another something
}
}
</code>
</pre>
</section>
<script src="dist/output.min.js"></script>
</body>
</html>