UNPKG
go-fns
Version:
latest (1.0.0)
1.0.0
Utility functions for functions.
github.com/koyote130708/go-fns
koyote130708/go-fns
go-fns
/
src
/
expectFunctions.js
10 lines
(9 loc)
•
289 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
10
function
expectFunctions
(
args
)
{
for
(
var
i =
0
; i <
args
.length; i++) {
if
(
args
[i] !=
null
&&
typeof
args
[i] !==
"function"
) {
throw
new
TypeError(
"Expected a function, but found: "
+
args
[i]); } }
return
args
; } module.exports = expectFunctions;