Directory

← Back

i18n-number

Wrapper element for Intl.NumberFormat

Author

Rating

Popularity

<100

[ This description is mirrored from README.md at github.com/t2ym/i18n-number on 2019-05-22 ]

Build Status Coverage Status npm version Published on webcomponents.org

i18n-number

Wrapper element for Intl.NumberFormat.

Demo and API Docs

Install

    npm install i18n-number

Import

    import "i18n-number/i18n-number.js";

Usage

    <i18n-number 
      lang="en"
      options='{ "style": "currency", "currency": "USD" }' 
      >123456.78</i18n-number>

This renders as follows:

    $123,456.78

Demo

Prerequisite for Building and Serving Demo

    npm install -g polymer-cli

On-the-fly Build

    # Serve at http://localhost:8080/components/i18n-number/demo/
    polymer serve --npm --module-resolution=node -p 8080

Static Builds

  • Build
    polymer build
  • Targets
target browser minify bundled
build/esm-unbundled es6,modules no no
build/esm-bundled es6,modules yes yes
build/es6-bundled es6 yes yes
build/es5-bundled es5 yes yes
  • Serve
    # Serve at http://localhost:8080/
    cd build/{esm-unbundled|esm-bundled|es6-bundled|es5-bundled}
    python -m SimpleHTTPServer 8080 # or any HTTP(S) server

License

BSD-2-Clause

Compatibility

(Loading compatibility data...)

Was this helpful? Need more help?
Leave a comment or a question below. You can also join the chat on Discord or ask questions on StackOverflow.

Version

Dependencies

Released
2019-03-20
Maturity
IMPORTED
License
BSD 2-clause "Simplified" License

Compatibility

Framework
Polymer 3.0+ in 3.0.1
Polymer 2.0+ in 2.0.2
Polymer 1.0+ in 1.0.2
Browser
Browser Independent

i18n-number - Vaadin Add-on Directory

Wrapper element for Intl.NumberFormat i18n-number - Vaadin Add-on Directory
**[ This description is mirrored from README.md at [github.com/t2ym/i18n-number](https://github.com//t2ym/i18n-number/blob/4.0.0/README.md) on 2019-05-22 ]** [![Build Status](https://travis-ci.org/t2ym/i18n-number.svg?branch=master)](https://travis-ci.org/t2ym/i18n-number) [![Coverage Status](https://coveralls.io/repos/github/t2ym/i18n-number/badge.svg?branch=master&build=26)](https://coveralls.io/github/t2ym/i18n-number?branch=master) [![npm version](https://badge.fury.io/js/i18n-number.svg)](https://badge.fury.io/js/i18n-number) [![Published on webcomponents.org](https://img.shields.io/badge/webcomponents.org-published-blue.svg)](https://www.webcomponents.org/element/t2ym/i18n-number) ### i18n-number Wrapper element for [Intl.NumberFormat](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NumberFormat). [Demo](https://t2ym.github.io/i18n-number/components/i18n-number/demo/) and [API Docs](https://www.webcomponents.org/element/t2ym/i18n-number/elements/i18n-number) ### Install ``` npm install i18n-number ``` ### Import ```js import "i18n-number/i18n-number.js"; ``` ### Usage ```html 123456.78 ``` This renders as follows: ``` $123,456.78 ``` ### Demo #### Prerequisite for Building and Serving Demo ```sh npm install -g polymer-cli ``` #### On-the-fly Build ```sh # Serve at http://localhost:8080/components/i18n-number/demo/ polymer serve --npm --module-resolution=node -p 8080 ``` #### Static Builds - Build ```sh polymer build ``` - Targets | target | browser | minify | bundled | |:-----:|:-------:|:------:|:-------:| |build/esm-unbundled|es6,modules|no|no| |build/esm-bundled |es6,modules|yes|yes| |build/es6-bundled |es6 |yes|yes| |build/es5-bundled |es5 |yes|yes| - Serve ```sh # Serve at http://localhost:8080/ cd build/{esm-unbundled|esm-bundled|es6-bundled|es5-bundled} python -m SimpleHTTPServer 8080 # or any HTTP(S) server ``` ### License [BSD-2-Clause](https://github.com/t2ym/i18n-number/blob/master/LICENSE.md)
GitHub Homepage
Issue tracker
View on NPM
View on GitHub
License
Online Demo
Documentation

i18n-number version 0.1.0
### Dependencies * polymer#^1.2.0

i18n-number version 0.1.1
### Dependencies * polymer#^1.2.0

i18n-number version 0.1.2
### Dependencies * polymer#^1.2.0

i18n-number version 0.1.3
### Dependencies * polymer#^1.2.0

i18n-number version 0.1.4
### Dependencies * polymer#^1.2.0

i18n-number version 0.2.0
### Dependencies * polymer#^1.2.0 * intl#^1.1.0

i18n-number version 0.2.1
### Dependencies * polymer#^1.2.0 * intl#^1.1.0

i18n-number version 0.2.2
### Dependencies * polymer#^1.2.0 * intl#^1.1.0

i18n-number version 0.2.3
### Dependencies * polymer#^1.2.0 * intl#^1.1.0

i18n-number version 0.2.4
### Dependencies * polymer#^1.2.0 * intl#^1.1.0

i18n-number version 1.0.0
### Dependencies * polymer#^1.2.0 * intl#^1.1.0

i18n-number version 1.0.1
### Dependencies * polymer#^1.2.0 * intl#^1.1.0

i18n-number version 1.0.2
### Dependencies * polymer#^1.8.1 * intl#^1.1.0

i18n-number version 2.0.0
### Dependencies * polymer#Polymer/polymer#1.9 - 2 * intl#^1.1.0

i18n-number version 2.0.1
### Dependencies * polymer#Polymer/polymer#1.9 - 2 * intl#^1.1.0

i18n-number version 2.0.2
### Dependencies * polymer#Polymer/polymer#1.9 - 2 * intl#^1.1.0

i18n-number version 3.0.0-pre.2
### Dependencies * @polymer/polymer#^3.0.0 * intl#^1.2.0

i18n-number version 3.0.0-pre.3
### Dependencies * @polymer/polymer#^3.0.0 * intl#^1.2.0

i18n-number version 3.0.0-pre.4
### Dependencies

i18n-number version 3.0.0-pre.5
### Dependencies

i18n-number version 3.0.0-pre.6
### Dependencies

i18n-number version 3.0.0-pre.7
### Dependencies

i18n-number version 3.0.0-pre.8
### Dependencies

i18n-number version 3.0.0-pre.9
### Dependencies

i18n-number version 3.0.0
### Dependencies

i18n-number version 3.0.1
### Dependencies

i18n-number version 4.0.0-pre.1
### Dependencies

i18n-number version 4.0.0-pre.2
### Dependencies

i18n-number version 4.0.0-pre.3
### Dependencies

i18n-number version 4.0.0-pre.4
### Dependencies

i18n-number version 4.0.0-pre.5
### Dependencies

i18n-number version 4.0.0-pre.6
### Dependencies

i18n-number version 4.0.0
### Dependencies

Online