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

@phensley/cldr

Package Overview
Dependencies
Maintainers
1
Versions
240
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@phensley/cldr

Internationalization in Typescript with Unicode CLDR, batteries included

  • 1.9.0
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

cldr-engine

Internationalization in Typescript with Unicode CLDR, batteries included.

build

npm version

Install

Install the NPM package:

npm install --save @phensley/cldr

Using Yarn:

yarn add @phensley/cldr

Versioning

This project follows semantic versioning:

PATCH

  • Bug fixes
  • Backwards-compatible
  • Resource pack compatibility maintained (packs from 1.0.0 are guaranteed to work for all 1.0.* versions)

MINOR

  • New features
  • Backwards-compatible
  • Internal schema breaking changes (applications must load resource packs from the same major.minor version)
  • CLDR data upgrades which maintain backwards-compatibility

MAJOR

  • Public API breaking changes
  • CLDR data upgrades which change break API compatibility (unit deprecation / renaming, etc)

Features

Package Naming

Packages with the cldr-* prefix represent pieces of the larger library and are designed to work together. The @phensley/cldr package pulls in the full functionality of the library.

Packages without the cldr-* prefix can be used in an application individually without pulling in the larger core library.

You can use any of the packages independent of the rest of the library:

packagesizedependencies
@phensley/cldr-utilsmin+gzip
@phensley/decimalmin+gzip
@phensley/language-tagmin+gzip
@phensley/localemin+gzipsize includes language-tag package
@phensley/locale-matchermin+gzipsize includes locale and language-tag packages
@phensley/messageformatmin+gzipsize includes cldr-utils, decimal, and plurals packages
@phensley/pluralsmin+gzipsize includes decimal package
@phensley/timezonemin+gzipsize includes cldr-utils package
@phensley/unit-convertermin+gzipsize includes cldr-utils and decimal packages

Goals

  • Support a broad set of CLDR features in the browser "out of the box".
  • Support all scripts and regions for a language in a single compact resource pack.
  • Resolve the CLDR data size and dimensionality problems.
    • In the case of English: ~40MB of JSON for 105 locales is compressed to a 194KB resource pack (44KB gzip), a factor of approx. 200:1 uncompressed, 1000:1 with gzip compression.
  • No additional library dependencies required.
  • No custom extraction of CLDR data or precompilation of formatters required.
  • Correctness and consistency across browsers, Node.js, and other Javascript ES5 runtime environments.
  • Provide type-safety, reducing programming errors.
  • No familiarity with CLDR structure is required for developers to use this library.
  • High performance.
  • Arbitrary precision decimal math, to achieve the same accuracy in the browser as on the server.

License

Copyright 2018-present Patrick Hensley

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

Affiliation

This project is not affiliated with the Unicode Inc. or the Unicode CLDR project.

Keywords

FAQs

Package last updated on 05 Sep 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