# cats-simple-tools

> some simple tool functions

Latest version **1.0.2** (published 2019-06-24) · MIT license · 0 weekly downloads

## Install

```sh
npm install cats-simple-tools
pnpm add cats-simple-tools
yarn add cats-simple-tools
bun add cats-simple-tools
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.2 |
| Published | 2019-06-24 |
| First published | 2019-06-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 13.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | CAT |
| Maintainers | catwingsy |
| Keywords | js, tools, demo |

## Links

- npm: https://www.npmjs.com/package/cats-simple-tools
- Repository: https://github.com/CatWithWings/cats-simple-tools
- Homepage: https://github.com/CatWithWings/cats-simple-tools#readme
- Issues: https://github.com/CatWithWings/cats-simple-tools/issues
- npm.io page: https://npm.io/package/cats-simple-tools

## Dependencies (1)

- [@babel/polyfill](https://npm.io/package/@babel/polyfill.md) ^7.4.4

## Alternatives

- [@mapbox/jsonlint-lines-primitives](https://npm.io/package/@mapbox/jsonlint-lines-primitives.md) — 5.3M weekly downloads
- [reftools](https://npm.io/package/reftools.md) — 3.5M weekly downloads
- [@hey-api/openapi-ts](https://npm.io/package/@hey-api/openapi-ts.md) — 3.5M weekly downloads
- [@mapbox/geojson-rewind](https://npm.io/package/@mapbox/geojson-rewind.md) — 2.4M weekly downloads
- [turbo-stream](https://npm.io/package/turbo-stream.md) — 1.7M weekly downloads

## Recent versions

- 1.0.2 (latest) — 2019-06-24
- 1.0.1 — 2019-06-24
- 1.0.0 — 2019-06-24

## README

## cats-simple-tools
里面有一些比较简单的工具函数，是我的一次练习也是积累

## npm (Recommended)
```
$ npm install cats-simple-tools
```

## Using the tool
```
  import { verify, preformance, sort } from "cats-simple-tools"

  verify.nullContent("123");
  
  window.addEventListener("scroll", throttle(fn, delay));
```

## Methods
  - verify
    - nullContent(val) 验证是否为空
    - emailAddress(val) 验证是否为邮箱地址
    - tel(val) 验证座机
    - mobile(val) 验证手机
    - minLength(val) 验证最小长度
    - maxLength(val) 验证最大长度
    - website(url) 验证网站地址

  - preformance
    - debounce(fn, wait, immediate) 防抖
    - throttle(fn, delay) 节流

  - sort
    - quickSort(arr) 快速排序
    - insertSort(arr) 插入排序
    - bubbleSort(arr) 冒泡排序

---
_Source: https://npm.io/package/cats-simple-tools · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
