Patched an issue in Array.concat(Deep), Dictionary.merge(Deep) and Set.merge where they would stop at a nil value in the arguments. This closes #3.
This is because, when using ipairs, it automatically assumes the end of the array has been reached when it hits a nil value.
The new implementation uses select to process the vararg (...) in order to continue processing even if a nil value is present.
Out of Bound Indices
Array.insert will now properly handle out of bound indices.
An index of 0 will cause items to be inserted at the end of the array (since arrays are 1-indexed in Luau).
An index of length+1 will also allow values to be inserted at the end of the array. Indices of length+2 or greater will be ignored and return the original array (I'm open to changing this behaviour to throw if requested!).
Handle Holes in Arguments
Patched an issue in
Array.concat(Deep)
,Dictionary.merge(Deep)
andSet.merge
where they would stop at anil
value in the arguments. This closes #3.This is because, when using
ipairs
, it automatically assumes the end of the array has been reached when it hits anil
value.The new implementation uses
select
to process the vararg (...
) in order to continue processing even if anil
value is present.Out of Bound Indices
Array.insert
will now properly handle out of bound indices.An index of
0
will cause items to be inserted at the end of the array (since arrays are 1-indexed in Luau).An index of
length+1
will also allow values to be inserted at the end of the array. Indices oflength+2
or greater will be ignored and return the original array (I'm open to changing this behaviour to throw if requested!).Bump Package Versions
package.json
to v0.0.2wally.toml
to v0.0.2Bump Tooling Versions