RepositoryJavaScript
dmlzj

dmlzj/vlf

A Vue plugin from localForage.vue-localForage or vlf

119stars
5forks
2issues
2views

Featured achievements

The project's latest awards

1
TINIX TRENDING·Topic: localforage

#1 Repository of the month

1
TINIX TRENDING·Topic: vlf

#1 Repository of the month

1
TINIX TRENDING·Topic: vue-localforage

#1 Repository of the month

vlf

vue-localforage and support typescript

localForage is a fast and simple storage library for JavaScript. localForage improves the offline experience of your web app by using asynchronous storage (IndexedDB or WebSQL) with a simple, localStorage-like API.

localForage uses localStorage in browsers with no IndexedDB or WebSQL support. See [the wiki for detailed compatibility info][supported browsers].

Install

npm install  --save localforage vlf

How to use vlf

import Vlf from 'vlf'
import localforage from 'localforage'
Vue.use(Vlf, localforage)

In your code

// 创建实例
this.$vlf.createInstance({
    storeName: 'user'
})
// 迭代
this.$vlf.iterate((value, key, num) => {
    console.log(key);
});
// 设置值
this.$vlf.setItem('test', 'hello').then(v => {
    console.log(v);
});

// ...和官方调用一致
// The other methods of use are the same as the official website, just add a this.$vlf in front, the same behind!


Similar Projects

Discover other similar projects and AI models.

RepositoryJavaScript
localForage/localForage

💾 Offline storage, improved. Wraps IndexedDB, WebSQL, or localStorage using a simple but powerful API.

25.8k
Jul 30, 2024
RepositoryTypeScript
vuejs/vue

This is the repo for Vue 2. For Vue 3, go to https://github.com/vuejs/core

212.6k
Oct 10, 2024
RepositoryJavaScript
typicode/lowdb

Simple and fast JSON database

22.6k
Nov 30, 2026
RepositoryJavaScript
marcuswestin/store.js

Cross-browser storage for all use cases, used across the web.

14.0k
Jan 16, 2024
RepositoryJavaScript
remotestorage/remotestorage.js

⬡ JavaScript client library for integrating remoteStorage in apps

2.4k
Nov 29, 2026
RepositoryJavaScript
pubkey/broadcast-channel

:satellite: BroadcastChannel to send data between different browser-tabs or nodejs-processes :satellite: + LeaderElection over the channels https://pubkey.github.io/broadcast-channel/

2.0k
Nov 28, 2026
RepositoryJavaScript
indexeddbshim/IndexedDBShim

A polyfill for IndexedDB using WebSql

978
Nov 19, 2026
RepositoryJavaScript
bernabe9/redux-react-session

:key: Simple Session API storage for Redux and React

148
Dec 7, 2022
RepositoryTypeScript
dexie/Dexie.js

A Minimalistic Wrapper for IndexedDB

14.7k
Nov 28, 2026