
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
backbone.deep-model
Advanced tools
Forked from https://github.com/kawhee/backbone-deep-model (Thanks for the wonderful work @powmedia!)
Same as base repo, except that the package is scopeless.
The test cases are rewritten. This is primarily a browserify package. I'll work on making this work in other platforms if there is interest.
Improved support for models with nested attributes.
Allows you to get and set nested attributes with path syntax, e.g. user.type.
Triggers change events for changes on nested attributes.
dist/backbone-deep-model.min.jsThen just have your models extend from Backbone.DeepModel instead of Backbone.Model.
Example code:
//Create models with nested attributes
var model = new Backbone.DeepModel({
    id: 123,
    user: {
        type: 'Spy',
        name: {
            first: 'Sterling',
            last: 'Archer'
        }
    },
    otherSpies: [
        { name: 'Lana' },
        { name: 'Cyrril' }
    ]
});
//You can bind to change events on nested attributes
model.on('change:user.name.first', function(model, val) {
    console.log(val);
});
//Wildcards are supported
model.on('change:user.*', function() {});
//Use set with a path name for nested attributes
//NOTE you must you quotation marks around the key name when using a path
model.set({
    'user.name.first': 'Lana',
    'user.name.last':  'Kang'
});
//Use get() with path names so you can create getters later
console.log(model.get('user.type'));    // 'Spy'
//You can use index notation to fetch from arrays
console.log(model.get('otherSpies.0.name')) //'Lana'
Charles Davison - powmedia
master:
0.11.0:
0.10.4:
0.10.0:
0.9.0:
0.8.0:
0.7.4:
0.7.3:
0.7.2:
0.7.1:
0.7:
v2.0.2 -- 2015-03-23
FAQs
Improved support for models with nested attributes.
We found that backbone.deep-model 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.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.