mirror of
https://github.com/flynx/types.js.git
synced 2025-10-28 10:00:08 +00:00
minor name change...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
4a804b4bb2
commit
fd325e8555
12
Promise.js
12
Promise.js
@ -184,8 +184,8 @@ function(list){
|
||||
return list.flat() }
|
||||
|
||||
//
|
||||
// onResolveItem(<list>, <onupdate>[, <ondone>])
|
||||
// onResolveItem(<list>, <options>)
|
||||
// itemResolved(<list>, <onupdate>[, <ondone>])
|
||||
// itemResolved(<list>, <options>)
|
||||
// -> <list>
|
||||
//
|
||||
// <onupdate>(<elem>, <index>, <list>)
|
||||
@ -201,8 +201,8 @@ function(list){
|
||||
// }
|
||||
//
|
||||
// XXX rename to Promise.each(..) or Promise.eachPromise(..) ???
|
||||
var onResolveItem =
|
||||
module.onResolveItem =
|
||||
var itemResolved =
|
||||
module.itemResolved =
|
||||
function(list, onupdate, ondone){
|
||||
if(typeof(onupdate) != 'function'){
|
||||
var {onupdate, ondone} = onupdate }
|
||||
@ -215,7 +215,7 @@ function(list, onupdate, ondone){
|
||||
onupdate(elem, i, list) }) } }
|
||||
return list }
|
||||
|
||||
// Like onResolveItem(..) but both onupdate and ondone are optional...
|
||||
// Like itemResolved(..) but both onupdate and ondone are optional...
|
||||
//
|
||||
// XXX do not modify the array after this is called and until ondone(..) is called...
|
||||
// XXX should this know how to expand things???
|
||||
@ -225,7 +225,7 @@ function(list, onupdate, ondone){
|
||||
if(onupdate
|
||||
&& typeof(onupdate) != 'function'){
|
||||
var {onupdate, ondone} = onupdate }
|
||||
return onResolveItem(list,
|
||||
return itemResolved(list,
|
||||
function(elem, i, list){
|
||||
list[i] = elem
|
||||
typeof(onupdate) == 'function'
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user