removed helpers.{indexOf,include} in favor of in operator

This commit is contained in:
satyr
2010-10-20 11:04:38 +09:00
parent c1d24944dc
commit 2c84f3ed1f
11 changed files with 516 additions and 550 deletions

View File

@@ -1,21 +1,9 @@
{indexOf, include, starts, ends, compact, count, merge, extend, flatten, del, last} = CoffeeScript.helpers
{starts, ends, compact, count, merge, extend, flatten, del, last} = CoffeeScript.helpers
array = [0..4]
string = array.join ''
object = {}
# Test `indexOf`
eq 0, indexOf array, 0
eq 2, indexOf array, 2
eq 4, indexOf array, 4
eq(-1, indexOf array, 6)
# Test `include`
ok include array, 0
ok include array, 2
ok include array, 4
ok not include array, 6
# Test `starts`
ok starts string, '012'
ok starts string, '34', 3