File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change @@ -19,18 +19,34 @@ leading to faster execution and improved overall performance.
1919` format ` method.**
2020
2121``` js
22- // Example with numbro
22+ // Example with numbro (not compliant)
2323import numbro from " numbro" ;
2424
2525numbro .setLanguage (' en-GB' );
2626var string = numbro (1000 ).format ({
2727 thousandSeparated: true ,
2828}); // '1,000'
2929
30- // Example with Intl
30+ // Example with numerable (not compliant)
31+ import { format } from " numerable" ;
32+ format (1000 , ' 0,0' );
33+
34+ // Example with Intl (compliant)
3135new Intl.NumberFormat (" en-GB" ).format (1000 ); // '1,000'
3236```
3337
38+ ## Limitations
39+ As for now, only two libraries are handled by this rule :
40+ - [ numbro] ( https://numbrojs.com/ )
41+ - [ numerable] ( https://numerablejs.com/lander )
42+
43+ Some candidates for the future developments are :
44+ - [ javascript-number-formatter] ( https://github.com/Mottie/javascript-number-formatter )
45+ - [ numeraljs] ( https://www.npmjs.com/package/numerable )
46+ - [ formatjs] ( https://formatjs.github.io/ )
47+
48+ It’s more likely this rule won’t ever be exhaustive.
49+
3450## Resources
3551
3652### Documentation
You can’t perform that action at this time.
0 commit comments