@whoj/utils-vue
TypeScript icon, indicating that this package has built-in type declarations

2.3.1 • Public • Published

@whoj/utils-vue

Version Typings License

Install

# ✨ Auto-detect
npx nypm install @whoj/utils-vue

# npm
npm install @whoj/utils-vue

# yarn
yarn add @whoj/utils-vue

# pnpm
pnpm install @whoj/utils-vue

# bun
bun install @whoj/utils-vue

# deno
deno install @whoj/utils-vue

@whoj/utils-vue/fusejs

Fully typed Fuse.js search library.

<template>
  <div>
    <input type="text" v-model="search">
    <p v-if="noResults">Sorry, no results for {{search}}</p>
    <div v-for="(r, i) in results" :key="i">
      {{ r }}
    </div>
  </div>
</template>

<script lang="ts">
import { defineComponent } from 'vue';
import { useVueFuse } from '@whoj/utils-vue/fusejs';

export default defineComponent({
  setup () {
    const myList = ['aaaa', 'bbbb', 'cccc', 'abc', 'xyz']
    const { search, results, noResults } = useVueFuse(myList)

    return {
      search,
      results,
      noResults,
    }
  }
})
</script>

MIT License © 2022 Jonson B.

Readme

Keywords

Package Sidebar

Install

npm i @whoj/utils-vue

Weekly Downloads

193

Version

2.3.1

License

MIT

Unpacked Size

201 kB

Total Files

75

Last publish

Collaborators

  • who_j
  • who_jonson