Socket
Book a DemoInstallSign in
Socket

@endeo/decoder

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@endeo/decoder

A Transform for decoding endeo bytes.

0.3.0
unpublished
latest
Source
npmnpm
Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

@endeo/decoder

Build Status Dependency Status npm version Coverage Status

A Transform for decoding endeo bytes.

Used by endeo as its decoder() implementation.

See packages:

  • endeo
  • enbyte
  • debyte

Install

# endeo-std requires this and all other standard packages.

# used with endeo or with custom bytes/unstring/specials:
npm install --save @endeo/decoder

# used standalone with standard implementations:
npm install --save @endeo/decoder @endeo/bytes @endeo/specials unstring

Usage

Primarily used as the standard endeo.decoder() implementation.

Usable directly and accepts options to configure its bytes, unstring, and @endeo/specials.

// get builder:
var buildDecoder = require('@endeo/decoder')

// build default one which expects these packages are available:
//   @endeo/bytes
//   unstring
//   @endeo/specials
decoder = buildDecoder()

// pipe encoded byte into it:
sourceStream.pipe(decoder)

// Or, write bytes to it:
decoder.write(someBuffer)

// get result via 'data' event:
decoder.on('data', function(data) {
  // data is object/array/String
})

// Or, send object-mode output to another stream:
decoder.pipe(targetStream)


// customize options method #1, as direct objects:
decoder = buildDecoder({
  // for the 'context' used in the 'stating' nodes
  context: {
    bytes: /* custom bytes object */,
    unstring: /* custom unstring object */,
    specials: /* custom specials object */
  }
})

// customize options method #2, as properties:
decoder = buildDecoder({
  // for the 'context' used in the 'stating' nodes
  context: {
    // the context is built with prototype and properties
    // so you can customize the properties...
    props: {
      bytes: {
        value: /* custom bytes property */
      },
      unstring: {
         value: /* custom unstring property */
      }
      specials: {
        value: /* custom specials property */
      }
    }
  }
})

// the 'stating' package instance is set on the transform.
// in case you want to mess with it...
decoder.states

MIT License

Keywords

endeo

FAQs

Package last updated on 21 May 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.