UNPKG

vue-plugin-kuzzle

Version:

A Vuejs plugin shipping the Kuzzle SDK in your components

11 lines 484 B
import { getCurrentInstance } from 'vue'; export function useKuzzle() { const vueInstance = getCurrentInstance(); // Check only in development mode otherwise throw a false error if (process.env.NODE_ENV !== 'production' && vueInstance === null) { throw new Error(`Missing current instance. useKuzzle() must be called inside <script setup> or setup().`); } const vue = vueInstance.proxy; return vue.$root.$kuzzle; } //# sourceMappingURL=useKuzzle.js.map