Sha256: d318542094f0f83028e7c150f7be97cec89325cb60f46c2f3d26d8128ed04a31

Contents?: true

Size: 422 Bytes

Versions: 12

Compression:

Stored size: 422 Bytes

Contents

Lanes.lib.debounce = {
    debounce: (fn, options={})->
        options.scope ||= this
        options.delay ||= 250
        _.debounce( ->
            fn.apply(options.scope, (options.arguments||[]).concat(arguments...))
        , options.delay )

    debounceMethod: (method,options)->
        original = this[method]
        this[method] = @debounce( ->
            original.apply(this, arguments)
        ,options)
}

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
lanes-0.1.9 client/lanes/lib/debounce.coffee
lanes-0.1.8 client/lanes/lib/debounce.coffee
lanes-0.1.7 client/lanes/lib/debounce.coffee
lanes-0.1.6 client/lanes/lib/debounce.coffee
lanes-0.1.5 client/lanes/lib/debounce.coffee
lanes-0.1.2 client/lanes/lib/debounce.coffee
lanes-0.1.0 client/lanes/lib/debounce.coffee
lanes-0.0.8 client/lanes/lib/debounce.coffee
lanes-0.0.5 client/lanes/lib/debounce.coffee
lanes-0.0.3 client/javascripts/lib/debounce.coffee
lanes-0.0.2 client/javascripts/lib/debounce.coffee
lanes-0.0.1 client/javascripts/lib/debounce.coffee