isasync

1.0.0 • Public • Published

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

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

Package Sidebar

Install

npm i isasync

Weekly Downloads

1

Version

1.0.0

License

MIT

Last publish

Collaborators

  • nof1000