🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

@types/json5

Package Overview
Dependencies
Maintainers
1
Versions
13
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@types/json5

Stub TypeScript definitions entry for json5, which provides its own types definitions

2.2.0
latest
npm
Version published
Weekly downloads
22M
-24.08%
Maintainers
1
Weekly downloads
 
Created

What is @types/json5?

The @types/json5 npm package provides TypeScript type definitions for JSON5, a JSON format extension that aims to make JSON code easier for humans to write and read. This package doesn't add functionality to JSON5 itself but offers type support for TypeScript developers, ensuring that interactions with JSON5 data are type-safe.

What are @types/json5's main functionalities?

Type Definitions for JSON5 Parsing

Provides type definitions for using JSON5's parse method, allowing for the parsing of JSON5 string data into JavaScript objects with TypeScript type safety.

"import * as JSON5 from 'json5';\nconst obj: any = JSON5.parse('{\"key\": \"value\"}');"

Type Definitions for JSON5 Stringification

Offers type definitions for JSON5's stringify method, enabling the conversion of JavaScript objects into JSON5 strings with TypeScript type safety.

"import * as JSON5 from 'json5';\nconst jsonString: string = JSON5.stringify({ key: 'value' });"

Other packages similar to @types/json5

FAQs

Package last updated on 01 Feb 2021

Did you know?

Socket

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.

Install

Related posts