mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-16 10:54:49 +00:00
f350a70775
Co-authored-by: Pooya Parsa <pooya@pi0.io>
22 lines
489 B
TypeScript
22 lines
489 B
TypeScript
export * from 'vue'
|
|
|
|
export const install = () => {}
|
|
|
|
export function set (target: any, key: string | number | symbol, val: any) {
|
|
if (Array.isArray(target)) {
|
|
target.length = Math.max(target.length, key as number)
|
|
target.splice(key as number, 1, val)
|
|
return val
|
|
}
|
|
target[key] = val
|
|
return val
|
|
}
|
|
|
|
export function del (target: any, key: string | number | symbol) {
|
|
if (Array.isArray(target)) {
|
|
target.splice(key as number, 1)
|
|
return
|
|
}
|
|
delete target[key]
|
|
}
|