aboutsummaryrefslogtreecommitdiffstats
path: root/lib/utils.coffee
diff options
context:
space:
mode:
authorStephen Blott2015-01-30 11:35:58 +0000
committerStephen Blott2015-01-30 13:52:37 +0000
commit6624740a639f3bb177a56999227bfcd24aba3712 (patch)
tree56aa1e6e8661ab132c1467b2634779c1f850ce9b /lib/utils.coffee
parentec4e2791537c57887471f0d7a6ab1d4e642d1744 (diff)
downloadvimium-6624740a639f3bb177a56999227bfcd24aba3712.tar.bz2
Visual/edit modes: another minor code review.
Diffstat (limited to 'lib/utils.coffee')
-rw-r--r--lib/utils.coffee6
1 files changed, 6 insertions, 0 deletions
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 = ->