Add _.remove, which removes an element from an array in place

This commit is contained in:
Nathan Sobo
2012-03-13 18:17:27 -06:00
parent da3e1d4553
commit 4c79b43c52
2 changed files with 7 additions and 0 deletions

View File

@@ -6,6 +6,7 @@ Keymap = require 'keymap'
RootView = require 'root-view'
require 'jquery-extensions'
require 'underscore-extensions'
# This a weirdo file. We don't create a Window class, we just add stuff to
# the DOM window.

View File

@@ -0,0 +1,6 @@
_ = require 'underscore'
_.mixin
remove: (array, element) ->
array.splice(array.indexOf(element), 1)