You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+34-33
Original file line number
Diff line number
Diff line change
@@ -1,14 +1,13 @@
1
-
# is-async-function [](https://www.npmjs.com/package/is-async-function)[![mit license][license-img]][license-url][](https://npmjs.org/package/is-async-function)[![npm total downloads][downloads-img]][downloads-url]
1
+
# is-async-function [![npm version][npmv-img]][npmv-url][![mit license][license-img]][license-url][](https://npmjs.org/package/is-async-function)[![npm total downloads][downloads-img]][downloads-url]
2
2
3
3
> Is function really asynchronous function? Trying to guess that based on check if [common-callback-names][] exists as function arguments names or you can pass your custom.
4
4
5
-
[![code style][standard-img]][standard-url]
6
-
[![linux build][travis-img]][travis-url]
7
-
[![windows build][appveyor-img]][appveyor-url]
8
-
[![code coverage][coverage-img]][coverage-url]
5
+
[![code style][standard-img]][standard-url]
6
+
[![linux build][travis-img]][travis-url]
7
+
[![code coverage][coverage-img]][coverage-url]
9
8
[![dependency status][david-img]][david-url]
10
-
11
-
[![Become a Patron][patreon-img]][patreon-url][![ko-fi.com buy me a coffee][kofi-img]][kofi-url]
9
+
[![paypal donate][paypalme-img]][paypalme-url]
10
+
[![Buy me a Kofi][kofi-img]][kofi-url]
12
11
13
12
You might also be interested in [always-done](https://github.com/hybridables/always-done#readme).
14
13
@@ -46,9 +45,12 @@ $ yarn add is-async-function
46
45
constisAsyncFunction=require('is-async-function')
47
46
```
48
47
48
+
_**Important Note:** It may fail, if the given function is using "default params" like `options = { foo: 1 }`.
49
+
That limitation comes currently from the `function-arguments` package. It may or may not be fixed there in future._
50
+
49
51
## API
50
52
51
-
### [isAsyncFunction](index.js#L50)
53
+
### [isAsyncFunction](index.js#L53)
52
54
> Trying to guess is `fn` asynchronous function or not. But not [is-callback-function][] be aware of that diff.
-[always-done](https://www.npmjs.com/package/always-done): Handle completion and errors with elegance! Support for streams, callbacks, promises, child processes, async/await and sync functions. A drop-in replacement… [more](https://github.com/hybridables/always-done#readme) | [homepage](https://github.com/hybridables/always-done#readme"Handle completion and errors with elegance! Support for streams, callbacks, promises, child processes, async/await and sync functions. A drop-in replacement for [async-done][] - pass 100% of its tests plus more")
120
122
-[common-callback-names](https://www.npmjs.com/package/common-callback-names): List of common callback names - callback, cb, callback_, next, done. | [homepage](https://github.com/tunnckocore/common-callback-names#readme"List of common callback names - callback, cb, callback_, next, done.")
121
123
-[fn-args](https://www.npmjs.com/package/fn-args): Get the arguments of a function, arrow function, generator function, async function | [homepage](https://github.com/sindresorhus/fn-args#readme"Get the arguments of a function, arrow function, generator function, async function")
122
-
-[fn-name](https://www.npmjs.com/package/fn-name): Get the name of a named function | [homepage](https://github.com/sindresorhus/fn-name"Get the name of a named function")
124
+
-[fn-name](https://www.npmjs.com/package/fn-name): Get the name of a named function | [homepage](https://github.com/sindresorhus/fn-name#readme"Get the name of a named function")
123
125
-[function-arguments](https://www.npmjs.com/package/function-arguments): Get arguments of a function, useful for and used in dependency injectors. Works for regular functions, generator functions and arrow… [more](https://github.com/tunnckocore/function-arguments#readme) | [homepage](https://github.com/tunnckocore/function-arguments#readme"Get arguments of a function, useful for and used in dependency injectors. Works for regular functions, generator functions and arrow functions.")
124
126
-[get-fn-name](https://www.npmjs.com/package/get-fn-name): Get function name with strictness and correctness in mind. Also works for arrow functions and getting correct name of bounded… [more](https://github.com/tunnckocore/get-fn-name#readme) | [homepage](https://github.com/tunnckocore/get-fn-name#readme"Get function name with strictness and correctness in mind. Also works for arrow functions and getting correct name of bounded functions. Powered by [fn-name][].")
125
127
-[is-callback-function](https://www.npmjs.com/package/is-callback-function): Returns true if function is a callback. Checks its name is one of [common-callback-names][] - callback, cb, cb_, callback_, next… [more](https://github.com/tunnckocore/is-callback-function#readme) | [homepage](https://github.com/tunnckocore/is-callback-function#readme"Returns true if function is a callback. Checks its name is one of [common-callback-names][] - callback, cb, cb_, callback_, next, done, they can be customized, these are default.")
126
128
-[minibase](https://www.npmjs.com/package/minibase): Minimalist alternative for Base. Build complex APIs with small units called plugins. Works well with most of the already existing… [more](https://github.com/node-minibase/minibase#readme) | [homepage](https://github.com/node-minibase/minibase#readme"Minimalist alternative for Base. Build complex APIs with small units called plugins. Works well with most of the already existing [base][] plugins.")
127
-
-[parse-function](https://www.npmjs.com/package/parse-function): Parse a function into an object that has its name, body, args and a few more useful properties. | [homepage](https://github.com/tunnckocore/parse-function#readme"Parse a function into an object that has its name, body, args and a few more useful properties.")
129
+
-[parse-function](https://www.npmjs.com/package/parse-function): Parse a function into an object using espree, acorn or babylon parsers. Extensible through Smart Plugins | [homepage](https://tunnckocore.com/opensource"Parse a function into an object using espree, acorn or babylon parsers. Extensible through Smart Plugins")
128
130
-[try-catch-core](https://www.npmjs.com/package/try-catch-core): Low-level package to handle completion and errors of sync or asynchronous functions, using [once][] and [dezalgo][] libs. Useful for and… [more](https://github.com/hybridables/try-catch-core#readme) | [homepage](https://github.com/hybridables/try-catch-core#readme"Low-level package to handle completion and errors of sync or asynchronous functions, using [once][] and [dezalgo][] libs. Useful for and used in higher-level libs such as [always-done][] to handle completion of anything.")
129
131
130
132
## Contributing
131
-
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/tunnckoCore/is-async-function/issues/new).
132
-
Please read the [contributing guidelines](CONTRIBUTING.md) for advice on opening issues, pull requests, and coding standards.
133
+
Pull requests and stars are always welcome. For bugs and feature requests, [please create an issue](https://github.com/tunnckoCore/is-async-function/issues/new).
134
+
Please read the [contributing guidelines](CONTRIBUTING.md) for advice on opening issues, pull requests, and coding standards.
133
135
If you need some help and can spent some cash, feel free to [contact me at CodeMentor.io](https://www.codementor.io/tunnckocore?utm_source=github&utm_medium=button&utm_term=tunnckocore&utm_campaign=github) too.
134
136
135
137
**In short:** If you want to contribute to that project, please follow these things
@@ -159,23 +161,24 @@ $ npm install && npm test
159
161
160
162
## Author
161
163
**Charlike Mike Reagent**
164
+
+[GitHub Profile](https://github.com/Charlike Mike Reagent)
165
+
+[Twitter Profile](https://twitter.com/Charlike Mike Reagent)
Copy file name to clipboardExpand all lines: package.json
+6-7
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "is-async-function",
3
-
"version": "1.2.3",
3
+
"version": "1.2.4",
4
4
"description": "Is function really asynchronous function? Trying to guess that based on check if [common-callback-names][] exists as function arguments names or you can pass your custom.",
5
5
"repository": "tunnckoCore/is-async-function",
6
6
"author": "Charlike Mike Reagent <@tunnckoCore> (https://i.am.charlike.online)",
0 commit comments