if not Array.prototype.add? Object.defineProperty( Array.prototype 'add' {} value: Array.prototype.push ) if not Array.prototype.remove? Object.defineProperty( Array.prototype 'remove' {} value: -> for item in arguments let index = @lastIndexOf(item) if index >= 0 @splice(index, 1) ) if not Array.prototype.contains? Object.defineProperty( Array.prototype 'contains' {} value: (item) -> @indexOf(item) >= 0 )