mirror of
https://github.com/jashkenas/coffeescript.git
synced 2026-02-17 11:01:25 -05:00
removed helpers.{indexOf,include} in favor of in operator
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user