mirror of
https://github.com/nuxt/nuxt.git
synced 2024-11-16 02:44:51 +00:00
22 lines
392 B
TypeScript
22 lines
392 B
TypeScript
|
export * from 'vue'
|
||
|
|
||
|
export const install = () => {}
|
||
|
|
||
|
export function set (target, key, val) {
|
||
|
if (Array.isArray(target)) {
|
||
|
target.length = Math.max(target.length, key)
|
||
|
target.splice(key, 1, val)
|
||
|
return val
|
||
|
}
|
||
|
target[key] = val
|
||
|
return val
|
||
|
}
|
||
|
|
||
|
export function del (target, key) {
|
||
|
if (Array.isArray(target)) {
|
||
|
target.splice(key, 1)
|
||
|
return
|
||
|
}
|
||
|
delete target[key]
|
||
|
}
|