Skip to content

⬅️ Back to Table of Contents

📄 useToString

📊 Analysis Summary

Metric Count
🔧 Functions 1
📦 Imports 4
🟢 Vue Composition API 1

📚 Table of Contents

🛠️ File Location:

📂 packages/shared/useToString/index.ts

📦 Imports

Name Source
ComputedRef vue
MaybeRefOrGetter vue
computed vue
toValue vue

Vue Composition API

Name Type Reactive Variables Composables
computed computed none none

Functions

useToString(value: MaybeRefOrGetter<unknown>): ComputedRef<string>

Reactively convert a ref to string.

See: https://vueuse.org/useToString

Tags: @__NO_SIDE_EFFECTS__

Raw JSDoc
/**
 * Reactively convert a ref to string.
 *
 * @see https://vueuse.org/useToString
 *
 * @__NO_SIDE_EFFECTS__
 */

Calls:

  • computed (from vue)
  • toValue (from vue)
Code
export function useToString(
  value: MaybeRefOrGetter<unknown>,
): ComputedRef<string> {
  return computed(() => `${toValue(value)}`)
}

Generated by Syntax Scribe