Research
Security News
Kill Switch Hidden in npm Packages Typosquatting Chalk and Chokidar
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
@types/json-to-ast
Advanced tools
TypeScript definitions for json-to-ast
npm install --save @types/json-to-ast
This package contains type definitions for json-to-ast (https://github.com/vtrushin/json-to-ast).
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/json-to-ast.
// Type definitions for json-to-ast 2.1
// Project: https://github.com/vtrushin/json-to-ast
// Definitions by: ExE Boss <https://github.com/ExE-Boss>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
declare namespace parse {
interface Options {
/**
* Appends location information.
*
* @default true
*/
loc?: boolean | undefined;
/**
* Appends source information to node’s location.
*
* @default null
*/
source?: string | undefined;
}
type ValueNode = ObjectNode | ArrayNode | LiteralNode;
interface Position {
line: number;
column: number;
offset: number;
}
interface Location {
start: Position;
end: Position;
source: string | null;
}
interface ASTNode {
type: string;
loc?: Location | undefined;
}
interface ObjectNode extends ASTNode {
type: "Object";
children: PropertyNode[];
}
interface PropertyNode extends ASTNode {
type: "Property";
key: IdentifierNode;
value: ValueNode;
}
interface IdentifierNode extends ASTNode {
type: "Identifier";
value: string;
raw: string;
}
interface ArrayNode extends ASTNode {
type: "Array";
children: ValueNode[];
}
interface LiteralNode extends ASTNode {
type: "Literal";
value: string | number | boolean | null;
raw: string;
}
}
declare function parse(json: string, settings?: parse.Options): parse.ValueNode;
export = parse;
export as namespace jsonToAst;
jsonToAst
These definitions were written by ExE Boss.
FAQs
TypeScript definitions for json-to-ast
We found that @types/json-to-ast 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.
Research
Security News
Socket researchers found several malicious npm packages typosquatting Chalk and Chokidar, targeting Node.js developers with kill switches and data theft.
Security News
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.