isFn
Checks if a value is a function.
Import
You can import the entire package and access the function:
_10import * as sdk from "@onflow/sdk"_10_10sdk.isFn(d)
Or import directly the specific function:
_10import { isFn } from "@onflow/sdk"_10_10isFn(d)
Usage
_10import { isFn } from "@onflow/sdk"_10_10console.log(isFn(() => {})); // true_10console.log(isFn(function() {})); // true_10console.log(isFn("function")); // false_10console.log(isFn({})); // false
Parameters
d
- Type:
any
- Description: The value to check
Returns
boolean