Add info get api #83

This commit is contained in:
redhoodsu
2018-08-16 13:14:57 +08:00
parent 71a3f9580d
commit b37244e8d1
5 changed files with 1490 additions and 1337 deletions

View File

@@ -159,6 +159,21 @@ info.add('title', 'content');
info.add('location', () => location.href);
```
### get
Get info or infos.
|Name |Type |Desc |
|------|---------------|------------|
|name |string |Info name |
|return|string function|Info content|
```javascript
info.add('title', 'content')
info.get(); // -> [{name: 'title', val: 'content'}]
info.get('title') // -> 'content'
```
### remove
Remove specified info.