Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@teamteanpm2024/mollitia-quod-fuga

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@teamteanpm2024/mollitia-quod-fuga

Copies one LMDB key value to another.

  • 1.2.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2
decreased by-66.67%
Maintainers
1
Weekly downloads
 
Created
Source

@teamteanpm2024/mollitia-quod-fuga

Copies one LMDB key value to another.

Installation

npm install lmdb-move

Usage

import {open} from "lmdb";
import {withExtensions} from "@teamteanpm2024/mollitia-quod-fuga";

const db = withExtensions(open("test"));
await db.put("key1","value1");
await db.copy("key1","key2");

API

async copy(key,destKey,?overwrite,?version,?ifVersion) - returns boolean

Copies the value at key to destKey with the optional version. If overwrite is true and destKey already exists, it will be overwritten. Otherwise, an Error EEXIST: ${key} is thrown. If key does not exist an Error ENOENT: ${key} is thrown. If optional ifVersion does not match current version, the function returns false.

withExtensions(db:lmdbDatabase,extenstions:object) - returns lmdbDatabase`

Extends an LMDB database and any child databases it opens to have the extensions provided as well as any child databases it opens. This utility is common to other lmdb extensions like lmdb-patch, lmdb-move.

Automatically adds copy.

Testing

Unit testing is conducted with Jest.

File% Stmts% Branch% Funcs% LinesUncovered Line #s
All files92.8592.3100100
index.js92.8592.310010021

Release Notes (Reverse Chronological Order)

2023-05-14 v1.0.2 Removed an un-necessary transaction wrapper.

2023-05-02 v1.0.1 Updated documentation of test coverage.

2023-05-02 v1.0.0 Updated license. Added unit tests. Modified error messages to be ENOENT: and EEXIST.

2023-04-27 v0.0.4 Simplifies use of withExtensions.

2023-04-24 v0.0.3 Documentation updates.

2023-04-20 v0.0.2 Documentation updates.

2023-04-20 v0.0.1 Initial public release

License

This software is provided as-is under the MIT license.

Copyright (c) 2023, AnyWhichWay, LLC and Simon Y. Blackwell.

Keywords

FAQs

Package last updated on 29 Apr 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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc