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

compiled-accessors

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

compiled-accessors

Compiled getter/setter for highest perfs.

  • 0.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

compiled-accessors

Build Status Dependency Status devDependency Status

Compiled getter/setter for highest perfs.

Install

Download manually or with package-manager.

npm
npm install --save compiled-accessors
bower
bower install --save compiled-accessors

Example

var CA = require('compiled-accessors');

var obj = {
  foo {
    bar: 'Fry'
  }
}

// Create a getter for a nested value.
var getFooBar = CA.getter('foo.bar');

// Use it.
console.log(getFooBar(obj)); // Fry

// Create a setter for the same nested value.
//
// The path can be described as a string or an array.
var setFooBar = CA.setter(['foo', 'bar']);

// Use it.
setFooBar(obj, 'Zoidberg');

Contributions

Contributions are very welcomed, either on the documentation or on the code.

You may:

  • report any issue you've encountered;
  • fork and create a pull request.

License

ISC © Julien Fontanet

Keywords

FAQs

Package last updated on 15 Jul 2014

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