From fd325e85552481c6e9f8586464852fc16b1c2381 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Tue, 10 Jan 2023 13:41:17 +0300 Subject: [PATCH] minor name change... Signed-off-by: Alex A. Naanou --- Promise.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Promise.js b/Promise.js index e018b62..d29e602 100644 --- a/Promise.js +++ b/Promise.js @@ -184,8 +184,8 @@ function(list){ return list.flat() } // -// onResolveItem(, [, ]) -// onResolveItem(, ) +// itemResolved(, [, ]) +// itemResolved(, ) // -> // // (, , ) @@ -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'