# expo-level

> level adapter for react-native-leveldb

Latest version **0.3.2** (published 2023-01-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install expo-level
pnpm add expo-level
yarn add expo-level
bun add expo-level
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.3.2 |
| Published | 2023-01-23 |
| First published | 2022-12-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 2 |
| Unpacked size | 101.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Bryan |
| Maintainers | singee |
| Keywords | react-native, ios, android |

## Links

- npm: https://www.npmjs.com/package/expo-level
- Repository: https://github.com/ImSingee/expo-level
- Issues: https://github.com/ImSingee/expo-level/issues
- npm.io page: https://npm.io/package/expo-level

## Dependencies (2)

- [events](https://npm.io/package/events.md) ^3.3.0
- [abstract-level](https://npm.io/package/abstract-level.md) ^1.0.3

## Alternatives

- [@sindresorhus/slugify](https://npm.io/package/@sindresorhus/slugify.md) — 3.7M weekly downloads
- [solid-js](https://npm.io/package/solid-js.md) — 2.7M weekly downloads
- [expo-glass-effect](https://npm.io/package/expo-glass-effect.md) — 2.5M weekly downloads
- [nanoassert](https://npm.io/package/nanoassert.md) — 780.8K weekly downloads
- [@ffmpeg/ffmpeg](https://npm.io/package/@ffmpeg/ffmpeg.md) — 529.5K weekly downloads

## Recent versions

- 0.3.2 (latest) — 2023-01-23
- 0.3.1 — 2023-01-23
- 0.3.0 — 2022-12-16
- 0.2.0 — 2022-12-16

## README

# expo-level

`abstract-level` adapter for `react-native-leveldb`

## Installation

```sh
npm install expo-level
```

### Install expo

Because the project use [expo-file-system](https://www.npmjs.com/package/expo-file-system), you also need configure Expo if you use this in a bare React Native Projects.

See: https://www.npmjs.com/package/expo-file-system

### Polyfill

The project requires some polyfill, either. You need to configure manually:

** `TextEncoder` object**

You need to manually setup a polyfill for `TextEncoder`. There are multiple ways to do this, one of the way is:

```bash
npm install react-native-polyfill-globals
```

And then include this in your project:

```js
import 'react-native-polyfill-globals/auto'
```

** Nodejs library **

Include this in your project:

> You may need install `buffer@6` first

```ts
if (!global.process.cwd) {
  global.process.cwd = () => {
    return '.';
  }
}
if (!(global as any).__dirname) {
  (global as any).__dirname = '.';
}
if (!(global as any).Buffer) {
  global.Buffer = require('buffer').Buffer;
}
```

## Usage

```js
import {SKReactNativeLevel} from "expo-level";

const db = new SKReactNativeLevel("test", {/* options */})

// ...
```

## Issues

Passes nearly all tests of `abstract-level` except for "async-iterator-test.js".

This issue may be due to the metro bundler, see

- https://github.com/facebook/metro/commit/bf73ed3aa7fec15f1394fd492450163b62b6267a

To run tests, start up the testapp app and click "Start Test".

## Contributing

See the [contributing guide](CONTRIBUTING.md) to learn how to contribute to the repository and the development workflow.

## Thanks To

- [react-native-leveldb](https://github.com/greentriangle/react-native-leveldb)
- [react-native-leveldb-level-adapter](https://github.com/swittk/react-native-leveldb-level-adapter)

## License

MIT

---
_Source: https://npm.io/package/expo-level · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
