Socket
Socket
Sign inDemoInstall

cla6-base

Package Overview
Dependencies
0
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

cla6-base


Version published
Maintainers
1
Created

Readme

Source

Cla6 Base

This is an addon plugin for Cla6.js class system library which lets you do super calls. Although originally designed for use with Node.js and installable via npm install cla6-base, it can also be used directly in the browser.

Cla6 Base is also installable via:

  • bower: bower install cla6-base

Basic Example

var Parent = Cla6('Parent', {
  constructor: function() {
    this.foo = 'foo';
  },

  method: function() {
    this.baz = 'baz';
  },
});

var Child = Cla6('Child').extend(Parent, {
  constructor: function() {
    Cla6.base();
    this.bar = 'bar';
  },

  method: function() {
    Cla6.base();
    this.qux = 'qux';
  },

  log: function() {
    console.log(this.foo, this.bar, this.baz, this.qux);
  }
});

var obj = new Child();
obj.method();
obj.log(); // foo bar baz qux

Note, base can only be used directly from method scope, not inner scopes or outer scopes.

How To Use

var Cla6 = require('cla6');
var Cla6Base = require('cla6-base');

Cla6.use(Cla6Base);

Download

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

npm install cla6-base

Keywords

FAQs

Last updated on 24 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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc