Gathering detailed insights and metrics for locale-currency-input
Gathering detailed insights and metrics for locale-currency-input
Gathering detailed insights and metrics for locale-currency-input
Gathering detailed insights and metrics for locale-currency-input
react-currency-input-field
React <input/> component for formatting currency and numbers.
@react-input/number-format
React input component for formatted number input with locale-specific.
@metamorph/react-currency-input-field
React <input/> component for formatting currency and numbers.
@sahidmiller/react-currency-input-field
React <input/> component for formatting currency and numbers.
npm install locale-currency-input
Typescript
Module System
Node Version
NPM Version
70.4
Supply Chain
87.1
Quality
75
Maintenance
50
Vulnerability
98.2
License
TypeScript (77.48%)
JavaScript (17.65%)
HTML (4.37%)
CSS (0.5%)
Total Downloads
2,599
Last Day
4
Last Week
19
Last Month
62
Last Year
489
3 Stars
14 Commits
1 Forks
2 Watching
1 Branches
2 Contributors
Minified
Minified + Gzipped
Latest Version
0.0.6
Package Id
locale-currency-input@0.0.6
Unpacked Size
305.23 kB
Size
237.80 kB
File Count
27
NPM Version
6.1.0
Node Version
10.4.1
Cumulative downloads
Total Downloads
Last day
300%
4
Compared to previous day
Last week
375%
19
Compared to previous week
Last month
181.8%
62
Compared to previous month
Last year
-4.1%
489
Compared to previous year
1
2
This repos is creating a library for angular currency input
use in the html: localeCurrencyInput
import in the module - LocaleCurrencyInputModule
The directive can be used in html input to automatically change the input to locale currency.
Input in any locale currency convert to number inside the component. On focus the user will see to type in number and on focus out the user will see the number in currency format with the support of internalization format and currency symbol
The selector name of the directive is localeCurrencyInput
The directive consists of two inputs:
For more details , the project is inside projects/locale-currency-input.
The module need to import
Inside the view you need to call localeCurrencyInput and add input. Below is one of the example
<input type="text" localeCurrencyInput [allowNegative]="false" [currencyCode]="'USD'" [value]="usAmount" (blur)="updateUSAmount($event)" />
Inside the component you can get the value by using event like blur or click or any other event. Below is one of the example updateUSAmount(event) { this.usAmount = event.target.value; }
You can also used translation services to get the locale. If localeId is passed then the currency number format show based on the locale you had registered. If localeId is not passed then by default it will take from browser language. You can also use chrome plugin to set the locale and test in different language. Here is the chrome plugin to switch the local- https://chrome.google.com/webstore/detail/locale-switcher/kngfjpghaokedippaapkfihdlmmlafcc Here is an example how we can used achieve this
1export const getNavigatorLanguage = (lang = '') => 2 lang ? lang : 3 (navigator.languages && navigator.languages.length) ? 4 navigator.languages[0].split('-')[0] : 5 navigator.language.split('-')[0] || 'en'; 6 7 8export const lang = getNavigatorLanguage(); 9 10providers: [ 11 { 12 provide: LOCALE_ID, 13 useValue: lang 14 }, 15 { 16 provide: APP_INITIALIZER, 17 useFactory: (translateService) => { 18 return () => { 19 return import( 20 `@angular/common/locales/${lang}.js` 21 ).then(module => { 22 registerLocaleData(module.default); 23 translateService.use(lang); 24 translateService.setDefaultLang(lang); 25 }); 26 }; 27 }, 28 deps: [TranslateService], 29 multi: true 30 }
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
Found 1/10 approved changesets -- score normalized to 1
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
license file not detected
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
127 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-01-27
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More