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 @@ -21,18 +21,34 @@ Depending on less external dependencies also increases the maintainability and s
2121` format ` method.**
2222
2323``` js
24- // Example with numbro
24+ // Example with numbro (not compliant)
2525import numbro from " numbro" ;
2626
2727numbro .setLanguage (' en-GB' );
2828var string = numbro (1000 ).format ({
2929 thousandSeparated: true ,
3030}); // '1,000'
3131
32- // Example with Intl
32+ // Example with numerable (not compliant)
33+ import { format } from " numerable" ;
34+ format (1000 , ' 0,0' );
35+
36+ // Example with Intl (compliant)
3337new Intl.NumberFormat (" en-GB" ).format (1000 ); // '1,000'
3438```
3539
40+ ## Limitations
41+ As for now, only two libraries are handled by this rule :
42+ - [ numbro] ( https://numbrojs.com/ )
43+ - [ numerable] ( https://numerablejs.com/lander )
44+
45+ Some candidates for the future developments are :
46+ - [ javascript-number-formatter] ( https://github.com/Mottie/javascript-number-formatter )
47+ - [ numeraljs] ( https://www.npmjs.com/package/numerable )
48+ - [ formatjs] ( https://formatjs.github.io/ )
49+
50+ It’s more likely this rule won’t ever be exhaustive.
51+
3652## Resources
3753
3854### Documentation
You can’t perform that action at this time.
0 commit comments