Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

    backbone.event.onepublic

    Backbone.event.one

    Add one method to Backbone.Events

    Install

    <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>

    Usage

    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

    Keywords

    none

    install

    npm i backbone.event.one

    Downloadsweekly downloads

    5

    version

    0.0.1

    license

    none

    last publish

    collaborators

    • avatar