MCPcopy Create free account
hub / github.com/Silentely/eSIM-Tools / formatPhoneNumber

Function formatPhoneNumber

src/simyo/js/modules/utils.js:143–147  ·  view source on GitHub ↗
(phoneNumber)

Source from the content-addressed store, hash-verified

141 * @returns {string} 格式化后的手机号
142 */
143export function formatPhoneNumber(phoneNumber) {
144 if (!phoneNumber) return '';
145 // 06 1234 5678 格式
146 return phoneNumber.replace(/^(\d{2})(\d{4})(\d{4})$/, '$1 $2 $3');
147}
148
149/**
150 * 延迟函数

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected