Skip to content

⬅️ Back to Table of Contents

📄 useSorted/demo

📊 Analysis Summary

Metric Count
🔧 Functions 1
📦 Imports 4
📊 Variables & Constants 1
🟢 Vue Composition API 1

📚 Table of Contents

🛠️ File Location:

📂 packages/core/useSorted/demo.vue

📦 Imports

Name Source
rand @vueuse/core
useSorted @vueuse/core
computed vue
shallowRef vue

Variables & Constants

Name Type Kind Value Exported
objArr { name: string; age: number; }[] let/var [{ name: 'John', age: 40, }, { name: 'Jane', age: 20, }, { name: 'Joe', age: ...

Vue Composition API

Name Type Reactive Variables Composables
computed computed none none

Functions

randomArr(): void

Returns: void

Calls:

  • rand (from @vueuse/core)
  • arr.push
  • arr.join
Code
function randomArr() {
  const arr = []
  for (let i = 0; i < rand(10, 20); i++)
    arr.push(rand(0, 100))
  arrText.value = arr.join(',')
}

Generated by Syntax Scribe