Skip to content

nof1000/isasync

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Releases

No releases published

Packages

No packages published