level-supports is a utility package within the LevelDB ecosystem designed to generate a manifest object detailing the capabilities of an `abstract-level` database instance. This manifest allows consumers of a database to programmatically check for specific features, such as `permanence`, `encodings` (like `utf8`), `implicitSnapshots`, `explicitSnapshots`, and `has` (for `has()` and `hasMany()`). The current stable version is 6.2.0. Releases are typically driven by new `abstract-level` features or Node.js compatibility updates, with a focus on semantic versioning for breaking changes. Its key differentiator is providing a standardized, merged, and enriched feature description, moving beyond simple boolean checks to handle more complex truthy values for future extensibility.
npm install level-supportsVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to create a support manifest, attach it to a database object, and check for specific features like permanence, encodings, and `has()`.
Upgrade your Node.js environment to version 16 or newer. If you need to support older Node.js versions, pin 'level-supports' to '~5.x'.
Review your manifest creation and usage. If you were relying on implicit truths for older properties, you might need to explicitly define them if still required, though most were redundant with `abstract-level@1`.
Update import statements from `const supports = require('level-supports')` to `const { supports } = require('level-supports')` or `import { supports } from 'level-supports'`. Ensure your database implementations are `abstract-level` compatible. Adjust manifest property checks for `encodings` and `events` to expect objects.Adopt the `if (db.supports.feature)` pattern for all feature checks to ensure forward compatibility.
Update code referencing `db.supports.snapshots` to `db.supports.implicitSnapshots` for clarity and future-proofing.
Change your import statement from `import supports from 'level-supports'` to `import { supports } from 'level-supports'` or for CommonJS, `const supports = require('level-supports')` to `const { supports } = require('level-supports')`.Ensure that the `level-supports` manifest accurately reflects the underlying database's capabilities, especially for critical features like `permanence`. If persistence is required, use a database that provides it or configure the manifest accordingly.
No dependency data recorded yet.