Socket
Socket
Sign inDemoInstall

@vercel/stega

Package Overview
Dependencies
Maintainers
9
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@vercel/stega - npm Package Compare versions

Comparing version 0.0.5 to 0.1.0

dist/index.js

56

dist/index.d.ts

@@ -1,3 +0,53 @@

export * from './encode';
export * from './decode';
export * from './util';
/**
* Encodes JSON as a hidden string
* @param json - The JSON data to encode
* @returns The hidden string
*/
declare function vercelStegaEncode<T>(json: T): string;
/**
* Encodes JSON as a hidden string using the original logic
* @param json - The JSON data to encode
* @returns The hidden string
* @deprecated
*/
declare function legacyStegaEncode<T>(json: T): string;
type SkipValue = 'auto' | boolean;
/**
* Adds an encoded JSON object to a string as hidden characters
* @param string - The string the JSON will be added to
* @param json - The JSON to add to the string
* @param skip - Whether to skip encoding (default: "auto")
*/
declare function vercelStegaCombine<T>(string: string, json: T, skip?: SkipValue): string;
declare const VERCEL_STEGA_REGEX: RegExp;
/**
* Decodes the first hidden string that's found in the source string back into its original value
* @param source - The source string with encoded data
* @returns The decoded JSON value
*/
declare function vercelStegaDecode<T>(source: string): T | undefined;
/**
* Decodes every hidden string that's found in the source string back into their original values
* @param source - The source string with encoded data
* @returns The decoded JSON values
*/
declare function vercelStegaDecodeAll<T>(source: string): T[];
/**
* Separated clean string and encoded string
*/
interface SplitResult {
/** The original string with encoded substring removed */
cleaned: string;
/** The encoded substring from the original string */
encoded: string;
}
/**
* Splits out encoded data from a string, if any is found
* @param original - The original string
* @returns The cleaned string and encoded data, separately
*/
declare function vercelStegaSplit(original: string): SplitResult;
export { VERCEL_STEGA_REGEX, legacyStegaEncode, vercelStegaCombine, vercelStegaDecode, vercelStegaDecodeAll, vercelStegaEncode, vercelStegaSplit };

20

package.json
{
"name": "@vercel/stega",
"version": "0.0.5",
"version": "0.1.0",
"description": "Utilities for steganography",
"main": "./dist/cjs/index.js",
"module": "./dist/esm/index.js",
"main": "./dist/index.js",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",

@@ -14,5 +14,6 @@ "source": "./src/index.ts",

"devDependencies": {
"@jest/globals": "^28.1.3",
"jest": "^28.1.3",
"ts-jest": "^28.0.3",
"@jest/globals": "^29.6.1",
"jest": "^29.6.1",
"ts-jest": "^29.1.1",
"tsup": "^6.7.0",
"typescript": "^4.6.3"

@@ -25,9 +26,6 @@ },

"scripts": {
"dev": "pnpm build",
"build": "pnpm build:types && pnpm build:esm && pnpm build:cjs",
"build:esm": "tsc --module es2020 --outDir dist/esm",
"build:cjs": "tsc --module commonjs --outDir dist/cjs",
"build:types": "tsc --declaration --emitDeclarationOnly",
"dev": "tsup --watch",
"build": "tsup",
"test": "jest"
}
}
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