https://github.com/tkers/bencode
Simple JavaScript library for bencoding
https://github.com/tkers/bencode
Last synced: 4 months ago
JSON representation
Simple JavaScript library for bencoding
- Host: GitHub
- URL: https://github.com/tkers/bencode
- Owner: tkers
- Created: 2018-03-30T14:45:21.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-03-30T17:59:55.000Z (about 7 years ago)
- Last Synced: 2025-02-14T22:36:25.849Z (4 months ago)
- Language: JavaScript
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# bencode [](https://travis-ci.com/Lapixx/bencode)
A small JavaScript library for encoding and decoding data following the Bencode specification.## Usage
```js
const { encode, decode } = require('bencode');encode({ foo: 42, hello: 'World!' });
// => d3:fooi42e5:hello6:World!edecode('d3:fooi42e5:hello6:World!e');
// => { foo: 42, hello: 'World!' }
```