@danielkalen/simplybind
Version:
Magically simple, framework-less one-way/two-way data binding for frontend/backend in ~5kb.
26 lines (16 loc) • 690 B
text/coffeescript
SimplyBind.version = import '../../.config/.version.coffee'
SimplyBind.settings = settings
SimplyBind.defaultOptions = defaultOptions
SimplyBind.func = (funcName, customOptions)->
bindingInterface = SimplyBind(funcName, customOptions)
bindingInterface.isProxy = true
return bindingInterface
SimplyBind.unBindAll = (object, bothWays)->
if object and (checkIf.isObject(object) or checkIf.isFunction(object))
import [browserOnly] methods.unBindAll-parseDOMObject.coffee
propMap = object._sb_map
if object._sb_ID
boundInstances[object._sb_ID].removeAllSubs(bothWays)
if propMap
boundInstances[boundID].removeAllSubs(bothWays) for prop, boundID of propMap
return