From 91b123a40e1d5eb54e771461e271f94051618c62 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Sun, 23 Nov 2014 13:42:03 +0000 Subject: Frames; tidy up. --- lib/utils.coffee | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'lib') 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 -- cgit v1.2.3