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.
@gilbarbara/types
Advanced tools
Reusable typescript typings.
npm i @gilbarbara/types
For convenience, the type-fest
package is re-exported.
type NumberOrNull = number | null;
type StringOrNull = string | null;
type StringOrNumber = string | number;
type PlainObject<T = unknown> = Record<string, T>;
type GenericFunction<T = unknown> = (...arguments_: any[]) => T;
type VoidFunction = () => void;
type AsyncStatus = 'IDLE' | 'PENDING' | 'SUCCESS' | 'ERROR';
interface AsyncFlow {
message: string;
status: AsyncStatus;
}
interface AsyncFlowWithCache extends AsyncFlow {
updatedAt: number;
}
interface AsyncFlowWithData<T = any> extends AsyncFlow {
data: T;
}
interface AsyncFlowWithDataAndCache<T = any> extends AsyncFlowWithData<T> {
updatedAt: number;
}
type HttpMethods =
| 'CONNECT'
| 'DELETE'
| 'GET'
| 'HEAD'
| 'OPTIONS'
| 'PATCH'
| 'POST'
| 'PUT';
interface IdName {
id: string;
name: string;
}
interface LabelValue {
label: string;
value: string;
}
/**
* Narrow down a Record to a plain object.
*/
type NarrowPlainObject<T extends Record<string, any>> = Exclude<
T,
Array<unknown> | Function | Map<unknown, unknown> | Set<unknown>
>;
/**
* An object without excluded types.
*/
type RemoveType<TObject, TExclude = undefined> = {
[Key in keyof TObject as TObject[Key] extends TExclude ? never : Key]: TObject[Key];
};
/**
* A strict plain object with a specific set of keys.
*/
type StrictObject<TObject extends Record<PropertyKey, unknown>, TExpected> = TExpected & {
[Key in keyof TObject]: Key extends keyof TExpected ? TExpected[Key] : never;
};
FAQs
Reusable typescript typings
The npm package @gilbarbara/types receives a total of 26,044 weekly downloads. As such, @gilbarbara/types popularity was classified as popular.
We found that @gilbarbara/types 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.