API Docs for: 2.4.0
Show:

mixinInstance Class

Defined in: lib/instance.js:68

mix in instance properties from classes

Methods

hasOwnPropsMixin

(
  • child
  • parent
)
Object

Defined in lib/instance.js:14

copy hasOwn properties from one class to another

Parameters:

  • child Object

    the object that you want to gain the extra properties

  • parent Object

    the object that has the properties to give

Returns:

Object:

the decorated child

instanceMulti

(
  • child
  • arrayParents
)
Object

Defined in lib/instance.js:51

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

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

instanceSingle

(
  • childClass
  • parentClass
)
Class

Defined in lib/instance.js:35

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

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

Returns:

Class:

the decorated child class

validObjectLiteral

(
  • item
)
Object

Defined in lib/instance.js:1

Check class is static (ie object literal vs constructor fn obj)

Parameters:

  • item Object

    the class/js object to check

Returns:

Object:

boolean