Skip to content

nof1000/isarrow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Header of isArrow

isclass  •  isarrow  •  isasync

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

LICENSE

MIT

Releases

No releases published

Packages

No packages published