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