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

conbo-objectproxy

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

conbo-objectproxy

Bindable object proxy for ConboJS

  • 1.0.0
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-25%
Maintainers
1
Weekly downloads
 
Created
Source

ObjectProxy for ConboJS 4

ObjectProxy is an experimental pseudo-class for ConboJS that uses Proxy to wrap regular JavaScript objects to enable them to be be used with ConboJS two-way data binding, as an alternative to using a Hash or similar data model.

The ObjectProxy pseudo-class can be imported as an AMD, CommonJS or global module.

Getting started

The ObjectProxy class was inspired by the Apache Flex class of the same name and serves the same purpose.

You can create a new ObjectProxy in one of 2 ways:

var obj = {a:0};
var proxy1 = ObjectProxy(obj);
var proxy2 = ObjectProxy.create(obj);

Both methods have the same outcome, but the second method seems a little cleaner until we work out how to create a version that can use new ObjectProxy(obj).

Strict proxies

If you would like to prevent reading or creation of dynamic and private properties, simply create your proxy with true as a second parameter:

var proxy = ObjectProxy.create(obj, true);

The proxy will then throw an error if anyone tries to read or write properties that don't exist on the target object, or begin with an _.

Keywords

FAQs

Package last updated on 28 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