isarrow
v1.0.0
Published
Checks whether a value is an arrow function
Downloads
6
Maintainers
Readme
What it's for?
This is Node.js library that checks whether a value is an arrow function
Install
npm:
$ npm install isarrow --save
yarn:
$ yarn add isarrow
Example
const isArrow = require('isarrow');
console.log(isArrow("hello world")); // > false
console.log(isArrow(function() {})); // > false
console.log(isArrow(async function() {})); // > false
console.log(isArrow(class {})); // > false
console.log(isArrow(() => {})); // > true
console.log(isArrow(async () => {})); // > true
console.log(isArrow(123)); // > false
console.log(isArrow({})); // > false
console.log(isArrow([])); // > false