Skip to content

Commit

Permalink
docs: updated README.md example code
Browse files Browse the repository at this point in the history
  • Loading branch information
tegefaulkes committed May 22, 2023
1 parent 7bee134 commit 7891215
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ async function main () {
const encrypt = async (
key: ArrayBuffer,
plainText: ArrayBuffer
): Promise<ArrayBuffer> {
): Promise<ArrayBuffer> => {
return plainText;
};

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

Expand All @@ -63,9 +63,11 @@ async function main () {

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

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

Expand Down

0 comments on commit 7891215

Please sign in to comment.