UNPKG
@nathanfaucett/parallel
Version:
latest (0.0.3)
0.0.3
0.0.2
0.0.1
parallel for the browser and node.js
gitlab.com/nathanfaucett/js-parallel
@nathanfaucett/parallel
/
src
/
throwIfNotFunction.js
9 lines
(7 loc)
•
209 B
JavaScript
View Raw
1
2
3
4
5
6
7
8
9
var
isFunction =
require
(
"@nathanfaucett/is_function"
);
module
.
exports
= throwIfNotFunction;
function
throwIfNotFunction
(
value
) {
if
(!
isFunction
(value)) {
throw
new
Error
(
"tasks must be functions"
); } }