Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
@types/balanced-match
Advanced tools
TypeScript definitions for balanced-match
npm install --save @types/balanced-match
This package contains type definitions for balanced-match (https://github.com/juliangruber/balanced-match).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/balanced-match.
export interface Output {
/**
* The index of the first match of a
*/
start: number;
/**
* The index of the matching b
*/
end: number;
/**
* The preamble, a and b not included
*/
pre: string;
/**
* The match, a and b not included
*/
body: string;
/**
* The postscript, a and b not included
*/
post: string;
}
/**
* For the first non-nested matching pair of a and b in str, return an object with those keys:
* start the index of the first match of
* `end` the index of the matching b
* `pre` the preamble, a and b not included
* `body` the match, a and b not included
* `post` the postscript, a and b not included
* If there's no match, `undefined` will be returned.
* If the `str` contains more a than b / there are unmatched pairs,
* the first match that was closed will be used.
* For example, `{{a}` will match `['{', 'a', '']` and `{a}}` will match `['', 'a', '}']`
*/
export default function balanced(a: string | RegExp, b: string | RegExp, str: string): Output | undefined;
/**
* For the first non-nested matching pair of `a` and `b` in `str`,
* return an array with indexes: `[ <a index>, <b index> ]`.
*/
export function range(a: string | RegExp, b: string | RegExp, str: string): [number, number] | undefined;
These definitions were written by Piotr Błażejewicz.
FAQs
TypeScript definitions for balanced-match
We found that @types/balanced-match demonstrated a not healthy version release cadence and project activity because the last version was released 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.