0.0.7 • Published 2 years ago

zrtx-toolbox v0.0.7

Weekly downloads
-
License
ISC
Repository
-
Last release
2 years ago

zrtx-toolbox

项目安装引入
npm install zrtx-toolbox
基础接口使用
一、I P 校验及转换
// IPV4
  // ipv4 校验
  IP.ipv4(ip: string): boolean
  // ipv4 数组校验
  IP.ipv4Array(ip: Array): boolean
  // A段 IP
  IP.aip(ip: string): boolean
  // B段 IP
  IP.bip(ip: string): boolean
  // C段 IP
  IP.cip(ip: string): boolean
// IPV6
  // ipv6 校验
  ipv6(ip: string): boolean
  // ipv6 简写转全写
  ipv6ToFull(ip: string): string

二、Letter 字符判断

//小写字母
Letter.isLowerCase(letter: string): boolean
// 大写字母
Letter.isUpperCase(letter: string): boolean
// 大小写字母
Letter.isCase(letter: string): boolean

三、Safety 安全校验

// Xss 转换
Safety.xss(v: string): string

四、URL

// 获取URL参数
URL.get<T> (url, key?: string ): T
// 校验合法url
URL.validate(uri: string): boolean
方法
isUndefined(): boolean   // undefined 类型判断
isNull(): boolean        // null判断
0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago