Package Exports
- encoding-down
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (encoding-down) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
encoding-down
abstract-leveldown
wrapper supporting levelup@1 encodings. For motivation, see this issue.
Usage
const levelup = require('levelup')
const leveldown = require('leveldown')
const encode = require('encoding-down')
const db = levelup(encode(leveldown('./db')))
db.put('name', 'encoding-down', function (err) {
db.get('name', function (err, value) {
if (!err) console.log('name=', value)
})
})
API
const db = require('encoding-down')(db[, options])
db
abstract-leveldown
compatible db such asleveldown
,memdown
,level-js
etcoptions.keyEncoding
(string) defaults to'utf8'
options.valueEncoding
(string) defaults to'utf8'
options
are passed to level-codec
, see supported encodings for more information.
License
MIT