diff --git a/README.md b/README.md index c75737c..57a0c8b 100644 --- a/README.md +++ b/README.md @@ -161,7 +161,24 @@ _TBD: what this means for `*asBuffer` options._ ### `additionalMethods` (object) -Format TBD. +In the form of: + +```js +{ + foo: true, + bar: true +} +``` + +Which says the db has two methods, `foo` and `bar`, that are not part of the `abstract-leveldown` interface. It might be used like so: + +```js +if (db.supports.additionalMethods.foo) { + db.foo() +} +``` + +For future extensibility, the properties of `additionalMethods` should be taken as truthy rather than strictly typed booleans. We may add additional metadata (see [#1](https://github.com/Level/supports/issues/1)). ## Install diff --git a/index.js b/index.js index a56bd9f..58165ce 100644 --- a/index.js +++ b/index.js @@ -30,17 +30,6 @@ module.exports = function supports () { encodings: manifest.encodings || false, // Methods that are not part of abstract-leveldown or levelup - additionalMethods: manifest.additionalMethods || { - // May look something like: - // approximateSize: { - // sync: false, - // callback: true, - // promise: false - // }, - // createWriteStream: { - // sync: true, - // writable: true - // } - } + additionalMethods: manifest.additionalMethods || {} }) }