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
- Host: GitHub
- URL: https://github.com/nof1000/isasync
- Owner: nof1000
- License: mit
- Created: 2017-02-23T04:03:59.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-05-07T14:52:35.000Z (about 9 years ago)
- Last Synced: 2026-01-01T09:35:03.770Z (6 months ago)
- Topics: async, es6, es7, es7-async, function, is, javascript, nodejs, utility
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/isasync
- Size: 10.7 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
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")