mirror of
https://github.com/flynx/types.js.git
synced 2025-10-29 02:20:07 +00:00
fixes...
Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
parent
965acefe61
commit
c3c611c0bc
14
Array.js
14
Array.js
@ -227,17 +227,17 @@ var makeChunkIter = function(iter, wrapper){
|
||||
func = args.shift()
|
||||
;[func, postChunk] = func instanceof Array ? func : [func]
|
||||
rest = args
|
||||
var res = []
|
||||
var _wrapper = wrapper.bind(this, res, func, this)
|
||||
|
||||
// special case...
|
||||
// no need to setTimeout(..) if smaller than size...
|
||||
if(this.length <= size){
|
||||
var res = this[iter](_wrapper, ...rest)
|
||||
return Promise.all(
|
||||
postChunk ?
|
||||
postChunk.call(this, this, res, 0)
|
||||
: res) }
|
||||
var res = this[iter](func, ...rest)
|
||||
postChunk
|
||||
&& postChunk.call(this, this, res, 0)
|
||||
return Promise.all(res) }
|
||||
|
||||
var res = []
|
||||
var _wrapper = wrapper.bind(this, res, func, this)
|
||||
|
||||
return new Promise(function(resolve, reject){
|
||||
var next = function(chunks){
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "ig-types",
|
||||
"version": "2.0.20",
|
||||
"version": "2.0.21",
|
||||
"description": "Generic JavaScript types and type extensions...",
|
||||
"main": "main.js",
|
||||
"scripts": {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user