Socket
Socket
Sign inDemoInstall

level-supports

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

level-supports - npm Package Compare versions

Comparing version 5.0.0 to 6.0.0

12

CHANGELOG.md
# Changelog
## [6.0.0] - 2024-01-27
### Added
- Add `signals` ([#22](https://github.com/Level/supports/issues/22)) ([`74b1706`](https://github.com/Level/supports/commit/74b1706)) (Vincent Weevers).
### Removed
- **Breaking:** drop Node.js < 16 ([`4e86afa`](https://github.com/Level/supports/commit/4e86afa)) (Vincent Weevers).
## [5.0.0] - 2022-11-09

@@ -86,2 +96,4 @@

[6.0.0]: https://github.com/Level/supports/releases/tag/v6.0.0
[5.0.0]: https://github.com/Level/supports/releases/tag/v5.0.0

@@ -88,0 +100,0 @@

@@ -106,2 +106,18 @@ /**

additionalMethods: Record<string, boolean>
/**
* Which methods or method groups take a `signal` option? At the time of writing there
* is only one method group: `iterators`. This includes `db.iterator()`, `db.keys()` and
* `db.values()`. For example:
*
* ```js
* if (db.supports.signals.iterators) {
* const ac = new AbortController()
* const iterator = db.keys({ signal: ac.signal })
*
* ac.abort()
* }
* ```
*/
signals: Record<string, boolean>
}

3

index.js

@@ -16,4 +16,5 @@ 'use strict'

events: Object.assign({}, manifest.events),
additionalMethods: Object.assign({}, manifest.additionalMethods)
additionalMethods: Object.assign({}, manifest.additionalMethods),
signals: Object.assign({}, manifest.signals)
})
}
{
"name": "level-supports",
"version": "5.0.0",
"version": "6.0.0",
"description": "Create a manifest describing the abilities of an abstract-level database",

@@ -27,3 +27,3 @@ "license": "MIT",

"standard": "^17.0.0",
"tap-arc": "^0.3.5",
"tap-arc": "^1.2.2",
"tape": "^5.4.0"

@@ -45,4 +45,4 @@ },

"engines": {
"node": ">=12"
"node": ">=16"
}
}

@@ -8,3 +8,3 @@ # level-supports

[![Node version](https://img.shields.io/node/v/level-supports.svg)](https://www.npmjs.com/package/level-supports)
[![Test](https://img.shields.io/github/workflow/status/Level/supports/Test?label=test)](https://github.com/Level/supports/actions/workflows/test.yml)
[![Test](https://img.shields.io/github/actions/workflow/status/Level/supports/test.yml?branch=main&label=test)](https://github.com/Level/level/actions/workflows/test.yml)
[![Coverage](https://img.shields.io/codecov/c/github/Level/supports?label=\&logo=codecov\&logoColor=fff)](https://codecov.io/gh/Level/supports)

@@ -276,2 +276,15 @@ [![Standard](https://img.shields.io/badge/standard-informational?logo=javascript\&logoColor=fff)](https://standardjs.com)

### `signals` (object)
Which methods or method groups take a `signal` option? At the time of writing there is only one method group: `iterators`. This includes `db.iterator()`, `db.keys()` and `db.values()`. For example:
```js
if (db.supports.signals.iterators) {
const ac = new AbortController()
const iterator = db.keys({ signal: ac.signal })
ac.abort()
}
```
## Install

@@ -278,0 +291,0 @@

@@ -8,2 +8,3 @@ 'use strict'

t.ok(isObject(manifest.additionalMethods), 'additionalMethods is object')
t.ok(isObject(manifest.signals), 'signals is object')

@@ -10,0 +11,0 @@ for (const k in manifest) {

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