pengzhanbo 49672724eb
feat(theme)!: migrate plugin-md-enhance to official plugins (#206)
* feat(theme)!: migrate `plugin-markdown-hint`

* chore: tweak

* chore: tweak

* chore: tweak

* chore: tweak

* chore: tweak

* chore: tweak

* chore: tweak

* chore: tweak

* chore: tweak

* chore: tweak

* fix(theme): improve `home-blog` styles in mobile, close #210

* chore: tweak

* chore: tweak
2024-09-26 00:06:23 +08:00

13 lines
270 B
TypeScript

export function deleteAttrs<
T extends Record<string, any> = Record<string, any>,
>(obj: T, ...attrs: (keyof T)[]): Omit<T, keyof T> {
const res = {} as T
for (const key in obj) {
if (!attrs.includes(key)) {
res[key] = obj[key]
}
}
return res
}