Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@codingame/json-schema-l10n

Package Overview
Dependencies
Maintainers
6
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codingame/json-schema-l10n

Tool to handle localization in JSON schema

  • 1.0.2
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
Maintainers
6
Weekly downloads
 
Created
Source

json-schema-l10n

This library uses JSONSchema6 from the library json-schema.

It adds a localization object for the description of the JSON schema.

Installation

npm install @codingame/json-schema-l10n

Implementation

Types

The implemented types are:

  • Descriptions: an object that stores the localized descriptions by locale
  • LocalizedJSONSchema: an interface that extends JSONSchema6 with localized descriptions added

Functions

The implemented functions are:

  • getLocalizedDescription:
    • takes in parameters a schema with localized descriptions and the locale for which we want the description (default value is 'en')
    • returns the description for the wanted locale, or undefined if not found
  • renderJsonSchema:
    • takes in parameters the locale for which we want the description and a schema with localized descriptions
    • returns the JSONSchema6 equivalent with the selected locale

FAQs

Package last updated on 14 Feb 2024

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

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