Product
Introducing Enhanced Alert Actions and Triage Functionality
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
codecs-encoding
Advanced tools
This is a utility crafted to facilitate encoding and decoding data using various formats, including but not limited to hex, utf8, ascii, and json.
Readme
Hello! This is a utility crafted to facilitate encoding and decoding data using various formats, including but not limited to hex
, utf8
, ascii
, and json
.
The utility is built around the concept of a Codec
which can encode and decode data. It has a record of codecs mapped to different encodings. This utility conveniently provides codecs for multiple encoding types and even includes a JSON codec.
Buffer Encoding Types: The primary encodings supported are hex
, utf8
, ascii
, binary
, base64
, ucs2
, and utf16le
.
Additional Encodings: Added support for json
, utf-8
, and ucs-2
encodings.
Extensible: While a set of common encodings are pre-defined, the architecture allows you to seamlessly integrate more if needed.
(Please include any installation steps if this utility is to be packaged and distributed.)
Here's a basic usage example:
import codec from './dist/codec.js';
const data = 'Hello, World!';
const encoded = codecs.utf8.encode(data);
const decoded = codecs.utf8.decode(encoded);
console.log(decoded); // Outputs: Hello, Brad!
The utility comes with a test suite to ensure that encoding and decoding work correctly. If you're extending the utility or just wish to run tests:
jest codec.test.ts
Open to improvements and additional features! If you think something's missing or needs refinement, please feel free to contribute.
FAQs
This is a utility crafted to facilitate encoding and decoding data using various formats, including but not limited to hex, utf8, ascii, and json.
The npm package codecs-encoding receives a total of 1 weekly downloads. As such, codecs-encoding popularity was classified as not popular.
We found that codecs-encoding demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Product
Socket now supports four distinct alert actions instead of the previous two, and alert triaging allows users to override the actions taken for all individual alerts.
Security News
Polyfill.io has been serving malware for months via its CDN, after the project's open source maintainer sold the service to a company based in China.
Security News
OpenSSF is warning open source maintainers to stay vigilant against reputation farming on GitHub, where users artificially inflate their status by manipulating interactions on closed issues and PRs.