Skip to content

Function: maskPhone() ​

ts
function maskPhone(phone): string;

Masks a phone number. 手机号脱敏。

Parameters ​

ParameterType
phonestring

Returns ​

string

Example ​

ts
maskPhone('13812345678') // => '138****5678'

Since ​

1.0.0

Released under the MIT License.