Comments (6)
I haven't.
I don't really see a lot of overlap; I'm obviously open to code-sharing (hey, it's open source!), but level.js seems to be all about LevelDB. localforage aims to exist as a library on top of all the weird storage backends offered by various browsers, except with a common API. A quick glimpse at the level.js README doesn't mention localStorage as a fallback (nor would I expect it to). LevelDB, from what I can see, is some big thing Google does with an ecosystem; localforage is about client-side storage for browsers/web runtimes, nothing more.
I... don't really get what you're saying, other than they're both client-side storage libraries. level.js seems more focused on IndexedDB/levelDB -- which probably makes it a BETTER, more PURE storage engine. localforage values compaitibility over what's best. I gather that makes us different enough projects.
from localforage.
I... don't really get what you're saying, other than they're both client-side storage libraries.
If this project's api implemented the abstract-leveldown api instead of its own custom not-quite-localStorage api, this could be a simple wrapper around levelup, which you'll notice has nearly the exact same public api:
access:
localStorage.getItem('key', fn);
level.get('key', fn);
inserts:
localStorage.setItem('key', JSON.stringify('value'), fn);
level.put('key', JSON.stringify('value'), fn);
deletes:
localStorage.removeItem('key', fn);
level.del('key', fn);
level.js seems more focused on IndexedDB/levelDB
IndexedDB is just an implementation detail.
localforage values compaitibility over what's best.
I guess I'm suggesting if you're going to all the bother of making a localStorage-kinda shim, with a public api that's almost exactly the same as the levelup api, then maybe it makes sense to combine forces and invest that energy into something that does the exact same thing but also benefits from compatibility with an ecosystem, rather than just going it alone.
I know it's a bit of a pivot, just wanted to make sure it was on your radar. Food for thought.
from localforage.
So I'm confused on this -- is this essentially asking to expose a LevelUp Shim for the existing API?
If there's an API guide I can follow that would allow us to mostly map existing methods to the Level names with little extra code I guess I'm open to this, but I can't exactly tell what's up.
Keep in mind, a pull request may help more than an issue.
from localforage.
Having a LevelUP shim over localForage would be pretty neat. I'd be interested to try building PouchDB with localForage as the backend. :)
If you'd like to get started, here's the API for LevelUP. And for a *DOWN project with working browser tests that pass the Abstract LevelDOWN suite in Testling, you can check out localstorage-down.
from localforage.
After three years of not implementing this–I'm thinking we won't. I'd take a PR, but I'll say there's not enough interest in this when there are more pressing patches.
Feel free to re-open if anyone disagrees!
from localforage.
FWIW PouchDB also dropped level.js support in v5 (it was available via an add-on adapter).
from localforage.
Related Issues (20)
- require not defined in Electron-forge HOT 1
- Turning on "Block all cookies" in Brave browser makes localforage.ready() never resolve
- Sessions and Cookies in localForage?
- Doesn't work in electron environment when offline HOT 1
- How to add items without a key in localForage api?
- Make a new release with latest code HOT 3
- npm module
- A more efficient way of encoding binary data as strings in localStorage
- Why not use the textencoder api in the source code HOT 1
- LocalForage prevents sites from going to sleep
- Add a warning or an error message when setItem crash ? HOT 1
- Add src and more files to npmignore
- Error: Uncaught (in promise): VersionError: The operation failed because the stored database is a higher version than the version requested. HOT 2
- Local forage completely breaks my application
- vulnerability in localForage HOT 2
- Store and retrieve javascript objects?
- Is this repository still alive? HOT 1
- TypeError: Cannot read properties of null (reading 'db') HOT 1
- When is version and indexing supported?
- Can it support setting a validity period for the cache? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from localforage.