Skip to content
kt007007Public

About

前端常用的工具函数。Common JavaScript functions。

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Latest commit

 

History

12 Commits

Folders and files

Repository files navigation

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')

以静态文件方式引入

<script src="kfunc.js"></script>

<script>
    let success = Kfunc.copyText('hello')
    console.log(success)
</script>

函数列表

copyText(string)

复制文本到剪贴板

接收的参数

  • <string> 传入要复制的字符串

返回

  • <bool> 成功或失败的布尔值

About

前端常用的工具函数。Common JavaScript functions。

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages