Search Docs
toUUIDString()
将ObjectId转换为带连字符的UUID风格字符串表示。
import { ObjectId } from 'funtool'; const id = new ObjectId('5f1d7f3b1c9d440000000000'); const uuidString = id.toUUIDString(); // "5f1d7f3b-1c9d-4400-0000-000000000000"
toUUIDString(): string
返回一个带连字符的36字符UUID格式字符串。