Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kt007007/kfunc.js
前端常用的工具函数。Common JavaScript functions。
https://github.com/kt007007/kfunc.js
functions javascript
Last synced: about 1 month ago
JSON representation
前端常用的工具函数。Common JavaScript functions。
- Host: GitHub
- URL: https://github.com/kt007007/kfunc.js
- Owner: kt007007
- License: apache-2.0
- Created: 2022-07-03T10:07:18.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-07-11T00:51:52.000Z (over 2 years ago)
- Last Synced: 2024-11-07T05:11:42.443Z (about 2 months ago)
- Topics: functions, javascript
- Language: JavaScript
- Homepage:
- Size: 7.2 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# KFunc.js
前端常用的函数集合。## 以NPM方式安装
```
npm install kfunc --save
```在模块中调用(以拷贝文字函数举例)
```
import Kfunc from 'kfunc'let success = Kfunc.copyText('hello')
```按需引入
```
import copyText from 'kfunc/copyText'let success = copyText('hello')
```## 以静态文件方式引入
```
let success = Kfunc.copyText('hello')
console.log(success)```
## 函数列表
### copyText(string)
##### 复制文本到剪贴板
#### 接收的参数
* \ 传入要复制的字符串
#### 返回
* \ 成功或失败的布尔值