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

cla6-hidden

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

cla6-hidden

Hidden plugin for Cla6.js

  • 1.0.3
  • Source
  • npm
  • Socket score

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

Cla6 Hidden

This is an addon plugin for Cla6.js class system library. It provides the ability to hide some of the instance's properties and therefore make some of your api's logic private without exposing it. Although originally designed for use with Node.js and installable via npm install cla6-hidden, it can also be used directly in the browser.

Cla6 Hidden is also installable via:

  • bower: bower install cla6-hidden

Basic Examples

var Klass = Cla6('Klass', {
  constructor: function() {
    this._hidden = 'hidden';
  },

  get hidden() {
    return this._hidden;
  }
});

var obj = new Klass();
console.log(obj.hidden); // hidden
console.log(obj._hidden); // undefined

You may also define hidden properties on the prototype. Don't worry, Cla6-Hidden also knows how to handle the inheritance process:

var Parent = Cla6('Parent', {
  _foo: 'parent',
  _bar: 'parent'
});

var Child = Cla6('Child').extend(Parent, {
  _bar: 'child',

  log: function() {
    console.log(this._foo); // parent
    console.log(this._bar); // child
  }
});

obj = new Child();
obj.log();

How To Use

var Cla6 = require('cla6');
var Cla6Hidden = require('cla6-hidden');

Cla6.use(Cla6Hidden);

Download

The source is available for download from GitHub. Alternatively, you can install using Node Package Manager (npm):

npm install cla6-hidden

Keywords

FAQs

Package last updated on 21 Apr 2015

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