Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@ AsyncLock.DEFAULT_MAX_PENDING = 1000;
*
* @param {String|Array} key resource key or keys to lock
* @param {function} fn async function
* @param {function} cb (optional) callback function, otherwise will return a promise
* @param {Object} opts (optional) options
* @param {function} [cb] callback function, otherwise will return a promise
* @param {Object} [opts] options
*/
AsyncLock.prototype.acquire = function(key, fn, cb, opts){
if(Array.isArray(key)){
Expand Down Expand Up @@ -211,7 +211,7 @@ AsyncLock.prototype._acquireBatch = function(keys, fn, cb, opts){
/*
* Whether there is any running or pending asyncFunc
*
* @param {String} key (Optional)
* @param {String} [key]
*/
AsyncLock.prototype.isBusy = function(key){
if(!key){
Expand Down