main
Last change
on this file was d24f17c, checked in by Aleksandar Panovski <apano77@…>, 15 months ago |
Initial commit
|
-
Property mode
set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | "use strict";
|
---|
2 |
|
---|
3 | exports.__esModule = true;
|
---|
4 | exports["default"] = void 0;
|
---|
5 | var _ramda = require("ramda");
|
---|
6 | var _isGeneratorFunction = _interopRequireDefault(require("./isGeneratorFunction"));
|
---|
7 | var _isAsyncFunction = _interopRequireDefault(require("./isAsyncFunction"));
|
---|
8 | function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
---|
9 | /**
|
---|
10 | * Checks if input value is `Function`.
|
---|
11 | *
|
---|
12 | * @func isFunction
|
---|
13 | * @memberOf RA
|
---|
14 | * @since {@link https://char0n.github.io/ramda-adjunct/0.5.0|v0.5.0}
|
---|
15 | * @category Type
|
---|
16 | * @sig * -> Boolean
|
---|
17 | * @param {*} val The value to test
|
---|
18 | * @return {boolean}
|
---|
19 | * @see {@link RA.isNotFunction|isNotFunction}, {@link RA.isAsyncFunction|isNotAsyncFunction}, {@link RA.isGeneratorFunction|isGeneratorFunction}
|
---|
20 | * @example
|
---|
21 | *
|
---|
22 | * RA.isFunction(function test() { }); //=> true
|
---|
23 | * RA.isFunction(function* test() { }); //=> true
|
---|
24 | * RA.isFunction(async function test() { }); //=> true
|
---|
25 | * RA.isFunction(() => {}); //=> true
|
---|
26 | * RA.isFunction(null); //=> false
|
---|
27 | * RA.isFunction('abc'); //=> false
|
---|
28 | */
|
---|
29 | var isFunction = (0, _ramda.anyPass)([(0, _ramda.pipe)(_ramda.type, (0, _ramda.identical)('Function')), _isGeneratorFunction["default"], _isAsyncFunction["default"]]);
|
---|
30 | var _default = isFunction;
|
---|
31 | exports["default"] = _default; |
---|
Note:
See
TracBrowser
for help on using the repository browser.