0.0.33 • Published 10 years ago
eden-model v0.0.33
#Model
DESCRIPTION
General
Installation
npm install eden-modelUsage
var model = require('eden-model');Methods
set
 object set({ name: 'chris', age: 32 });Set the raw data hash
Parameters
- chris - object (string | character | integer | date) to be set
 
Returns
object
Example
Code
model({ name: 'chris', age: 32 }).setAge(45).getAge();Outputs
45get
 object get('john');Return a copy of the raw data hash
Parameters
- 'john' - object (string | character | integer | date) to get
 
Returns
object
Example
Code
	var user = model({ name: 'chris', age: 32 });
	user.name = 'john';
user.getName();Outputs
'john'copy
 Eden_Model copy(name, nickname);Copies a value of source key to destination key.
Parameters
name - string (to copy)
nickname - string (copy value from name)
Returns
Eden_Model
Example
Code
	var user = model({ name : 'chris', age : 32 }).copy('name', 'nickname');
user.nickname;Outputs
'chris'0.0.33
10 years ago
0.0.32
10 years ago
0.0.31
11 years ago
0.0.30
11 years ago
0.0.28
11 years ago
0.0.27
11 years ago
0.0.26
11 years ago
0.0.25
11 years ago
0.0.24
11 years ago
0.0.23
11 years ago
0.0.21
11 years ago
0.0.20
11 years ago
0.0.17
11 years ago
0.0.16
11 years ago
0.0.15
11 years ago
0.0.14
11 years ago
0.0.12
11 years ago
0.0.10
11 years ago
0.0.2
11 years ago
0.0.1
11 years ago
