API Docs for: 2.4.0
Show:

mixinProto Class

Defined in: lib/proto.js:92

mix in proto props

Methods

propsMulti

(
  • child
  • arrayParents
)
Object

Defined in lib/proto.js:38

Mix in PROTOTYPE properties from array of INSTANTIATED parent classes to a child class. Basically just a for loop around mitsubshi.propsSingle().

Parameters:

  • child Class

    class that will be decorated

  • arrayParents Array

    array of parent classes (can be static or dynamic) that will be giving their properties to the new static class

Returns:

Object:

decorated child static class

propsSingle

(
  • childClass
  • parentClass
  • staticProps
)
Class

Defined in lib/proto.js:15

Mix in PROTOTYPE properties from one class to another class (accepts both dynamic and static classes). Will mix in static properties if a static class is passed in, otherwise mixes in prototype methods.

Parameters:

  • childClass Class

    the child class (dynamic or static) to be decorated

  • parentClass Class

    the parent class (dynamic or static) that has the properties to be mixed in to the child

  • staticProps Object

    extra properties to mix in

Returns:

Class:

the decorated child class

propsUninstantiatedMulti

(
  • child
  • arrayParents
)
Object

Defined in lib/proto.js:73

Mix in PROTOTYPE properties from array of UNinstantiated parent classes to a child class. Basically just a for loop around mitsubshi.propsSingle().

Parameters:

  • child Class

    class that will be decorated

  • arrayParents Array

    array of parent classes (can be static or dynamic) that will be giving their properties to the new static class

Returns:

Object:

decorated child static class

returnPrototypeIfDynamicClass

(
  • item
)
Object

Defined in lib/proto.js:1

Check whether an class is static or dynamic (ie object literal vs constructor fn obj)

Parameters:

  • item Object

    the class/js object to check

Returns:

Object:

if a contructor then return its prototpe else return the obj literal unmodified