UNPKG
defined
Version:
latest (1.0.1)
1.0.1
1.0.0
0.0.0
return the first argument that is `!== undefined`
github.com/inspect-js/defined
inspect-js/defined
defined
/
index.js
10 lines
(8 loc)
•
178 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
'use strict'
;
module
.
exports
=
function
defined
(
) {
for
(
var
i =
0
; i <
arguments
.
length
; i++) {
if
(
typeof
arguments
[i] !==
'undefined'
) {
return
arguments
[i]; } } };