# taro-js-tools

> Taro Js工具库

Latest version **1.0.1** (published 2019-09-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install taro-js-tools
pnpm add taro-js-tools
yarn add taro-js-tools
bun add taro-js-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.1 |
| Published | 2019-09-09 |
| First published | 2019-09-09 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 34.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Author | shaogong |
| Maintainers | shaogong |
| Keywords | Taro, React, 小程序, H5 |

## Links

- npm: https://www.npmjs.com/package/taro-js-tools
- Repository: https://github.com/ShaoGongBra/Taro-js-tools
- Issues: https://github.com/ShaoGongBra/Taro-js-tools/issues
- npm.io page: https://npm.io/package/taro-js-tools

## Alternatives

- [mobx-react](https://npm.io/package/mobx-react.md) — 2.8M weekly downloads
- [rc-tree](https://npm.io/package/rc-tree.md) — 2.6M weekly downloads
- [@react-oauth/google](https://npm.io/package/@react-oauth/google.md) — 1.3M weekly downloads
- [@wagmi/connectors](https://npm.io/package/@wagmi/connectors.md) — 877.0K weekly downloads
- [vee-validate](https://npm.io/package/vee-validate.md) — 836.4K weekly downloads

## Recent versions

- 1.0.1 (latest) — 2019-09-09
- 1.0.0 — 2019-09-09

## README

# Taro js-tools
js工具库，支持日期函数、gps转换函数、表单验证函数、导航函数、字符串处理函数、全局变量、url参数、md5加密、base64加解密

# 使用方法
> npm install taro-js-tools    
> or    
> yarn add taro-js-tools    

# 日期函数
> import {     
>   dateToStr,    
>   dateDiff,    
>   dateAdd,    
>   isLeapYear,    
>   strToDate,    
>   strFormatToDate,    
>   dateToLong,    
>   longToDate,    
>   isDate,    
>   getMaxDay,    
>   maxDayOfDate,    
>   datePart    
> } from 'react-native-text-radius/lib/date'    
# 路由
> import nav from 'react-native-text-radius/lib/nav'    
> nav('/pages/index/index')
# 表单验证
> import verify from 'react-native-text-radius/lib/verify'    
> verify({    
>   phone: 15587087521,    
>   tel: 75148120    
> },{    
>   phone:{    
>     emptyMsg: '请输入电话号码',    
>     errMsg: '不是正确的电话号码'    
>     reg: 'require|phone'    
>   }    
> })
# URL
> import { getQuery,getUrlParam } from 'react-native-text-radius/lib/query'
# 全局变量
> import { set,get } from 'react-native-text-radius/lib/global-data'
# GPS
> import { gcjEncrypt,gcjDecrypt,gcjDecryptExact,bdEncrypt,bdDecrypt,distance } from 'react-native-text-radius/lib/gps'
# 字符串
> import { randomString,phoneHiding } from 'react-native-text-radius/lib/string'   
> // 生成32位随机字符串 
> randomString(32)   
> // 隐藏电话号码中间4位   
> phoneHiding(18888888888)   
# MD5
> import md5 from 'react-native-text-radius/lib/md5'   
# BASE64
> import {base64Encode,base64Decode} from 'react-native-text-radius/lib/base64'

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