Function extensions
import {
isAsyncFunction,
isAsyncGeneratorFunction,
isFunction,
isGeneratorFunction,
} from 'jsmodern/dist/function.js';
import { extend } from 'jsmodern';
extend({
function: [
isAsyncFunction,
isAsyncGeneratorFunction,
isFunction,
isGeneratorFunction,
],
});
console.log([
Function.isAsyncFunction,
Function.isAsyncGeneratorFunction,
Function.isFunction,
Function.isGeneratorFunction,
].every(n => 'function' === typeof(n)));
Check out API Reference.
MIT License © Rong Sen Ng