Appearance
将 15 位身份证转换为 18 位。
function toEighteen(id: string): string | null
返回转换后的 18 位身份证号码。如果输入不是有效的 15 位身份证,返回 null。
null
import { toEighteen } from 'china-id-card' toEighteen('110101900101001') // → '110101199001010018'