Use - as filename seperator for coffee script files. Fixes #15.
Also clean unused files and wrong file names.
This commit is contained in:
parent
9ea1f9956e
commit
bb69d99423
15 changed files with 28 additions and 39 deletions
21
common/api/lib/callbacks-registry.coffee
Normal file
21
common/api/lib/callbacks-registry.coffee
Normal file
|
@ -0,0 +1,21 @@
|
|||
module.exports =
|
||||
class CallbacksRegistry
|
||||
constructor: ->
|
||||
@nextId = 0
|
||||
@callbacks = {}
|
||||
|
||||
add: (callback) ->
|
||||
@callbacks[++@nextId] = callback
|
||||
@nextId
|
||||
|
||||
get: (id) ->
|
||||
@callbacks[id]
|
||||
|
||||
call: (id, args...) ->
|
||||
@get(id).call global, args...
|
||||
|
||||
apply: (id, args...) ->
|
||||
@get(id).apply global, args...
|
||||
|
||||
remove: (id) ->
|
||||
delete @callbacks[id]
|
Loading…
Add table
Add a link
Reference in a new issue