# eden-class

> Eden JS Base Class

Latest version **0.0.32** (published 2015-06-01) · 0 weekly downloads

> **Deprecated.** This package is deprecated.

## Install

```sh
npm install eden-class
pnpm add eden-class
yarn add eden-class
bun add eden-class
```

## Health

**Score 10/100 (F)** — status: deprecated.

Negative: deprecated.

## Facts

| | |
|---|---|
| Version | 0.0.32 |
| Published | 2015-06-01 |
| First published | 2014-09-10 |
| Weekly downloads | 0 |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 3 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Christian Blanquera |
| Maintainers | cblanquera |
| Keywords | eden, library |

## Links

- npm: https://www.npmjs.com/package/eden-class
- Repository: https://github.com/edenjs/class
- Issues: https://github.com/edenjs/class/issues
- npm.io page: https://npm.io/package/eden-class

## Dependencies (3)

- [argument](https://npm.io/package/argument.md) 0.0.2
- [syncopate](https://npm.io/package/syncopate.md) 0.0.4
- [classified-magic](https://npm.io/package/classified-magic.md) 0.1.5

## Recent versions

- 0.0.32 (latest) — 2015-06-01
- 0.0.31 — 2014-11-28
- 0.0.30 — 2014-11-28
- 0.0.29 — 2014-11-28
- 0.0.28 — 2014-11-11
- 0.0.27 — 2014-11-11
- 0.0.26 — 2014-11-07
- 0.0.25 — 2014-11-06
- 0.0.24 — 2014-11-03
- 0.0.23 — 2014-10-17
- 0.0.21 — 2014-10-13
- 0.0.20 — 2014-10-08
- 0.0.19 — 2014-10-08
- 0.0.18 — 2014-10-08
- 0.0.17 — 2014-10-02
- … 13 more at https://npm.io/package/eden-class/versions

## README

#Class

[DESCRIPTION]

[![Build Status](https://api.travis-ci.org/edenjs/class.png)](https://travis-ci.org/edenjs/class)

## General

### Installation

```
npm install eden-class
```

### Usage

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

## Methods

  * [argument](#argument)

  * [capture](#capture)

  * [inspect](#inspect)

  * [loadState](#loadState)

  * [loop](#loop)

  * [on](#on)

  * [once](#once)

  * [saveState](#saveState)

  * [sync](#sync)

  * [trigger](#trigger)

  * [when](#when)

---

<a name="argument"></a>

### argument

```
 [Argument] argument();
```

Argument Testing

#### Parameters

#### Returns

 [Argument]

#### Example

##### Code

```
class().argument();
```

##### Outputs

```
RESULTS
```

---

<a name="capture"></a>

### 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
```

---

<a name="inspect"></a>

### 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
```

---

<a name="loadState"></a>

### 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'
```

---

<a name="loop"></a>

### loop

```
 this loop(*function, Integer);
```

Loops through returned result sets

#### Parameters

  1. *function

  2. integer

#### Returns

 this

#### Example

##### Code

```
class().loop();
```

##### Outputs

```
RESULTS
```

---

<a name="on"></a>

### 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
```

---

<a name="once"></a>

### 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
```

---

<a name="saveState"></a>

### 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'
```

---

<a name="sync"></a>

### 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'
```

---

<a name="trigger"></a>

### 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
```

---

<a name="when"></a>

### 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
```

---
_Source: https://npm.io/package/eden-class · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
