From 2b811c913e4f64fbda5dd8cba35415f943624c81 Mon Sep 17 00:00:00 2001 From: Phil Crosby Date: Tue, 12 Jun 2012 10:52:14 -0700 Subject: Add a global extend function --- lib/utils.coffee | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib') 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 -- cgit v1.2.3