leutil
v1.0.2
Published
javascript unconventional lib
Downloads
2
Readme
util
JavaScript 非常规工具库
Install
npm install leutil
// or
yarn add leutil
Api
isEmail(email: String): Boolean 校验邮箱格式
import { isEmail } from 'leutil';
isEmail('[email protected]');
// => true
isEmail('abcdef.com');
// => false
isPhoneNum(phone: String): Boolean 国内手机号码格式简单校验
import { isPhoneNum } from 'leutil';
isPhoneNum('18767565433');
// => true
isPhoneNum('1876756533');
// => false