vendor/assets/javascripts/quick_script/classes.js.coffee in quick_script-0.5.14 vs vendor/assets/javascripts/quick_script/classes.js.coffee in quick_script-0.7.0
- old
+ new
@@ -9,9 +9,12 @@
Array.prototype.itemAt = (val)->
return this.slice(val)[0]
Array.prototype.pushOnce = (item) ->
if (!this.includes(item))
this.push(item)
+Array.prototype.remove = (item) ->
+ idx = this.indexOf(item)
+ this.splice(idx, 1) if idx > -1
Date.from_utc = (utc) ->
new Date(utc * 1000)
Date.prototype.to_utc = ->
Math.round(this.getTime() / 1000.0)
String.prototype.endsWith = (suffix) ->