Skip to content

Simple package to check if a function is either an AsyncFunction or not

License

Notifications You must be signed in to change notification settings

simonecorsi/is-async-function

Repository files navigation

is-async-function

This package check if function provided is an AsyncFunction returning true/false.

Installation

npm i --save @scdev/is-async-function
# OR
yarn add @scdev/is-async-function

Usage

const isAsyncFunction = require('@scdev/is-async-function');
isAsyncFunction(() => {}) // false
isAsyncFunction(async () => {}) // true

Contributing

Project is pretty simple and straight forward for what is my needs, but if you have any idea you're welcome.

This projects uses commitizen so be sure to use standard commit format or PR won't be accepted

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'feat(scope): some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Simone Corsi - @im_simonecorsi