backbone.event.one

add one method to Backbone.Events

Backbone.event.one

Add one method to Backbone.Events

<script src="../lib/jquery-1.8.2.min.js" type="text/javascript"></script>
<script src="../lib/underscore-min.js" type="text/javascript"></script>
<script src="../lib/backbone-min.js" type="text/javascript"></script>
<script src="../lib/backbone.event.one.js" type="text/javascript"></script>
eventSpy = sinon.spy()
 
obj = _.extend {}Backbone.Events
obj.one "test"eventSpycontext->
  _this.filterSpy.apply thisarguments
  _this.filterReturnValue
 
obj.trigger "test"
obj.trigger "test"
eventSpy.calledOnce.should.be.true