https://github.com/haijee/anyscript
https://github.com/haijee/anyscript
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/haijee/anyscript
- Owner: haijee
- Created: 2023-03-28T08:45:00.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-11-28T16:51:46.000Z (over 2 years ago)
- Last Synced: 2025-10-20T01:05:02.526Z (8 months ago)
- Language: JavaScript
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# anyscript
前端常用javascript函数工具库
# usage
## Installation
```sh
npm install anyscript
```
Or
```sh
yarn add anyscript
```
# Quick start
```js
import { test } from 'anyscript'
test() // 传入参数(属性)
```
# API
### 防抖函数
debounce
| 属性 | 说明 | 类型| 默认值 | 其他 |
| --- | --- | --- | --- | --- |
| fn | 防抖的函数 | function | - |
| delay | 时间 | number | 300 |
### 节流函数
throttle
| 属性 | 说明 | 类型| 默认值 | 其他 |
| --- | --- | --- | --- | --- |
| fn | 防抖的函数 | function | - |
| delay | 时间 | number | 300 |