Installations
npm install @teamteanpm2024/mollitia-quod-fuga
Developer Guide
Typescript
No
Module System
CommonJS
Node Version
20.12.2
NPM Version
10.5.0
Score
49.8
Supply Chain
72.1
Quality
79.8
Maintenance
100
Vulnerability
100
License
Releases
Unable to fetch releases
Total Downloads
Cumulative downloads
Total Downloads
0
Last day
0%
0
Compared to previous day
Last week
0%
0
Compared to previous week
Last month
0%
0
Compared to previous month
Last year
0%
0
Compared to previous year
Daily Downloads
Weekly Downloads
Monthly Downloads
Yearly Downloads
Dependencies
37
@teamteanpm2024/mollitia-quod-fuga
Copies one LMDB key value to another.
Installation
1npm install lmdb-move
Usage
1import {open} from "lmdb"; 2import {withExtensions} from "@teamteanpm2024/mollitia-quod-fuga"; 3 4const db = withExtensions(open("test")); 5await db.put("key1","value1"); 6await 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 | % Lines | Uncovered Line #s |
---|---|---|---|---|---|
All files | 92.85 | 92.3 | 100 | 100 | |
index.js | 92.85 | 92.3 | 100 | 100 | 21 |
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.
![Empty State](/_next/static/media/empty.e5fae2e5.png)
No vulnerabilities found.
![Empty State](/_next/static/media/empty.e5fae2e5.png)
No security vulnerabilities found.