diff options
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/utils.coffee | 12 | 
1 files changed, 6 insertions, 6 deletions
| diff --git a/lib/utils.coffee b/lib/utils.coffee index 428112c8..c8a02328 100644 --- a/lib/utils.coffee +++ b/lib/utils.coffee @@ -145,15 +145,15 @@ Function::curry = ->  Array.copy = (array) -> Array.prototype.slice.call(array, 0) -String::startsWith = (str) -> @indexOf(str) == 0 -  Array::rotate = (count) -> -  return this if @length == 0 -  count = count % @length -  count = count + @length if count < 0 -  Array::push.apply(this, @splice(0, count)) +  if @length +    count = count % @length +    count += @length while count < 0 +    Array::push.apply(this, @splice(0, count))    this +String::startsWith = (str) -> @indexOf(str) == 0 +  globalRoot = window ? global  globalRoot.extend = (hash1, hash2) ->    for key of hash2 | 
