Gathering detailed insights and metrics for plurals-cldr
Gathering detailed insights and metrics for plurals-cldr
Gathering detailed insights and metrics for plurals-cldr
Gathering detailed insights and metrics for plurals-cldr
npm install plurals-cldr
Module System
Unable to determine the module system for this package.
Min. Node Version
Typescript Support
Node Version
NPM Version
9 Stars
48 Commits
4 Forks
4 Watching
2 Branches
2 Contributors
Updated on 12 May 2024
JavaScript (96.19%)
Smarty (3.81%)
Cumulative downloads
Total Downloads
Last day
-30.2%
13,448
Compared to previous day
Last week
14.7%
75,719
Compared to previous week
Last month
7.8%
277,303
Compared to previous month
Last year
-8.8%
3,032,731
Compared to previous year
Key benefits:
cardinal
and ordinal
forms supported.If you wish more high abstraction level of i18n support, see babelfish.
1$ npm install plurals-cldr
Returns form name for given number. Number can be passed as string to keep
tailing decimal zeros. If locale not supported, returns null
.
1var plural = require('plurals-cldr'); 2 3// Get cardinal form name 4// 5// Params: 6// 7// - locale 8// - number (Number|String) 9// 10plural('ru', 0) // -> 'many' 11plural('ru', 1) // -> 'one' 12plural('ru', 2) // -> 'few' 13plural('ru', 19) // -> 'many' 14plural('ru', 0.5) // -> 'other'
Returns array of available forms for specified locale. If locale not supported,
returns null
.
Returns index of form for specified locale. That's convenient, if you wish to implement lookup from compact ordered list, like babelfish does.
If locale not supported, function returns -1
.
Order of forms is the same for all languages: zero
, one
, two
, few
,
many
, other
. Remove unavailable forms, and you will get indexes of each.
The same as above, but for ordinal forms.
1npm run cldr-check 2npm run cldr-update
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
Found 0/30 approved changesets -- score normalized to 0
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
11 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-18
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