i18n-number
Advanced tools
Comparing version 4.0.0-pre.6 to 4.0.0
@@ -119,2 +119,8 @@ /** | ||
/** | ||
* options property for options object for Intl.NumberFormat | ||
* (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/NumberFormat) | ||
* | ||
* Note: _optionsChanged() is called on every change | ||
*/ | ||
get options() { | ||
@@ -128,2 +134,7 @@ return this._options; | ||
/** | ||
* raw property to store a raw number string from textContent | ||
* | ||
* Note: _rawChanged() is called on every change | ||
*/ | ||
get raw() { | ||
@@ -137,2 +148,9 @@ return this._raw; | ||
/** | ||
* Offset for number | ||
* | ||
* Note: | ||
* - Calculation: number = rawNumber - offset | ||
* - _offsetChanged() is called on every change | ||
*/ | ||
get offset() { | ||
@@ -146,2 +164,11 @@ return this._offset; | ||
/** | ||
* connectedCallback for custom elements | ||
* | ||
* Tasks: | ||
* - Sets this.lang if not set | ||
* - Sets up observers if not set up | ||
* - Sets this.raw from this.textNode.data | ||
* - Triggers rendering | ||
*/ | ||
connectedCallback() { | ||
@@ -159,3 +186,3 @@ if (!this.lang) { | ||
/** | ||
* Set up observers of textContent mutations | ||
* Sets up observers of textContent mutations | ||
*/ | ||
@@ -302,3 +329,3 @@ _setupObservers() { | ||
/** | ||
* Get a cached Intl.NumberFormat object | ||
* Gets a cached Intl.NumberFormat object | ||
* | ||
@@ -305,0 +332,0 @@ * @param {string} lang Locale for formatting. |
@@ -18,3 +18,3 @@ { | ||
"name": "i18n-number", | ||
"version": "4.0.0-pre.6", | ||
"version": "4.0.0", | ||
"main": "i18n-number.js", | ||
@@ -21,0 +21,0 @@ "directories": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
264261
23
5449
0