@danielkalen/simplybind
Version:
Magically simple, framework-less one-way/two-way data binding for frontend/backend in ~5kb.
22 lines (14 loc) • 584 B
text/coffeescript
SimplyBind.version = import '../../package.json $ version'
SimplyBind.settings = settings
SimplyBind.defaultOptions = defaultOptions
SimplyBind.unBindAll = (object, bothWays)->
if object and (checkIf.isObject(object) or checkIf.isFunction(object))
# simplyimport:if BUNDLE_TARGET = 'browser'
import './methods.unBindAll-parseDOMObject.coffee'
# simplyimport:end
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