From 6624740a639f3bb177a56999227bfcd24aba3712 Mon Sep 17 00:00:00 2001 From: Stephen Blott Date: Fri, 30 Jan 2015 11:35:58 +0000 Subject: Visual/edit modes: another minor code review. --- lib/utils.coffee | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'lib/utils.coffee') diff --git a/lib/utils.coffee b/lib/utils.coffee index c04bf417..64c87842 100644 --- a/lib/utils.coffee +++ b/lib/utils.coffee @@ -163,6 +163,12 @@ Utils = identities.push obj "identity-" + index + # Return a copy of object, but with some of its properties omitted. + copyObjectOmittingProperties: (obj, properties...) -> + obj = extend {}, obj + delete obj[property] for property in properties + obj + # This creates a new function out of an existing function, where the new function takes fewer arguments. This # allows us to pass around functions instead of functions + a partial list of arguments. Function::curry = -> -- cgit v1.2.3