Add: Snippets tests, api doc

This commit is contained in:
surunzi
2016-09-09 21:17:08 +08:00
parent 1b3caf2455
commit b556df0e4a
3 changed files with 98 additions and 5 deletions

View File

@@ -76,6 +76,41 @@ console.html('<span style="color:red">Red</span>');
## Snippets
Allow you to register small function that can be triggered multiple times.
### clear
Clear Snippets.
### add
Add Snippet.
|Name|Type |Desc |
|----|--------|------------------------|
|name|string |Snippet name |
|fn |function|Function to be triggered|
|desc|string |Snippet description |
```javascript
snippets.add('hello', function ()
{
console.log('Hello World!');
}, 'Display hello on console');
```
### remove
Remove specified log.
|Name|Type |Desc |
|----|------|-----------------|
|name|string|Snippet to remove|
```javascript
snippets.remove('hello');
```
## Features
## Settings