You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

bencodec

Package Overview
Dependencies
Maintainers
1
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bencodec

Fast and easy to use bencode codec.

2.0.0
Source
npmnpm
Version published
Weekly downloads
40
-67.21%
Maintainers
1
Weekly downloads
 
Created
Source

NPM

build codecov

Bencodec

Library for decoding and encoding bencoded data.
Compliant with the BitTorrent bencoding specification.

Fast and easy to use.
Written in TypeScript.
Fully tested with 100% code coverage.
Without dependencies.

Installation

npmyarn
npm install --save bencodecyarn add bencodec

Getting Started

Import library
typescriptjavascript
import bencodec from 'bencodec'const bencodec = require('bencodec')
Decode data
  const decoded = bencodec.decode('d3:bar4:spam3:fooi42ee');
Encode data
  const encoded = bencodec.encode({ bar: 'spam', foo: 42 });

Tests

npm test

License

This project is licensed under the MIT License - see the LICENSE file for details.

Keywords

bencode

FAQs

Package last updated on 29 Mar 2020

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