0.0.32 • Published 9 years ago

eden-class v0.0.32

Weekly downloads
110
License
-
Repository
github
Last release
9 years ago

#Class

DESCRIPTION

Build Status

General

Installation

npm install eden-class

Usage

var class = require('eden-class');

Methods


argument

 [Argument] argument();

Argument Testing

Parameters

Returns

Argument

Example

Code
class().argument();
Outputs
RESULTS

capture

 object capture(Bool);

For Async we lose the protected and private access. This grabs it before it is removed from the scope

Parameters

  1. bool

Returns

object

Example

Code
class().capture();
Outputs
RESULTS

inspect

 this inspect(Mixed, String|null);

Force outputs any class property

Parameters

  1. mixed

  2. string|null

Returns

this

Example

Code
class().inspect();
Outputs
RESULTS

loadState

 this loadState('user');

Returns a state that was previously saved

Parameters

  1. user - string - the state name

Returns

this

Example

Code
  user.setName('Bob').saveState('user');

class().loadState('user').getName();
Outputs
'Bob'

loop

 this loop(*function, Integer);

Loops through returned result sets

Parameters

  1. *function

  2. integer

Returns

this

Example

Code
class().loop();
Outputs
RESULTS

on

 this on(*string, *function, Bool);

Attaches an instance to be notified when an event has been triggered

Parameters

  1. *string

  2. *function

  3. bool

Returns

this

Example

Code
class().on();
Outputs
RESULTS

once

  this once(*string, Function);

Attaches an instance to be notified when an event has been triggered, when the event was fired it will be removed on the event stack.

Parameters

  1. *string

  2. function

Returns

this

Example

Code
class().once();
Outputs
RESULTS

saveState

 this saveState('user', Mixed);

Sets instance state for later usage.

Parameters

  1. 'user' - string - the state name

  2. mixed

Returns

this

Example

Code
  user.setName('Bob').saveState('user');

class().saveState('user');
Outputs
'Bob'

sync

 [Syncopate] sync(this.name);

Starts a synchronous thread

Parameters

  1. this.name - function

Returns

Syncopate

Example

Code
class().sync(this._name);
class().sync(user._name);
Outputs
'Charles'
'undefined'

trigger

 this trigger(*string, Mixed[,mixed..]);

Notify all observers of that a specific event has happened

Parameters

  1. *string

  2. mixed,mixed..

Returns

this

Example

Code
class().trigger();
Outputs
RESULTS

when

 this when(*mixed, *function);

Invokes Callback if conditional callback is true

Parameters

  1. *mixed

  2. *function

Returns

this

Example

Code
class().when();
Outputs
RESULTS
0.0.32

9 years ago

0.0.31

9 years ago

0.0.30

9 years ago

0.0.29

9 years ago

0.0.28

10 years ago

0.0.27

10 years ago

0.0.26

10 years ago

0.0.25

10 years ago

0.0.24

10 years ago

0.0.23

10 years ago

0.0.21

10 years ago

0.0.20

10 years ago

0.0.19

10 years ago

0.0.18

10 years ago

0.0.17

10 years ago

0.0.16

10 years ago

0.0.15

10 years ago

0.0.14

10 years ago

0.0.12

10 years ago

0.0.10

10 years ago

0.0.9

10 years ago

0.0.8

10 years ago

0.0.7

10 years ago

0.0.6

10 years ago

0.0.5

10 years ago

0.0.4

10 years ago

0.0.3

10 years ago

0.0.1

10 years ago