routie dev init since i didn't adhere to any proper guidance up until now
This commit is contained in:
+15
@@ -0,0 +1,15 @@
|
||||
// Utilities
|
||||
import { getCurrentInstance as _getCurrentInstance } from 'vue';
|
||||
import { toKebabCase } from "./helpers.js";
|
||||
export function getCurrentInstance(name, message) {
|
||||
const vm = _getCurrentInstance();
|
||||
if (!vm) {
|
||||
throw new Error(`[Vuetify] ${name} ${message || 'must be called from inside a setup function'}`);
|
||||
}
|
||||
return vm;
|
||||
}
|
||||
export function getCurrentInstanceName(name = 'composables') {
|
||||
const vm = getCurrentInstance(name).type;
|
||||
return toKebabCase(vm?.aliasName || vm?.name);
|
||||
}
|
||||
//# sourceMappingURL=getCurrentInstance.js.map
|
||||
Reference in New Issue
Block a user