Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
class @kdApi
constructor : (className,funcName) ->
data = @runFunction(className,funcName,data)
getInstance : (className) ->
inst = false
try if eval(className) then inst = eval("new "+className+"()")
return inst
runFunction : (className,funcName,data) ->
instance = @getInstance(className)
instance[funcName](data) if instance and instance[funcName]?
return instance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.