fast-plural-rules
Advanced tools
Comparing version
@@ -0,1 +1,3 @@ | ||
declare type getPluralFormForCardinal = (count: number) => number | ||
declare function getPluralFormForCardinalByLocale (locale: string, count: number): number | ||
@@ -7,7 +9,7 @@ declare function getPluralFormNameForCardinalByLocale (locale: string, count: number): string | ||
declare function getPluralRuleForCardinalsByLocale (locale: string): Function | ||
declare function getPluralRuleForNamedFormsForCardinalsByLocale (locale: string): Function | ||
declare function getPluralRuleForCardinalsByLocale (locale: string): getPluralFormForCardinal | ||
declare function getPluralRuleForNamedFormsForCardinalsByLocale (locale: string): getPluralFormForCardinal | ||
declare function getPluralRuleForCardinalsByIndex (index: number): Function | ||
declare function getPluralRuleForNamedFormsForCardinalsByIndex (index: number): Function | ||
declare function getPluralRuleForCardinalsByIndex (index: number): getPluralFormForCardinal | ||
declare function getPluralRuleForNamedFormsForCardinalsByIndex (index: number): getPluralFormForCardinal | ||
@@ -18,5 +20,6 @@ export { | ||
getPluralFormForCardinalByIndex, getPluralRuleForCardinalsByIndex, | ||
getPluralFormNameForCardinalByIndex, getPluralRuleForNamedFormsForCardinalsByIndex | ||
getPluralFormNameForCardinalByIndex, getPluralRuleForNamedFormsForCardinalsByIndex, | ||
getPluralFormForCardinal | ||
} | ||
export as namespace fastPluralRules |
(function (global, factory) { | ||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) : | ||
typeof define === 'function' && define.amd ? define(['exports'], factory) : | ||
(global = global || self, factory(global.fastPluralRules = {})); | ||
}(this, function (exports) { 'use strict'; | ||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.fastPluralRules = {})); | ||
})(this, (function (exports) { 'use strict'; | ||
@@ -7,0 +7,0 @@ var cardinals = { |
@@ -1,2 +0,2 @@ | ||
!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((n=n||self).fastPluralRules={})}(this,function(n){"use strict";var r=[function(){return 0},function(n){return 1===n?0:1},function(n){return n<=1?0:1},function(n){return n%10==1&&n%100!=11?1:n%10!=0?2:0},function(n){return 1===n||11===n?0:2===n||12===n?1:2<n&&n<20?2:3},function(n){return 1===n?0:0===n||0<n%100&&n%100<20?1:2},function(n){return n%10==1&&n%100!=11?0:2<=n%10&&(n%100<10||20<=n%100)?2:1},function(n){return n%10==1&&n%100!=11?0:2<=n%10&&n%10<=4&&(n%100<10||20<=n%100)?1:2},function(n){return 1===n?0:2<=n&&n<=4?1:2},function(n){return 1===n?0:2<=n%10&&n%10<=4&&(n%100<10||20<=n%100)?1:2},function(n){return n%100==1?0:n%100==2?1:n%100==3||n%100==4?2:3},function(n){return 1===n?0:2===n?1:2<n&&n<7?2:6<n&&n<11?3:4},function(n){return 1===n?0:2===n?1:3<=n%100&&n%100<=10?2:11<=n%100?3:0!==n?4:5},function(n){return 1===n?0:0===n||0<n%100&&n%100<11?1:10<n%100&&n%100<20?2:3},function(n){return n%10==1?0:n%10==2?1:2},function(n){return n%10==1&&n%100!=11?0:1},function(n){return n%10==1&&n%100!=11&&n%100!=71&&n%100!=91?0:n%10==2&&n%100!=12&&n%100!=72&&n%100!=92?1:n%10!=3&&n%10!=4&&n%10!=9||n%100==13||n%100==73||n%100==93||n%100==14||n%100==74||n%100==94||n%100==19||n%100==79||n%100==99?0!==n&&n%1e6==0?3:4:2},function(n){return 0!==n?1:0},function(n){return 1===n?1:2===n?2:3===n?3:6===n?4:0!==n?5:0},function(n){return 1===n?0:2<=n%10&&n%10<=4&&(n%100<10||20<=n%100)?1:2},function(n){return 1===n?0:2===n?1:3===n?2:3},function(n){return n%10==1&&n%100!=11?0:2<=n%10&&n%10<=4&&(n%100<10||20<=n%100)?1:2},function(n){return 0===n?0:1===n?1:2}],o={ach:2,af:1,ak:2,am:2,an:1,anp:1,ar:12,arn:2,as:1,ast:1,ay:0,az:1,be:7,bg:1,bn:1,bo:0,br:2,brx:1,bs:7,ca:1,cgg:0,cs:8,csb:19,cy:18,da:1,de:1,doi:1,dz:0,el:1,en:1,eo:1,es:1,"es-ar":1,et:1,eu:1,fa:2,ff:1,fi:1,fil:2,fo:1,fr:2,fur:1,fy:1,ga:11,gd:4,gl:1,gu:1,gun:2,ha:1,he:1,hi:1,hne:1,hr:7,hu:1,hy:1,ia:1,id:0,is:15,it:1,ja:0,jbo:0,jv:17,ka:0,kk:1,kl:1,km:0,kn:1,ko:0,ku:1,kw:20,ky:1,lb:1,ln:2,lo:0,lt:6,lv:3,mai:1,me:21,mfe:2,mg:2,mi:2,mk:15,ml:1,mn:1,mni:1,mnk:22,mr:1,ms:0,mt:13,my:0,nah:1,nap:1,nb:1,ne:1,nl:1,nn:1,no:1,nso:1,oc:2,or:1,pa:1,pap:1,pl:9,pms:1,ps:1,pt:1,"pt-br":2,rm:1,ro:5,ru:7,rw:1,sah:0,sat:1,sco:1,sd:1,se:1,si:1,sk:8,sl:10,so:1,son:1,sq:1,sr:7,su:0,sv:1,sw:1,ta:1,te:1,tg:2,th:0,ti:2,tk:1,tr:2,tt:0,ug:0,uk:7,ur:1,uz:2,vi:0,wa:2,wo:0,yo:1,"zh-cn":0,"zh-tw":2},t=[["other"],["one","other"],["one","other"],["zero","one","other"],["one","two","few","other"],["one","few","other"],["one","few","other"],["one","few","other"],["one","few","other"],["one","few","other"],["one","two","few","other"],["one","two","few","many","other"],["one","two","few","many","other","zero"],["one","few","many","other"],["one","few","other"],["one","other"],["one","two","few","many","other"],["zero","other"],["zero","one","two","few","many","other"],["one","few","other"],["one","two","few","other"],["one","few","other"],["zero","one","other"]];function u(n){n=function(n){return n.toLowerCase().replace("_","-")}(n);var e=o[n];if(void 0===e){var r=function(n){var e=n.indexOf("-");return 0<e?n.substr(0,e):n}(n);e=o[r]}if(void 0===e)throw new Error('Unrecognized locale: "'+n+'".');return e}function a(e,n){var r=t[n];return function(n){return r[e(n)]}}function i(n){var e=u(n);return r[e]}function f(n){var e=r[n];if(void 0===e)throw new Error('Invalid index: "'+n+'".');return e}function c(n){var e=u(n);return a(r[e],e)}function l(n){if(void 0===r[n])throw new Error('Invalid index: "'+n+'".');return a(r[n],n)}n.getPluralFormForCardinalByIndex=function(n,e){return f(n)(e)},n.getPluralFormForCardinalByLocale=function(n,e){return i(n)(e)},n.getPluralFormNameForCardinalByIndex=function(n,e){return l(n)(e)},n.getPluralFormNameForCardinalByLocale=function(n,e){return c(n)(e)},n.getPluralRuleForCardinalsByIndex=f,n.getPluralRuleForCardinalsByLocale=i,n.getPluralRuleForNamedFormsForCardinalsByIndex=l,n.getPluralRuleForNamedFormsForCardinalsByLocale=c,Object.defineProperty(n,"__esModule",{value:!0})}); | ||
!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e((n="undefined"!=typeof globalThis?globalThis:n||self).fastPluralRules={})}(this,(function(n){"use strict";var e=[function(){return 0},function(n){return 1===n?0:1},function(n){return n<=1?0:1},function(n){return n%10==1&&n%100!=11?1:n%10!=0?2:0},function(n){return 1===n||11===n?0:2===n||12===n?1:n>2&&n<20?2:3},function(n){return 1===n?0:0===n||n%100>0&&n%100<20?1:2},function(n){return n%10==1&&n%100!=11?0:n%10>=2&&(n%100<10||n%100>=20)?2:1},function(n){return n%10==1&&n%100!=11?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2},function(n){return 1===n?0:n>=2&&n<=4?1:2},function(n){return 1===n?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2},function(n){return n%100==1?0:n%100==2?1:n%100==3||n%100==4?2:3},function(n){return 1===n?0:2===n?1:n>2&&n<7?2:n>6&&n<11?3:4},function(n){return 1===n?0:2===n?1:n%100>=3&&n%100<=10?2:n%100>=11?3:0!==n?4:5},function(n){return 1===n?0:0===n||n%100>0&&n%100<11?1:n%100>10&&n%100<20?2:3},function(n){return n%10==1?0:n%10==2?1:2},function(n){return n%10==1&&n%100!=11?0:1},function(n){return n%10==1&&n%100!=11&&n%100!=71&&n%100!=91?0:n%10==2&&n%100!=12&&n%100!=72&&n%100!=92?1:n%10!=3&&n%10!=4&&n%10!=9||n%100==13||n%100==73||n%100==93||n%100==14||n%100==74||n%100==94||n%100==19||n%100==79||n%100==99?0!==n&&n%1e6==0?3:4:2},function(n){return 0!==n?1:0},function(n){return 1===n?1:2===n?2:3===n?3:6===n?4:0!==n?5:0},function(n){return 1===n?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2},function(n){return 1===n?0:2===n?1:3===n?2:3},function(n){return n%10==1&&n%100!=11?0:n%10>=2&&n%10<=4&&(n%100<10||n%100>=20)?1:2},function(n){return 0===n?0:1===n?1:2}],r={ach:2,af:1,ak:2,am:2,an:1,anp:1,ar:12,arn:2,as:1,ast:1,ay:0,az:1,be:7,bg:1,bn:1,bo:0,br:2,brx:1,bs:7,ca:1,cgg:0,cs:8,csb:19,cy:18,da:1,de:1,doi:1,dz:0,el:1,en:1,eo:1,es:1,"es-ar":1,et:1,eu:1,fa:2,ff:1,fi:1,fil:2,fo:1,fr:2,fur:1,fy:1,ga:11,gd:4,gl:1,gu:1,gun:2,ha:1,he:1,hi:1,hne:1,hr:7,hu:1,hy:1,ia:1,id:0,is:15,it:1,ja:0,jbo:0,jv:17,ka:0,kk:1,kl:1,km:0,kn:1,ko:0,ku:1,kw:20,ky:1,lb:1,ln:2,lo:0,lt:6,lv:3,mai:1,me:21,mfe:2,mg:2,mi:2,mk:15,ml:1,mn:1,mni:1,mnk:22,mr:1,ms:0,mt:13,my:0,nah:1,nap:1,nb:1,ne:1,nl:1,nn:1,no:1,nso:1,oc:2,or:1,pa:1,pap:1,pl:9,pms:1,ps:1,pt:1,"pt-br":2,rm:1,ro:5,ru:7,rw:1,sah:0,sat:1,sco:1,sd:1,se:1,si:1,sk:8,sl:10,so:1,son:1,sq:1,sr:7,su:0,sv:1,sw:1,ta:1,te:1,tg:2,th:0,ti:2,tk:1,tr:2,tt:0,ug:0,uk:7,ur:1,uz:2,vi:0,wa:2,wo:0,yo:1,"zh-cn":0,"zh-tw":2},o=[["other"],["one","other"],["one","other"],["zero","one","other"],["one","two","few","other"],["one","few","other"],["one","few","other"],["one","few","other"],["one","few","other"],["one","few","other"],["one","two","few","other"],["one","two","few","many","other"],["one","two","few","many","other","zero"],["one","few","many","other"],["one","few","other"],["one","other"],["one","two","few","many","other"],["zero","other"],["zero","one","two","few","many","other"],["one","few","other"],["one","two","few","other"],["one","few","other"],["zero","one","other"]];function t(n){n=function(n){return n.toLowerCase().replace("_","-")}(n);var e=r[n];if(void 0===e){var o=function(n){var e=n.indexOf("-");return e>0?n.substr(0,e):n}(n);e=r[o]}if(void 0===e)throw new Error('Unrecognized locale: "'+n+'".');return e}function u(n,e){var r=o[e];return function(e){return r[n(e)]}}function a(n){var r=t(n);return e[r]}function i(n){var r=e[n];if(void 0===r)throw new Error('Invalid index: "'+n+'".');return r}function f(n){var r=t(n);return u(e[r],r)}function l(n){if(void 0===e[n])throw new Error('Invalid index: "'+n+'".');return u(e[n],n)}n.getPluralFormForCardinalByIndex=function(n,e){return i(n)(e)},n.getPluralFormForCardinalByLocale=function(n,e){return a(n)(e)},n.getPluralFormNameForCardinalByIndex=function(n,e){return l(n)(e)},n.getPluralFormNameForCardinalByLocale=function(n,e){return f(n)(e)},n.getPluralRuleForCardinalsByIndex=i,n.getPluralRuleForCardinalsByLocale=a,n.getPluralRuleForNamedFormsForCardinalsByIndex=l,n.getPluralRuleForNamedFormsForCardinalsByLocale=f,Object.defineProperty(n,"__esModule",{value:!0})})); | ||
//# sourceMappingURL=index.umd.min.js.map |
{ | ||
"name": "fast-plural-rules", | ||
"version": "1.0.1", | ||
"version": "1.0.2", | ||
"description": "Evaluates locale-specific plural rules to identify the right plural form for a cardinal number, which represents an item count.", | ||
@@ -39,3 +39,3 @@ "author": { | ||
"lint:js": "standard --verbose", | ||
"lint:ts": "tslint -t stylish src/*.ts test/*.ts", | ||
"lint:ts": "eslint -c .eslintrc.ts.yml src/*.ts test/*.ts", | ||
"generate:plural-rule-definitions": "node util/generate-plural-rule-definitions", | ||
@@ -50,4 +50,4 @@ "generate:browser-tests": "node util/generate-browser-tests", | ||
"benchmark": "node perf", | ||
"coverage": "test `node --version | cut -c 2,3` -eq 10 && cat coverage/lcov.info | coveralls", | ||
"test": "run-s compile:tests generate:plural-rule-definitions check generate:browser-tests check:browser" | ||
"test": "run-s compile:tests generate:plural-rule-definitions check generate:browser-tests check:browser", | ||
"start": "python -m SimpleHTTPServer" | ||
}, | ||
@@ -87,37 +87,39 @@ "standard": { | ||
"devDependencies": { | ||
"@babel/core": "7.6.2", | ||
"@babel/preset-env": "7.6.2", | ||
"@babel/core": "7.16.12", | ||
"@babel/preset-env": "7.16.11", | ||
"@rollup/plugin-babel": "5.3.0", | ||
"@semantic-release/changelog": "6.0.1", | ||
"@semantic-release/git": "10.0.1", | ||
"@typescript-eslint/eslint-plugin": "5.10.1", | ||
"@typescript-eslint/parser": "5.10.1", | ||
"babel-core": "7.0.0-bridge.0", | ||
"babel-jest": "24.9.0", | ||
"babel-jest": "27.4.6", | ||
"benchmark": "2.1.4", | ||
"cldr-data": "35.1.0", | ||
"cldrpluralruleparser": "1.3.2", | ||
"cldr-data": "36.0.0", | ||
"cldrpluralruleparser": "1.4.0", | ||
"connect": "3.7.0", | ||
"coveralls": "3.0.6", | ||
"cpy-cli": "2.0.0", | ||
"es6-promisify": "6.0.2", | ||
"eslint-config-standard": "14.1.0", | ||
"eslint-plugin-import": "2.18.2", | ||
"eslint-plugin-node": "10.0.0", | ||
"eslint-plugin-promise": "4.2.1", | ||
"eslint-plugin-standard": "4.0.1", | ||
"fast-glob": "3.0.4", | ||
"fs-extra": "8.1.0", | ||
"jasmine-core": "3.5.0", | ||
"jest": "24.9.0", | ||
"cpy-cli": "3.1.1", | ||
"es6-promisify": "7.0.0", | ||
"eslint": "8.7.0", | ||
"eslint-config-standard": "16.0.3", | ||
"eslint-plugin-import": "2.25.4", | ||
"eslint-plugin-node": "11.1.0", | ||
"eslint-plugin-promise": "6.0.0", | ||
"eslint-plugin-standard": "4.1.0", | ||
"fast-glob": "3.2.11", | ||
"fs-extra": "10.0.0", | ||
"jasmine-core": "^4.0.0", | ||
"jest": "27.4.7", | ||
"jest-expect-message": "1.0.2", | ||
"npm-run-all": "4.1.5", | ||
"plural-rules": "1.0.0", | ||
"puppeteer": "1.20.0", | ||
"regenerator-runtime": "0.13.3", | ||
"rimraf": "3.0.0", | ||
"rollup": "1.21.4", | ||
"rollup-plugin-babel": "4.3.3", | ||
"rollup-plugin-cleanup": "3.1.1", | ||
"rollup-plugin-uglify": "6.0.3", | ||
"serve-static": "1.14.1", | ||
"standard": "14.3.1", | ||
"tslint": "5.20.0", | ||
"tslint-config-standard": "8.0.1", | ||
"typescript": "3.6.3" | ||
"plural-rules": "1.0.1", | ||
"puppeteer": "13.1.2", | ||
"regenerator-runtime": "0.13.9", | ||
"rimraf": "3.0.2", | ||
"rollup": "2.66.1", | ||
"rollup-plugin-cleanup": "3.2.1", | ||
"rollup-plugin-terser": "^7.0.2", | ||
"serve-static": "1.14.2", | ||
"standard": "16.0.4", | ||
"typescript": "4.5.5" | ||
}, | ||
@@ -124,0 +126,0 @@ "keywords": [ |
# Fast Plural Rules | ||
[](http://badge.fury.io/js/fast-plural-rules) | ||
[](https://travis-ci.org/prantlf/fast-plural-rules) | ||
[](https://coveralls.io/github/prantlf/fast-plural-rules?branch=master) | ||
[](https://www.codacy.com/app/prantlf/fast-plural-rules?utm_source=github.com&utm_medium=referral&utm_content=prantlf/fast-plural-rules&utm_campaign=Badge_Grade) | ||
[](https://david-dm.org/prantlf/fast-plural-rules) | ||
[](https://david-dm.org/prantlf/fast-plural-rules#info=devDependencies) | ||
[](https://standardjs.com) | ||
[](https://www.npmjs.com/package/fast-plural-rules) | ||
[ | ||
 | ||
](https://www.npmjs.com/package/fast-plural-rules) | ||
[](https://codecov.io/gh/prantlf/fast-plural-rules) | ||
@@ -134,3 +130,3 @@ Evaluates locale-specific plural rules to identify the right plural form for a cardinal number, which represents an item count. Internationalization libraries can utilize it to choose the right localized string. | ||
Copyright (c) 2018-2019 Ferdinand Prantl | ||
Copyright (c) 2018-2022 Ferdinand Prantl | ||
@@ -137,0 +133,0 @@ Licensed under the MIT license. |
@@ -123,3 +123,4 @@ // See the plural rules at https://developer.mozilla.org/en-US/docs/Mozilla/Localization/Localization_and_Plurals#List_of_Plural_Rules | ||
// 54, 55, 56, 57, 58, 59, 62, 63, 64, 65, 66, 67, 68, 69, 72, 73, ... | ||
n => n % 10 === 1 && n % 100 !== 11 ? 0 | ||
n => n % 10 === 1 && n % 100 !== 11 | ||
? 0 | ||
: n % 10 >= 2 && (n % 100 < 10 || n % 100 >= 20) ? 2 : 1, | ||
@@ -143,3 +144,4 @@ | ||
// 113, ..., 212, 213, ... | ||
n => n % 10 === 1 && n % 100 !== 11 ? 0 | ||
n => n % 10 === 1 && n % 100 !== 11 | ||
? 0 | ||
: n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2, | ||
@@ -170,3 +172,4 @@ | ||
// 47, 48, 49, 50, 51, 55, 56, 57, 58, 59, 60, 61, 65, 66, 67, 68, ... | ||
n => n === 1 ? 0 | ||
n => n === 1 | ||
? 0 | ||
: n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2, | ||
@@ -213,4 +216,9 @@ | ||
// is 0: 0 | ||
n => n === 1 ? 0 : n === 2 ? 1 : n % 100 >= 3 && n % 100 <= 10 ? 2 | ||
: n % 100 >= 11 ? 3 : n !== 0 ? 4 : 5, | ||
n => n === 1 | ||
? 0 | ||
: n === 2 | ||
? 1 | ||
: n % 100 >= 3 && n % 100 <= 10 | ||
? 2 | ||
: n % 100 >= 11 ? 3 : n !== 0 ? 4 : 5, | ||
@@ -230,4 +238,7 @@ // Plural rule #13 (4 forms) | ||
// 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, ... | ||
n => n === 1 ? 0 : n === 0 || (n % 100 > 0 && n % 100 < 11) ? 1 | ||
: n % 100 > 10 && n % 100 < 20 ? 2 : 3, | ||
n => n === 1 | ||
? 0 | ||
: n === 0 || (n % 100 > 0 && n % 100 < 11) | ||
? 1 | ||
: n % 100 > 10 && n % 100 < 20 ? 2 : 3, | ||
@@ -273,10 +284,14 @@ // Plural rule #14 (3 forms) | ||
// 20, 25, 26, 27, 28, 30, 35, 36, 37, 38, 40, ... | ||
n => n % 10 === 1 && n % 100 !== 11 && n % 100 !== 71 && n % 100 !== 91 ? 0 | ||
: n % 10 === 2 && n % 100 !== 12 && n % 100 !== 72 && n % 100 !== 92 ? 1 | ||
n => n % 10 === 1 && n % 100 !== 11 && n % 100 !== 71 && n % 100 !== 91 | ||
? 0 | ||
: n % 10 === 2 && n % 100 !== 12 && n % 100 !== 72 && n % 100 !== 92 | ||
? 1 | ||
: (n % 10 === 3 || n % 10 === 4 || n % 10 === 9) && | ||
n % 100 !== 13 && n % 100 !== 73 && n % 100 !== 93 && | ||
n % 100 !== 14 && n % 100 !== 74 && n % 100 !== 94 && | ||
n % 100 !== 19 && n % 100 !== 79 && n % 100 !== 99 ? 2 | ||
: n !== 0 && n % 1000000 === 0 ? 3 | ||
: 4, | ||
n % 100 !== 19 && n % 100 !== 79 && n % 100 !== 99 | ||
? 2 | ||
: n !== 0 && n % 1000000 === 0 | ||
? 3 | ||
: 4, | ||
@@ -319,3 +334,4 @@ // Plural rule #17 (2 forms) | ||
// 71, 75, 76, 77, ..., 111, 115, ..., 211, 215, ... | ||
n => n === 1 ? 0 | ||
n => n === 1 | ||
? 0 | ||
: n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2, | ||
@@ -348,3 +364,4 @@ | ||
// 113, ..., 212, 213, ... | ||
n => n % 10 === 1 && n % 100 !== 11 ? 0 | ||
n => n % 10 === 1 && n % 100 !== 11 | ||
? 0 | ||
: n % 10 >= 2 && n % 10 <= 4 && (n % 100 < 10 || n % 100 >= 20) ? 1 : 2, | ||
@@ -351,0 +368,0 @@ |
@@ -0,1 +1,3 @@ | ||
declare type getPluralFormForCardinal = (count: number) => number | ||
declare function getPluralFormForCardinalByLocale (locale: string, count: number): number | ||
@@ -7,7 +9,7 @@ declare function getPluralFormNameForCardinalByLocale (locale: string, count: number): string | ||
declare function getPluralRuleForCardinalsByLocale (locale: string): Function | ||
declare function getPluralRuleForNamedFormsForCardinalsByLocale (locale: string): Function | ||
declare function getPluralRuleForCardinalsByLocale (locale: string): getPluralFormForCardinal | ||
declare function getPluralRuleForNamedFormsForCardinalsByLocale (locale: string): getPluralFormForCardinal | ||
declare function getPluralRuleForCardinalsByIndex (index: number): Function | ||
declare function getPluralRuleForNamedFormsForCardinalsByIndex (index: number): Function | ||
declare function getPluralRuleForCardinalsByIndex (index: number): getPluralFormForCardinal | ||
declare function getPluralRuleForNamedFormsForCardinalsByIndex (index: number): getPluralFormForCardinal | ||
@@ -18,5 +20,6 @@ export { | ||
getPluralFormForCardinalByIndex, getPluralRuleForCardinalsByIndex, | ||
getPluralFormNameForCardinalByIndex, getPluralRuleForNamedFormsForCardinalsByIndex | ||
getPluralFormNameForCardinalByIndex, getPluralRuleForNamedFormsForCardinalsByIndex, | ||
getPluralFormForCardinal | ||
} | ||
export as namespace fastPluralRules |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
131724
0.08%1240
1.72%37
5.71%146
-2.67%