🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

backbone-set-event

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

backbone-set-event

Triggers an event on backbone collections when Collection.set() is called

0.0.0
latest
npm
Version published
Maintainers
1
Created
Source

backbone-set-event

Adds an event trigger to the Backbone.Collection.set method. When set() is called on a collection, a single 'update' function.

This module exports Backbone.

usage:

var Backbone = require('backbone-set-event');

var c = new Backbone.Collection([
    { id: "1", name: "andy" },
    { id: "2", name: "scott" },
    { id: "3", name: "tevya" }
]);

c.on("update", function() {
    alert("This only fires once!");
});

c.set([
    { id: "1", name: "Andy" },
    { id: "2", name: "Scott" },
    { id: "3", name: "Tevya" }
]);

Keywords

backbone

FAQs

Package last updated on 24 Apr 2013

Did you know?

Socket

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.

Install

Related posts