Skip to content
This repository has been archived by the owner on Sep 5, 2018. It is now read-only.

aleclarson/Builder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Builder v2.3.0 stable

A Builder is an extensible interface for building factory functions.

Builder.prototype provides basic utilities for defining properties, methods, and much more.

The Builder class is designed to be subclassed. This allows Builder instances to be as specialized as you see fit.

Builder = require "Builder"

type = Builder "TypeName"

 

type.inherits

Sets the superclass.

# Create each instance with `{}`
# NOTE: This is the default, so never call `inherits` like this!
type.inherits Object

# Create each instance with `Object.create(null)`
type.inherits null

# Some types are not inheritable.
# The call below will throw an error.
type.inherits Array

TODO: Write documentation...

 

Subclassing

TODO: Write documentation...