npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@phensley/cldr

v1.9.2

Published

Internationalization in Typescript with Unicode CLDR, batteries included

Downloads

3,933

Readme

cldr-engine

Internationalization in Typescript with Unicode CLDR, batteries included.

build

npm version

Links

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:

| package | size | dependencies | | ------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------- | | @phensley/cldr-utils | min+gzip | | | @phensley/decimal | min+gzip | | | @phensley/language-tag | min+gzip | | | @phensley/locale | min+gzip | size includes language-tag package | | @phensley/locale-matcher | min+gzip | size includes locale and language-tag packages | | @phensley/messageformat | min+gzip | size includes cldr-utils, decimal, and plurals packages | | @phensley/plurals | min+gzip | size includes decimal package | | @phensley/timezone | min+gzip | size includes cldr-utils package | | @phensley/unit-converter | min+gzip | size 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.