New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@etomon/encode-tools

Package Overview
Dependencies
Maintainers
2
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@etomon/encode-tools - npm Package Compare versions

Comparing version 1.0.2 to 1.1.0

2

package.json
{
"name": "@etomon/encode-tools",
"version": "1.0.2",
"version": "1.1.0",
"description": "This package aggregates different libraries for encoding, serializing, generating ids and hashing things, exposing a common interface.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -7,2 +7,35 @@ # Etomon Encode Tools

## Examples
Encoding a Buffer as base64url
```
let enc = new EncodeTools();
let buf = Buffer.from('hello world', 'utf8');
let newBuf = enc.encodeBuffer(buf, BinaryEncoding.base64url);
console.log(newBuf.toString('utf8'));
```
Hashing an object wth xxhash
```
let enc = new EncodeTools();
let obj = { foo: 'bar' };
let newBuf = await enc.hashObject(obj, HashAlgorithm.xxhash64);
console.log(newBuf.toString('utf8'));
```
Serializing an object wth msgpack
```
let enc = new EncodeTools();
let obj = { foo: 'bar' };
let newBuf = await enc.serializeObject(obj, SerializationFormat.msgpack);
console.log(newBuf.toString('utf8'));
```
Generating a base64-encoded UUID v4
```
let enc = new EncodeTools();
let newBuf = await enc.uniqueId(IDFormat.uuidv4);
console.log(newBuf.toString('base64'));
```
## Algorithms

@@ -9,0 +42,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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