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

@atofstryker/backbone-reactivity-adapter

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@atofstryker/backbone-reactivity-adapter

A cache/model proxy to go between backbone objects and POJO objects

  • 0.7.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
27
increased by107.69%
Maintainers
1
Weekly downloads
 
Created
Source

Backbone Reactivity Adapter

A tool use to convert Backbone Models to POJOs while performing large scale backbone migrations. Let's face it, writing backbone in the modern age of JavaScript is not fun. But large scale migrations do not need to be hopeless! For global state objects for large scale applications, we can utilize ES6 proxies under the hood to adapt to a different type of Model, such as a Plain Old Javascript Object. This allows migrations in large scale applications to be performed over time, without sacrificing the performance of your application.

The Backbone Reactivity Adapter uses factory functions to build the adaptive models from Backbone -> POJO. In this repository, JSON:API factories are used to parse raw JSON:API responses to the adaptive models. These structures are synced under to each other, and can be shared in cache.

To keep these items in cache, a WeakMap is used under the hood to store the root object. Along with this object, the Backbone Model that proxies to this object and the POJO model are also stored in the weakmap. When the root object is no longer referenced in memory, the values are cleaned up out of the WeakMap to avoid memory leaks.

build all subsequent packages
npm run build 
test all subsequent packages
npm run test 

FAQs

Package last updated on 21 Aug 2020

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