1.0.2 • Published 6 years ago

leutil v1.0.2

Weekly downloads
6
License
MIT
Repository
github
Last release
6 years ago

util

JavaScript 非常规工具库

Install

npm install leutil

// or
yarn add leutil

Api

isEmail(email: String): Boolean 校验邮箱格式

import { isEmail } from 'leutil';

isEmail('abc@def.com');
// => true

isEmail('abcdef.com');
// => false

isPhoneNum(phone: String): Boolean 国内手机号码格式简单校验

import { isPhoneNum } from 'leutil';

isPhoneNum('18767565433');
// => true
isPhoneNum('1876756533');
// => false