
Security News
Bun 1.2.19 Adds Isolated Installs for Better Monorepo Support
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
vue-persistent-storage-manager
Advanced tools
Vue plugin that wraps the StorageManager API and provides the state of the persistent-storage permission alongside a storage estimate.
Vue plugin that wraps the StorageManager API and provides the state of the
persistent-storage
permission alongside a storage estimate.
persistent-storage
permission.# yarn
$ yarn add vue-persistent-storage-manager
# npm
$ npm install vue-persistent-storage-manager
import Vue from 'vue'
import { VuePersistentStorageManager } from 'vue-persistent-storage-manager'
Vue.use(VuePersistentStorageManager, { watchStorage: true })
Options are not required.
In this case, watchStorage
will default to false
.
Note: If
watchStorage
is set totrue
, the functionslocalStorage.setItem
andlocalStorage.removeItem
are replaced by functions that update the StorageEstimate. The original functions will still be called and are available aslocalStorage.originalSetItem
andlocalStorage.originalRemoveItem
<template>
<div>
<button
:disabled="!$storageManager.isAvailable || $storageManager.isPersistent"
@click="$storageManager.requestPersistentStorage()"
>
{{
$storageManager.isPersistent
? 'Persistence granted'
: 'Request persistence'
}}
</button>
<p>{{ (100 * $storageEstimate.usage) / $storageEstimate.quota }}%</p>
<p>{{ $storageEstimate.usage / 1000000 }}MB</p>
</div>
</template>
plugins/persistentStorageManager.ts
with the following content.import Vue from 'vue'
import { VuePersistentStorageManager } from 'vue-persistent-storage-manager'
export default () => {
Vue.use(VuePersistentStorageManager, { watchStorage: true })
}
plugins
array in nuxt.config.js
.export default {
plugins: [{ src: '~/plugins/persistentStorageManager.ts' }],
}
# install dependencies
$ yarn install
# build for production
$ yarn build
# lint project files
$ yarn lint
# run tests
$ yarn test
MIT - Copyright © Jan Müller
FAQs
Vue plugin that wraps the StorageManager API and provides the state of the persistent-storage permission alongside a storage estimate.
The npm package vue-persistent-storage-manager receives a total of 15 weekly downloads. As such, vue-persistent-storage-manager popularity was classified as not popular.
We found that vue-persistent-storage-manager demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer 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
Bun 1.2.19 introduces isolated installs for smoother monorepo workflows, along with performance boosts, new tooling, and key compatibility fixes.
Security News
Popular npm packages like eslint-config-prettier were compromised after a phishing attack stole a maintainer’s token, spreading malicious updates.
Security News
/Research
A phishing attack targeted developers using a typosquatted npm domain (npnjs.com) to steal credentials via fake login pages - watch out for similar scams.