
Security News
CVE Volume Surges Past 48,000 in 2025 as WordPress Plugin Ecosystem Drives Growth
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.
@nuxtjs/universal-storage
Advanced tools
Universal Storage Utilities for Nuxt.js based on @nuxt-community/auth-module
@nuxtjs/universal-storage dependency using yarn or npm to your projectyarn add @nuxtjs/universal-storage
OR
npm install @nuxtjs/universal-storage --save
@nuxtjs/universal-storage to the modules section of your nuxt.config.js file{
modules: [
'@nuxtjs/universal-storage',
],
storage: {
}
}
Options are defined as following:
storage: {
vuex, // boolean or {namespace}
localStorage, // boolean or {prefix}
cookie, // boolean or {prefix, options}
initialState, // Object {}
ignoreExceptions //
}
and default to the following values:
{
vuex: {
namespace: 'storage'
},
cookie: {
prefix: '',
options: {
path: '/'
}
},
localStorage: {
prefix: ''
},
ignoreExceptions: false,
}
Since version 0.4.0 this module allows full state synchronisation with cookies, localStorage and initialState as a default value. That allows for a very neat usage pattern:
For example, if you have an initialState like the following in your nuxt.config.js file:
storage: {
initialState: { testParam: false }
}
then in my component I can simply declare (with decorators)
@State(s => s.storage.testParam)
testParam
or (with mapState)
computed: mapState({
testParam: s => s.storage.testParam
})
Afterwards you can get the computed property testParam with whatever value it had in your last session and on change you just have to call this.$storage.setUniversal("testParam", newVal) to get the new value saved.
Private state is suitable to keep information not being exposed to the Vuex store. This helps prevent stealing tokens from the SSR response HTML.
If the key name starts with _ then that value is kept separate in the memory storage and not exposed to the Vuex store like the rest of the values.
For example:
$storage.setState("_password", "alpha1")
$storage.getUniversal(key)
$storage.setUniversal(key, value)
$storage.syncUniversal(key, defaultValue)
$storage.removeUniversal(key)
$storage.getState(key)
$storage.setState(key, value)
$storage.removeState(key)
$storage.watchState(key, fn)
$storage.getLocalStorage(key)
$storage.setLocalStorage(key, value)
$storage.removeLocalStorage(key)
$storage.getCookies()
$storage.getCookie(key)
$storage.setCookie(key, value)
$storage.removeCookie(key)
yarn install or npm installyarn run dev or npm run devhttp://localhost:3000FAQs
Universal Storage Utilities for Nuxt
The npm package @nuxtjs/universal-storage receives a total of 1,025 weekly downloads. As such, @nuxtjs/universal-storage popularity was classified as popular.
We found that @nuxtjs/universal-storage demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 6 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
CVE disclosures hit a record 48,185 in 2025, driven largely by vulnerabilities in third-party WordPress plugins.

Security News
Socket CEO Feross Aboukhadijeh joins Insecure Agents to discuss CVE remediation and why supply chain attacks require a different security approach.

Security News
Tailwind Labs laid off 75% of its engineering team after revenue dropped 80%, as LLMs redirect traffic away from documentation where developers discover paid products.