Skip to content

Commit ce1dd87

Browse files
committed
update readme, add format doc
1 parent 3a13c5f commit ce1dd87

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Readme.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,18 @@ store.compute('id', function(){
101101
the new property.
102102

103103

104+
### .format(name, fn)
105+
106+
Format an attribute output in Store.
107+
108+
```js
109+
store.format('nickname', function(val) {
110+
return 'hello ' + val;
111+
});
112+
113+
store.get('nickname'); //hello bredele
114+
```
115+
104116
### .reset(data)
105117

106118
Reset store with `data` (Object or Array).

0 commit comments

Comments
 (0)