Skip to content

Commit 5d0df3f

Browse files
committed
in op - remove check to support sparse arrays
1 parent 1319cb4 commit 5d0df3f

File tree

5 files changed

+23
-24
lines changed

5 files changed

+23
-24
lines changed

lib/ast.js

Lines changed: 14 additions & 14 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/browser.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/lexer.js

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/ast.ls

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2677,9 +2677,9 @@ UTILS =
26772677
return r;
26782678
}'''
26792679

2680-
in: '''function(x, arr){
2681-
var i = -1, l = arr.length >>> 0;
2682-
while (++i < l) if (x === arr[i] && i in arr) return true;
2680+
in: '''function(x, xs){
2681+
var i = -1, l = xs.length >>> 0;
2682+
while (++i < l) if (x === xs[i]) return true;
26832683
return false;
26842684
}'''
26852685

test/operator.ls

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ eq true, 4 not in array
8585
eq true, 1 not in []
8686
eq true, [3]pop() in [0, ...array]
8787
eq true, [4]pop() in [...array, 4]
88-
ok void not in length: 1
8988

9089
eq 1, +( 0 in [0])
9190
eq 0, +(10 in [ ])

0 commit comments

Comments
 (0)