JSPM

vue-deepunref

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 1843
  • Score
    100M100P100Q121324F
  • License MIT

Deeply un-reference Vue objects.

Package Exports

  • vue-deepunref

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (vue-deepunref) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

Vue deepUnref

The counterpart to Vue 3's toRefs, deepUnref will apply unref recursively until you have an object or array that is completely free of refs. Useful for when you need to pass, for example, a "form" object full of refs to a validation library or to a POST endpoint.

Installation

yarn add vue-deepunref npm install vue-deepunref

Usage

import { deepUnref } from 'vue-deepunref';

const form = {
  name: ref('Abc Def'),
  email: ref('abc@def.com'),
}

saveRest({ ...deepUnref(form) });