Skip to content

Integrate js-lint and removing old linting elements #80

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: staging
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
178 changes: 0 additions & 178 deletions .eslintrc

This file was deleted.

31 changes: 14 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ DB is library managing key value state for MatrixAI's JavaScript/TypeScript appl

This forks classic-level's C++ binding code around LevelDB 1.20. Differences from classic-level:

* Uses TypeScript from ground-up
* Supports Snapshot-Isolation based transactions via `DBTransaction`
* API supports "key paths" which can be used to manipulate "levels" of nested keys
* Value encryption (key-encryption is not supported yet) - requires additional work with block-encryption
* Uses RocksDB
- Uses TypeScript from ground-up
- Supports Snapshot-Isolation based transactions via `DBTransaction`
- API supports "key paths" which can be used to manipulate "levels" of nested keys
- Value encryption (key-encryption is not supported yet) - requires additional work with block-encryption
- Uses RocksDB

## Installation

Expand All @@ -21,26 +21,25 @@ npm install --save @matrixai/db
```ts
import { DB } from '@matrixai/db';

async function main () {

async function main() {
const key = Buffer.from([
0x00, 0x01, 0x02, 0x03, 0x00, 0x01, 0x02, 0x03,
0x00, 0x01, 0x02, 0x03, 0x00, 0x01, 0x02, 0x03,
0x00, 0x01, 0x02, 0x03, 0x00, 0x01, 0x02, 0x03, 0x00, 0x01, 0x02, 0x03,
0x00, 0x01, 0x02, 0x03,
]);

const encrypt = async (
key: ArrayBuffer,
plainText: ArrayBuffer
plainText: ArrayBuffer,
): Promise<ArrayBuffer> => {
return plainText;
};

const decrypt = async (
key: ArrayBuffer,
cipherText: ArrayBuffer
cipherText: ArrayBuffer,
): Promise<ArrayBuffer | undefined> => {
return cipherText;
}
};

const db = await DB.createDB({
dbPath: './tmp/db',
Expand All @@ -60,11 +59,9 @@ async function main () {

await db.del(['level', Buffer.from([0x30, 0x32]), 'c']);

for await (const [kP, v] of db.iterator(
['level'],
{
lt: [Buffer.from([0x30, 0x32]), ''],
})) {
for await (const [kP, v] of db.iterator(['level'], {
lt: [Buffer.from([0x30, 0x32]), ''],
})) {
console.log(kP, v);
}

Expand Down
Loading