Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@rbbn/distant-codecs

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rbbn/distant-codecs

Codecs for Distant

  • 1.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
65
decreased by-37.5%
Maintainers
1
Weekly downloads
 
Created
Source

Distant Codecs

Holds various codecs that can be used with Distant.

Usage

JavaScript

Install using npm:

npm install @distant/distant-codecs

or yarn:

yarn add @distant/distant-codecs

Use the package like so:

import { createDistantProtobufCodec } from '@distant/distant-codecs'

const codec = createDistantProtobufCodec()

const message = { foo: 55 }

const invalidMessageError = codec.verify(message)

if (invalidMessageError) {
  console.error("The message is invalid: " + invalidMessageError)
  return
}

const encodedMessage = codec.encode(message)

const decodedMessage = codec.decode(encodedMessage)

expect(decodedMessage).toEqual(message)

FAQs

Package last updated on 13 Sep 2023

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc