MIRROR: javascript for ๐Ÿœ's, a tiny runtime with big ambitions
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

tiny .splice fix

+6 -1
+5
examples/spec/arrays.js
··· 232 232 spliceArr2.splice(1, 0, 99, 100); 233 233 testDeep('splice insert', spliceArr2, [1, 99, 100, 2, 3]); 234 234 235 + let spliceNoArgs = [1, 2]; 236 + let spliceNoArgsRemoved = spliceNoArgs.splice(); 237 + testDeep('splice no args leaves array', spliceNoArgs, [1, 2]); 238 + testDeep('splice no args removes nothing', spliceNoArgsRemoved, []); 239 + 235 240 let entriesArr = ['a', 'b', 'c']; 236 241 let entriesResult = []; 237 242 for (let [i, v] of entriesArr.entries()) entriesResult.push([i, v]);
+1 -1
src/ant.c
··· 9938 9938 if (start > (int)len) start = (int)len; 9939 9939 } 9940 9940 9941 - int deleteCount = (int)len - start; 9941 + int deleteCount = nargs == 0 ? 0 : (int)len - start; 9942 9942 if (nargs >= 2 && vtype(args[1]) == T_NUM) { 9943 9943 deleteCount = (int) tod(args[1]); 9944 9944 if (deleteCount < 0) deleteCount = 0;