Skip to content

Commit c71b5e6

Browse files
committed
Add note
1 parent ee19aab commit c71b5e6

File tree

1 file changed

+1
-0
lines changed
  • lib/node_modules/@stdlib/array/filled-by/lib

1 file changed

+1
-0
lines changed

lib/node_modules/@stdlib/array/filled-by/lib/main.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -356,6 +356,7 @@ function filledarrayBy() {
356356
}
357357
throw new TypeError( 'invalid argument. Must provide a length, typed array, array-like object, or an iterable. Value: `'+arg+'`.' );
358358
}
359+
// TODO: there are possible performance improvements here. Namely, for array-like object and iterator source values, we need only know the length; otherwise, we traverse an output array twice, setting values along the way both times.
359360
if ( nargs === 0 ) {
360361
arr = new ctor( arguments[0] );
361362
} else if ( nargs === 1 ) {

0 commit comments

Comments
 (0)