vuex-getters-warning-plugin
A plugin for Vuex which dumps warning when accessing to non-existent getters.
Usage
; const store = plugins: state: name: 'Alice' getters: { return `Ms. `; } ;
Once registerd it, you will get warning in the console when accessing to non-exsistent getters.
const age = vm$storegettersage;// A nonexistent getter has been called: age
Options
Function
logger You can specify the logger called on warning. The logger receives the two arguments, a static message from this plugin and the called target key.
// even throw an error const store = plugins: state: name: 'Alice' getters: { return `Ms. `; } ; const age = vm$storegettersage;// Error: A nonexistent getter has been called: age
default: console.warn
Boolean
silent This can prevent installing this plugin.
const store = plugins: state: name: 'Alice' getters: { return `Ms. `; } ; const age = vm$storegettersage;// nothing dumps.
default: process.env.NODE_ENV === 'production'