JSPM

@vue-use-x/common

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

Common utilities package of vue-use-x

Package Exports

  • @vue-use-x/common

Readme

@vue-use-x/common

Common package of vue-use-x, see docs: https://vue-use-x.netlify.app/

Provides general-purpose composables to simplify repetitive tasks during development, such as toggling loading states or using provide/inject, etc.

Installation

npm i @vue-use-x/common

Functionalities

Context

  • createContext: A utility to conveniently create a context for provide and inject values.
  • ensureInjection: Useful when the key that needs to be injected must be provided.

Toggle

  • withToggleRefAsync: Run an (async/sync) function while toggling a boolean ref object. It can be used in scenarios such as toggling a loading state.