JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 192252
  • Score
    100M100P100Q55208F
  • License MIT

Levelup's encoding logic

Package Exports

  • level-codec
  • level-codec/lib/encodings

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 (level-codec) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

level-codec

LevelDB Logo

LevelUP's encoding logic.

Build Status

API

Codec([opts])

Create a new codec, with a global options object.

This could be something like

var codec = new Codec(db.options);

#encodeKey(key[, opts])

Encode key with given opts.

#encodeValue(value[, opts])

Encode value with given opts.

#encodeBatch(batch[, opts])

Encode batch ops with given opts.

#encodeLtgt(ltgt)

Encode the ltgt values of option object ltgt.

#decodeKey(key[, opts])

Decode key with given opts.

#decodeValue(value[, opts])

Decode value with given opts.

#createStreamDecoder([opts])

Create a function with signature (key, value), that for each key/value pair returned from a levelup read stream returns the decoded value to be emitted.

#keyAsBuffer([opts])

Check whether opts and the global opts call for a binary key encoding.

#valueAsBuffer([opts])

Check whether opts and the global opts call for a binary value encoding.

#encodings

The supported encodings as object of form

{
  "name": {
    "encode": Function,
    "decode": Function,
    "buffer": Boolean,
    "type": String
  }
}

Publishers

Copyright (c) 2012-2015 LevelUP contributors.

LevelUP is licensed under the MIT license. All rights not explicitly granted in the MIT license are reserved. See the included LICENSE.md file for more details.