Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

backbone-parentmodel

Package Overview
Dependencies
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

backbone-parentmodel

Extensions to Backbone.Model to support nested models and collections

  • 1.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
18
increased by350%
Maintainers
3
Weekly downloads
 
Created
Source

backbone-parentmodel

Build Status

backbone-parentmodel provides a set of extensions to Backbone.Model for working with nested structures where logic is assigned to nested Models and Collections. The core functionality overrides clone, clear, toJSON, and parse methods to handle the nesting and provides a few additional utility methods.

Nested structures are defined as:

const MyModel = ParentModel.extend({
    childModels: {
        myModel: MyModelConstructor
    },
    childCollections: {
        myCollection: MyCollectionConstructor
    }
})

childModels and childCollections must either be an object mapping property names to their constructors, or they may be functions returning an object mapping.

Getting Started

This package is published to npm and can be installed with

npm install backbone-parentmodel

Documentation

See our docs folder for more detailed documentation.

Contributing

We encourage you to contribute to this project!

Please read our contributing guide for guidelines on:

  • how to ask further questions
  • how to report issues
  • how to request or implement new features

Maintainers

Please contact one of the project maintainers with any project issues or questions.

LICENSE

Apache 2

Keywords

FAQs

Package last updated on 24 Jul 2019

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc