aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorPhil Crosby2012-06-12 10:52:14 -0700
committerPhil Crosby2012-06-12 22:00:35 -0700
commit2b811c913e4f64fbda5dd8cba35415f943624c81 (patch)
tree80af2ba952d96cf59a5f2a8234a8fe1d410105c3 /lib
parentf33de347f0de1448446eac462892addbe7a3c461 (diff)
downloadvimium-2b811c913e4f64fbda5dd8cba35415f943624c81.tar.bz2
Add a global extend function
Diffstat (limited to 'lib')
-rw-r--r--lib/utils.coffee6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/utils.coffee b/lib/utils.coffee
index e9409826..c83a6cf8 100644
--- a/lib/utils.coffee
+++ b/lib/utils.coffee
@@ -129,6 +129,12 @@ Class =
newClass.constructor = newClass
newClass
+globalRoot = if window? then window else global
+globalRoot.extend = (hash1, hash2) ->
+ for key of hash2
+ hash1[key] = hash2[key]
+ hash1
+
root = exports ? window
root.Utils = Utils
root.Class = Class