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

backbone-publication

Package Overview
Dependencies
Maintainers
13
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

backbone-publication

Supports backbone classes backed by `publication-client` reactive queries.

  • 1.0.8
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
50
increased by61.29%
Maintainers
13
Weekly downloads
 
Created
Source

backbone-publication

Build Status

backbone-publication implements the boilerplate code that is required to make backbone and our publication based system (through publication-client) play nicely together. To use these classes, you simply need to instantiate them with the necessary reactive queries from a publication-client. This normally can be done in the bootstrapping process. For instance:

// During the bootstrapping process we normally initialize most
// collections/models - using `backbone-publication` collections/models is no
// different.

var featureCollection = new FeatureCollection(initialPayload.features, {
  // pubClient is initialized by using the `publication-client` constructor.
  reactiveQuery: pubClient.getCollection('features').find({ userId: getUser().id }),
  waitOn: pubClient.subscribe('features', ['branding'])
}));

Where FeatureCollection is defined as:

import { PublicationCollection } from 'backbone-publication';

// Note that we only need to extend the Publication[Collection,Model]s if we
// need to add custom behavioural overrides.
var FeatureCollection = PublicationCollection.extend({
  // Code removed for example purposes.
});

export default FeatureCollection;

Changelog

  • 1.0.8 - Fixed issue where object instances were considered plain objects.
  • 1.0.7 - Fixed incorrect function call in PublicationModel.setReactiveQuery.
  • 1.0.6 - Fixed issue where PublicationModel.set did not always return this.
  • 1.0.5 - Changed PublicationModel.set to correctly fire change events for nested objects.
  • 1.0.4 - Reverted change on PublicationModel.set and added warning instead.
  • 1.0.3 - Fixed issue with PublicationModel.set not firing change event.
  • 1.0.2 - Util function name typo (isObject -> isPlainObject).
  • 1.0.1 - Use our own local utils instead of external underscore extensions.
  • 1.0.0 - Initial release.

Keywords

FAQs

Package last updated on 01 Sep 2017

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