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

baseclass

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

baseclass

A modularization of Backbone.js's extend() function for use with JS classes.

  • 0.3.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

#baseclass

For when you just want Backbone's Class.extend() function.

Build Status

Backbone.js style inheritance. The extend function has been taken directly from Backbone. This is really @bermi 's idea.

Very similar to uberclass and class.js -- the main difference is that the prototype props and static props order has been reversed.

##Usage

var BaseClass = require("baseclass");

var MyClass = BaseClass.extend({
    someProp: 'My property value',
    someMethod: function () { ... },
    constructor: function (arg1, arg2) { ... }
},{
    optionalStaticProp = "MyClass.optionalStaticProp"
});

var inst = new MyClass(arg1, arg2);

##Licence

MIT

Keywords

FAQs

Package last updated on 08 Dec 2013

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