An open API service indexing awesome lists of open source software.

https://github.com/nof1000/isarrow

🤠 ES6: checks whether a value is an arrow function
https://github.com/nof1000/isarrow

arrow es6 function javascript nodejs utility

Last synced: 5 months ago
JSON representation

🤠 ES6: checks whether a value is an arrow function

Awesome Lists containing this project

README

          



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
```js
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](./LICENSE "The MIT License")