Socket
Book a DemoInstallSign in
Socket

react-native-leveldb-level-adapter

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-native-leveldb-level-adapter

level adapter for react-native-leveldb

0.2.1
latest
npmnpm
Version published
Weekly downloads
1
Maintainers
1
Weekly downloads
 
Created
Source

react-native-leveldb-level-adapter

abstract-level adapter for react-native-leveldb

Passes all 5395/5397 tests of abstract-level in full Buffer support! (The only 2 failing tests are ones where you store non-utf8 compliant character containing buffers into databases that are opened with utf8 keys/values.. which shouldn't occur IRL) (see errorLogBufferTrue.md)

To run tests, start up the example app and run it. The tests are run in a useEffect hook called once at app startup.

(If you get this in tests, it's due to an older version of Babel)

  • TypeError: Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a Symbol.iterator method
    • Issue description (thanks to this comment here in the facebook/metro repository)
    • "That error is due to an error in the @babel/plugin-transform-for-of plugin. It (mistakenly) tries to convert for await of statements with the same code as for of, and uses the wrong iterator property accessor"
      • Solution : if you encounter this, add "@babel/plugin-proposal-async-generator-functions" to babel.config.js of the application running the app.
      • Note : This should already be fixed

Installation

npm install react-native-leveldb-level-adapter

Usage

import { SKReactNativeLevel } from 'react-native-leveldb-level-adapter';

const ldb = new SKReactNativeLevel('test');
await ldb.open();
console.log('created db')
await ldb.put("hello", "world");

// result : got hello world.
console.log('got hello', await ldb.get("hello"));

// ...

const result = await multiply(3, 7);

Contributing

See the contributing guide to learn how to contribute to the repository and the development workflow.

License

MIT

Keywords

react-native

FAQs

Package last updated on 23 Jan 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.