File tree 1 file changed +27
-1
lines changed
1 file changed +27
-1
lines changed Original file line number Diff line number Diff line change @@ -65,9 +65,35 @@ <h2 id="install">Install</h2>
65
65
< h2 id ="example "> Example</ h2 >
66
66
< h3 id ="empty "> empty</ h3 >
67
67
< pre class ="prettyprint source lang-javascript "> < code > is.empty('')
68
+ is.empty(new String())
69
+ is.empty(``)
70
+ is.empty(${``})
71
+
72
+ is.empty([])
73
+ is.empty(new Array())
74
+
75
+ is.empty({})
76
+ is.empty(new Object())
77
+
78
+ is.empty(null)
79
+ is.empty(undefined)
68
80
</ code > </ pre >
69
81
< h3 id ="not-empty "> not empty</ h3 >
70
- < pre class ="prettyprint source lang-javascript "> < code > is.empty('123')
82
+ < pre class ="prettyprint source lang-javascript "> < code > is.empty(1)
83
+ is.empty('string')
84
+ is.empty([1])
85
+ is.empty({a:1})
86
+ is.empty(true)
87
+ is.empty(false)
88
+
89
+ is.empty(new Date())
90
+ // other objects, except `new Object()`
91
+ </ code > </ pre >
92
+ < ul >
93
+ < li > check < code > ./test/datas/empty.js</ code > </ li >
94
+ </ ul >
95
+ < h2 id ="tests "> Tests</ h2 >
96
+ < pre class ="prettyprint source lang-bash "> < code > npm test
71
97
</ code > </ pre > </ article >
72
98
</ section >
73
99
You can’t perform that action at this time.
0 commit comments