UNPKG
isset
Version:
latest (1.0.4)
1.0.4
1.0.3
1.0.2
1.0.1
1.0.0
Determine if a variable is set and is not NULL
github.com/FlamingoJS/isset
FlamingoJS/isset
isset
/
index.js
8 lines
(7 loc)
•
197 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
module
.
exports
=
function
isset
(
string
) {
if
(
typeof
string
===
'string'
) {
return
string
.
trim
().
length
>
0
; }
else
{
return
!(
typeof
string
===
'undefined'
||
string
===
null
); } };