spec-js

1.0.0 • Public • Published

Spec

What

A fast, prototypicaly inherited, super-calling constructor-maker

Why?

Makes protypical inheritance a bit easier.

Usage

require()

var createSpec = require('spec-js');

Make a constructor

function Shape(settings){
    this.sides = settings.sides;
}

Overwrite the identifier with a specd version

Shape = createSpec(Shape);

This creates a specd version of Shape that inherrits from Object.

To inherit from this constructor:

function Square(settings){
    this.sides = 4;
    this.sideLength = settings.sideLength;
}

Versions

Current Tags

  • Version
    Downloads (Last 7 Days)
    • Tag
  • 1.0.0
    311
    • latest

Version History

  • Version
    Downloads (Last 7 Days)
    • Published
  • 1.0.0
    311
  • 0.0.3
    1
  • 0.0.2
    1
  • 0.0.1
    1

Package Sidebar

Install

npm i spec-js

Weekly Downloads

270

Version

1.0.0

License

none

Last publish

Collaborators

  • korynunn