feat(console): utilities api

This commit is contained in:
redhoodsu
2019-10-08 20:46:23 +08:00
parent 10a5fb3a40
commit a0cb74a7fe
5 changed files with 142 additions and 14 deletions

View File

@@ -966,6 +966,21 @@ cookie.get('a'); // -> '1'
cookie.remove('a');
```
## copy
Copy text to clipboard using document.execCommand.
|Name|Type |Desc |
|----|--------|-----------------|
|text|string |Text to copy |
|[cb]|function|Optional callback|
```javascript
copy('text', function (err) {
// Handle errors.
});
```
## createAssigner
Used to create extend, extendOwn and defaults.