You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

ring

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ring

Ring.js - JavaScript Class System with Multiple Inheritance

latest
Source
npmnpm
Version
2.2.3
Version published
Weekly downloads
20
-48.72%
Maintainers
1
Weekly downloads
 
Created
Source

Ring.js

Build Status npm version

Ring.js is a class system in JavaScript allowing multiple inheritance.

var Human = ring.create({
  talk: function() {
    return "hello";
  },
});

var Spider = ring.create({
  climb: function() {
    return "climbing";
  },
});

var SpiderMan = ring.create([Spider, Human], {
  talk: function() {
    return this.$super() + ", my name is Peter Parker";
  }
});

var spiderman = new SpiderMan();
console.log(spiderman.talk());

Its advantages:

  • Stop fighting against JavaScript prototype-based object oriented system. Use a class system like you would in Java, Python, or basically any well-known language.
  • Available in the browser or in node.js. Also works with require.js.
  • The inheritance system is inspired by Python, one of the best multiple inheritance system ever.
  • Provides compatibility with other JavaScript class systems, like CoffeeScript or Backbone.
  • Licensed under the MIT license.
  • Damn, multiple inheritance just rocks!

To get started, read the tutorial.

There is also a FAQ available here.

Keywords

ring

FAQs

Package last updated on 15 Aug 2018

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