
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
@konsumation/db-level
Advanced tools
timeseries database on leveldb
import levelup from "levelup";
import leveldown from "leveldown";
import { Master, Category } from "konsum-db";
async function example() {
// open database
const db = await levelup(leveldown("example.db"));
const master = await Master.initialize(db);
// create category named EV
const ev = new Category("EV", master, { unit: "kWh" });
await ev.write(master.db);
// write entry
await ev.writeValue(db, Date.now(), 77.34);
}
example();
Extends Category
Value Category.
name
string category namedescription
string unit
string physical unitfractionalDigits
number display precissionWrites object into database. Leaves all other entries alone.
db
ClassicLevel Returns string
Get Meters of the category.
db
ClassicLevel
options
Object?
Returns AsyncIterable<Meter>
Get categories.
db
ClassicLevel gte
(string | undefined) lowest name (optional, default "\u0000"
)lte
(string | undefined) highst name (optional, default "\uFFFF"
)Returns AsyncIterable<Category>
Prefix of the master record
Type: string
Prefix of the categories. Will be followed by the category name
Type: string
Prefix of the values. Will be followed by the category name
Type: string
Prefix of the meters. Will be followed by the category name
Type: string
Prefix of the notes. Will be followed by the category name
Type: string
Extends Master
Master record. Holds schema version.
schemaVersion
string Writes object into database. Leaves all other entries alone.
db
ClassicLevel Close the underlaying database.
List Categories.
Initialize database. checks/writes master record.
directory
string Returns Promise<Master>
Extends Meter
Meter
name
string category namedescription
string unit
string physical unitfractionalDigits
number display precissionList assigned Notes.
db
any options
Object? Returns AsyncIterable<LevelNote>
Get values of the meter.
db
any
options
Object?
Returns AsyncIterable<Value>
Returns string
Extends Note
Hints placed on a category at a specific time.
Returns string
Format seconds as string left padded with '0'.
seconds
number seconds since epochReturns string padded seconds
Extends Value
Hints placed on a category at a specific time.
Returns string
FAQs
timeseries database on leveldb
The npm package @konsumation/db-level receives a total of 91 weekly downloads. As such, @konsumation/db-level popularity was classified as not popular.
We found that @konsumation/db-level demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
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.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.