This commit is contained in:
Asaki Yuki 2026-01-05 10:58:28 +07:00
parent d9cf50eec1
commit bb9b300d6f
9 changed files with 83 additions and 31 deletions

View file

@ -0,0 +1,11 @@
declare global {
interface Map<K, V> {
toJSON(): Record<string, V>
}
}
Map.prototype.toJSON = function () {
const obj: any = {}
this.forEach((value, key) => (obj[key] = value))
return obj
}