You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
1.1 KiB

4 years ago
'use strict'
// For (old) browser support
var xtend = require('xtend')
var assign = require('xtend/mutable')
module.exports = function supports () {
var manifest = xtend.apply(null, arguments)
return assign(manifest, {
// Features of abstract-leveldown
bufferKeys: manifest.bufferKeys || false,
snapshots: manifest.snapshots || false,
permanence: manifest.permanence || false,
seek: manifest.seek || false,
clear: manifest.clear || false,
// Features of abstract-leveldown that levelup doesn't have
status: manifest.status || false,
// Features of disk-based implementations
createIfMissing: manifest.createIfMissing || false,
errorIfExists: manifest.errorIfExists || false,
// Features of level(up) that abstract-leveldown doesn't have yet
deferredOpen: manifest.deferredOpen || false,
openCallback: manifest.openCallback || false,
promises: manifest.promises || false,
streams: manifest.streams || false,
encodings: manifest.encodings || false,
// Methods that are not part of abstract-leveldown or levelup
additionalMethods: xtend(manifest.additionalMethods)
})
}