![Introducing Enhanced Alert Actions and Triage Functionality](https://cdn.sanity.io/images/cgdhsj6q/production/fe71306d515f85de6139b46745ea7180362324f0-2530x946.png?w=800&fit=max&auto=format)
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.
@vercel/stega
Advanced tools
Readme
A simple steganography library for adding hidden JSON data to strings.
This package exports a few methods for encoding and decoding data. All of these methods have TypeScript type definitions and JSDoc comments explaining their parameters and return values.
vercelStegaCombine(string, json, skip = 'auto')
This method combines a string
with some JSON data and returns the result. The json
can be any value that can be JSON stringified.
When the skip
property is true
, the original string will be returned without combining the json
. It supports boolean
values and 'auto'
. The default is 'auto'
, which will only skip encoding when the string
is an ISO date string or a URL.
vercelStegaCombine('Hello world', { foo: 'bar' });
// -> 'Hello world' (the JSON data is hidden in the new string)
vercelStegaEncode(json)
This method encodes JSON data as a hidden string and returns the result. The json
can be any value that can be JSON stringified.
vercelStegaEncode({ foo: 'bar' });
// -> '' (the JSON data is hidden)
vercelStegaSplit(string)
This method splits out the original string (cleaned) and the encoded portion of the string.
// In 'Hello world' (the extra data is hidden)
vercelStegaSplit('Hello world');
/*
* -> {
* cleaned: 'Hello world', // This doesn't contains the encoded data
* encoded: '', // This is not an empty string, it contains the encoded data
* }
*/
vercelStegaDecode(string)
This method attempts to extract encoded JSON data from a string
.
// In 'Hello world' (the extra data is hidden)
vercelStegaDecode('Hello world');
// -> { foo: 'bar' }
FAQs
Utilities for steganography
The npm package @vercel/stega receives a total of 253,120 weekly downloads. As such, @vercel/stega popularity was classified as popular.
We found that @vercel/stega demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 9 open source maintainers 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.