Skip to content

Commit f644190

Browse files
authored
Add has property (#33)
Ref: Level/community#142 Category: addition
1 parent 9776ad0 commit f644190

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,10 +98,28 @@ Does the database implement `db.snapshot()` and do read methods accept a `snapsh
9898
| `classic-level` | Not yet |
9999
| `memory-level` | Not yet |
100100
| `browser-level` ||
101+
| `many-level` | TBD |
101102
| `rave-level` | TBD |
102103

103104
</details>
104105

106+
### `has` (boolean)
107+
108+
Does the database implement `has()` and `hasMany()`? Tracked in [Level/community#142](https://github.com/Level/community/issues/142).
109+
110+
<details>
111+
<summary>Support matrix</summary>
112+
113+
| Module | Has |
114+
| :-------------- | :------ |
115+
| `classic-level` | Not yet |
116+
| `memory-level` | Not yet |
117+
| `browser-level` | Not yet |
118+
| `many-level` | Not yet |
119+
| `rave-level` | Not yet |
120+
121+
</details>
122+
105123
### `permanence` (boolean)
106124

107125
Does data survive after process (or environment) exit? Typically true. False for [`memory-level`](https://github.com/Level/memory-level).

index.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@ export interface IManifest {
3131
*/
3232
snapshots: boolean
3333

34+
/**
35+
* Does the database implement `has()` and `hasMany()`?
36+
*/
37+
has: boolean
38+
3439
/**
3540
* Does data survive after process (or environment) exit?
3641
*/

index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ exports.supports = function supports (...manifests) {
1111
implicitSnapshots,
1212
explicitSnapshots,
1313
snapshots: implicitSnapshots,
14+
has: manifest.has || false,
1415
permanence: manifest.permanence || false,
1516
seek: manifest.seek || false,
1617
createIfMissing: manifest.createIfMissing || false,

0 commit comments

Comments
 (0)