Skip to content

Commit

Permalink
chore: wip
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbbreuer committed May 13, 2022
1 parent 099cea8 commit 27c9041
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { isRef, unref } from 'vue'
import { isObject } from '@vueuse/core'

export function deepUnref(val: any) {
const checkedVal: any = isRef(val) ? unref(val) : val
const checkedVal: [] = isRef(val) ? unref(val) : val

if (!isObject(checkedVal))
return checkedVal
Expand All @@ -21,13 +21,11 @@ function smartUnref(val: any) {
}

function unrefArray(arr: []) {
// eslint-disable-next-line no-console
console.log('unreffing array', arr)
arr.map(smartUnref)
}

function unrefObject(obj: object) {
const unreffed = {}
const unreffed: any = {}

Object.keys(obj).forEach((key) => {
unreffed[key] = smartUnref(obj[key])
Expand Down

0 comments on commit 27c9041

Please sign in to comment.