1.0.8 • Published 2 years ago
ccyy-rc-util v1.0.8
ccyy-rc-util
Common Utils For React Component.
Install
npm install ccyy-rc-util --save-dev
API
isMobile
(): boolean
Determine if it is a mobile device
import isMobile from 'ccyy-rc-util/lib/isMobile';
Trim
(text,type?): string
Go to the space, type: 1 - 所有空格 2 - 前后空格 3 - 前空格 4 - 后空格 default:1
import Trim from 'ccyy-rc-util/lib/Trim';
telFormat
(tel): string
The middle digits of the phone number are replaced by *
import telFormat from 'ccyy-rc-util/lib/telFormat';
filterHtmlTag
(sHtml): string
Replace the <> tag
import filterHtmlTag from 'ccyy-rc-util/lib/filterHtmlTag';
copyTxt
(text,fn?): string
copy
import copyTxt from 'ccyy-rc-util/lib/copyTxt';