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

https://github.com/nof1000/isasync

👷 ES7: checks whether a value is an async function
https://github.com/nof1000/isasync

async es6 es7 es7-async function is javascript nodejs utility

Last synced: about 2 months ago
JSON representation

👷 ES7: checks whether a value is an async function

Awesome Lists containing this project

README

          



Header of isAsync


isclass
 • 
isarrow
 • 
isasync

## What it's for?
This is Node.js library that checks whether a value is an async function

## Install
npm:
```
$ npm install isasync --save
```

yarn:
```
$ yarn add isasync
```

## Example
```js
const isAsync = require('isasync');

console.log(isAsync("hello world")); // > false
console.log(isAsync(function() {})); // > false
console.log(isAsync(async function() {})); // > true
console.log(isAsync(class {})); // > false
console.log(isAsync(() => {})); // > false
console.log(isAsync(async () => {})); // > true
console.log(isAsync(123)); // > false
console.log(isAsync({})); // > false
console.log(isAsync([])); // > false
```

## LICENSE
[MIT](./LICENSE "The MIT License")