Socket
Socket
Sign inDemoInstall

make-plural

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

make-plural - npm Package Compare versions

Comparing version 7.3.0 to 7.4.0

1

cardinals.d.ts

@@ -19,2 +19,3 @@ export type PluralCategory = "zero" | "one" | "two" | "few" | "many" | "other";

export const bho: (n: number | string) => "one" | "other";
export const blo: (n: number | string) => "zero" | "one" | "other";
export const bm: (n: number | string) => "other";

@@ -21,0 +22,0 @@ export const bn: (n: number | string) => "one" | "other";

@@ -73,2 +73,6 @@ const a = (n) => n == 1 ? 'one' : 'other';

blo: (n) => n == 0 ? 'zero'
: n == 1 ? 'one'
: 'other',
bm: e,

@@ -75,0 +79,0 @@

@@ -31,2 +31,3 @@ const a = {"cardinal":{"one":["1","1.0","1.00","1.000","1.0000"],"other":["0","2","16","100","1000","10000","100000","1000000","0.0","0.9","1.1","1.6","10.0","100.0","1000.0","10000.0","100000.0","1000000.0"]},"ordinal":{"other":["0","15","100","1000","10000","100000","1000000"]}};

bho: b,
blo: {"cardinal":{"zero":["0","0.0","0.00","0.000","0.0000"],"one":["1","1.0","1.00","1.000","1.0000"],"other":["2","16","100","1000","10000","100000","1000000","2.0","2.5","10.0","100.0","1000.0","10000.0","100000.0","1000000.0"]},"ordinal":{"zero":["0"],"one":["1"],"few":["2","6"],"other":["7","19","100","1000","10000","100000","1000000"]}},
bm: e,

@@ -33,0 +34,0 @@ bn: {"cardinal":{"one":["0","1","0.0","1.0","0.00","0.04"],"other":["2","17","100","1000","10000","100000","1000000","1.1","2.6","10.0","100.0","1000.0","10000.0","100000.0","1000000.0"]},"ordinal":{"one":["1","5","7","10"],"two":["2","3"],"few":["4"],"many":["6"],"other":["0","11","25","100","1000","10000","100000","1000000"]}},

@@ -18,2 +18,3 @@ {

"bho": {"cardinal":{"one":["0","1","0.0","1.0","0.00","1.00","0.000","1.000","0.0000","1.0000"],"other":["2","17","100","1000","10000","100000","1000000","0.1","0.9","1.1","1.7","10.0","100.0","1000.0","10000.0","100000.0","1000000.0"]},"ordinal":{}},
"blo": {"cardinal":{"zero":["0","0.0","0.00","0.000","0.0000"],"one":["1","1.0","1.00","1.000","1.0000"],"other":["2","16","100","1000","10000","100000","1000000","2.0","2.5","10.0","100.0","1000.0","10000.0","100000.0","1000000.0"]},"ordinal":{"zero":["0"],"one":["1"],"few":["2","6"],"other":["7","19","100","1000","10000","100000","1000000"]}},
"bm": {"cardinal":{"other":["0","15","100","1000","10000","100000","1000000","0.0","1.0","1.5","10.0","100.0","1000.0","10000.0","100000.0","1000000.0"]},"ordinal":{}},

@@ -20,0 +21,0 @@ "bn": {"cardinal":{"one":["0","1","0.0","1.0","0.00","0.04"],"other":["2","17","100","1000","10000","100000","1000000","1.1","2.6","10.0","100.0","1000.0","10000.0","100000.0","1000000.0"]},"ordinal":{"one":["1","5","7","10"],"two":["2","3"],"few":["4"],"many":["6"],"other":["0","11","25","100","1000","10000","100000","1000000"]}},

@@ -13,2 +13,3 @@ export type PluralCategory = "zero" | "one" | "two" | "few" | "many" | "other";

export const bg: (n: number | string) => "other";
export const blo: (n: number | string) => "zero" | "one" | "few" | "other";
export const bn: (n: number | string) => "one" | "two" | "few" | "many" | "other";

@@ -15,0 +16,0 @@ export const bs: (n: number | string) => "other";

@@ -43,2 +43,10 @@ const a = (n) => 'other';

blo: (n) => {
const s = String(n).split('.'), i = s[0];
return i == 0 ? 'zero'
: i == 1 ? 'one'
: (i == 2 || i == 3 || i == 4 || i == 5 || i == 6) ? 'few'
: 'other';
},
bn: (n) => (n == 1 || n == 5 || n == 7 || n == 8 || n == 9 || n == 10) ? 'one'

@@ -45,0 +53,0 @@ : (n == 2 || n == 3) ? 'two'

2

package.json
{
"name": "make-plural",
"version": "7.3.0",
"version": "7.4.0",
"description": "Unicode CLDR pluralization rules as JavaScript functions",

@@ -5,0 +5,0 @@ "keywords": [

@@ -19,2 +19,3 @@ export type PluralCategory = "zero" | "one" | "two" | "few" | "many" | "other";

export const bho: {cardinal:["one","other"],ordinal:["other"]};
export const blo: {cardinal:["zero","one","other"],ordinal:["zero","one","few","other"]};
export const bm: {cardinal:["other"],ordinal:["other"]};

@@ -21,0 +22,0 @@ export const bn: {cardinal:["one","other"],ordinal:["one","two","few","many","other"]};

@@ -29,2 +29,3 @@ var z = "zero", o = "one", t = "two", f = "few", m = "many", x = "other";

bho: a,
blo: {cardinal:[z,o,x],ordinal:[z,o,f,x]},
bm: c,

@@ -31,0 +32,0 @@ bn: {cardinal:[o,x],ordinal:[o,t,f,m,x]},

@@ -19,2 +19,3 @@ export type PluralCategory = "zero" | "one" | "two" | "few" | "many" | "other";

export const bho: (n: number | string, ord?: boolean) => "one" | "other";
export const blo: (n: number | string, ord?: boolean) => "zero" | "one" | "few" | "other";
export const bm: (n: number | string, ord?: boolean) => "other";

@@ -21,0 +22,0 @@ export const bn: (n: number | string, ord?: boolean) => "one" | "two" | "few" | "many" | "other";

@@ -103,2 +103,13 @@ const a = (n, ord) => {

blo: (n, ord) => {
const s = String(n).split('.'), i = s[0];
if (ord) return i == 0 ? 'zero'
: i == 1 ? 'one'
: (i == 2 || i == 3 || i == 4 || i == 5 || i == 6) ? 'few'
: 'other';
return n == 0 ? 'zero'
: n == 1 ? 'one'
: 'other';
},
bm: e,

@@ -105,0 +116,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc