
Security News
Feross on TBPN: Socket's Series C and the State of Software Supply Chain Security
Feross Aboukhadijeh joins TBPN to discuss Socket's $60M Series C, 500%+ ARR growth, AI's impact on open source, and the rise in supply chain attacks.
backbone-bind
Advanced tools
Super simple 2way binding for Backbone views.
This plugin requires browserify, but feel free to open PR or issues if you want to use the plugin with something else.
npm i -S backbone-bind
var binding = require('backbone-bind');
var Backbone = require('backbone')
var model = require('./model');
// bind typical input view with this.model
var View = Backbone.View.extend({
tagName: 'input',
bind: binding
render: function() {
this.bind('title');
return this;
}
});
var view = new View({
model: model
});
$('body').append(view);
You can use either bind(options) or bind(field, options), as you prefer.
options.$elDefault value: this.$el
jQuery element that you will bind.
options.fieldName of model property that you will bind.
options.attrDefault value: val
Represents input value. (checked, val, innerText, etc).
options.directionDefault value: <>
Represents binding direction (model <-> element). Only < and > symbols
make sence, but model <-> element is better to understand.
options.eventsDefault value: keydown
List of bound events like change, keypress, keydown...
options.modelDefault value: this.model
Backbone model that you will bind.
MIT
FAQs
Super simple 2-way binding for Backbone Views
We found that backbone-bind demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Feross Aboukhadijeh joins TBPN to discuss Socket's $60M Series C, 500%+ ARR growth, AI's impact on open source, and the rise in supply chain attacks.

Security News
OSV withdrew 157 OSV malware reports after automated false positives incorrectly flagged trusted npm and PyPI packages, sending bad records into tools that rely on OSV data.

Research
/Security News
TrapDoor crypto stealer hits 36 malicious packages across npm, PyPI, and Crates.io, targeting crypto, DeFi, AI, and security developers.