python-rencode
Arbitrary data encoder/decoder that matches python rencode
.
Usage
npm install python-rencode
const encode decode = ; // Could be basically any data that would convert correctly to JSONconst thing = 1; // Encode some data into a Bufferconst encoded = ; // Decode a Buffer into some dataconst decoded = ;
Install as Git Dependency
If you'd rather not use the versions published to npm, you can easily install from github directly with:
npm install cinderblock/python-rencode # Defaults to master npm install cinderblock/python-rencode#branch # Use a named branch npm install cinderblock/python-rencode#v1.4.0 # Use a tagged version npm install cinderblock/python-rencode#hash # Use a hash directly
Change Log
v1.4.0
v1.4.0
slightly changed the API.
undefined
has been replaced withnull
.undefined
is no longer allowed as a value and will now throw. This behavior might change in the future. Make an issue to discuss.
v1.3.0
- Export data type:
RencodableData
v1.2.0
- Add TypeScript Support
v1.1.0
- Decode UTF8 by default