Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@phensley/plurals

Package Overview
Dependencies
Maintainers
1
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@phensley/plurals - npm Package Compare versions

Comparing version 1.0.6 to 1.0.7

4

lib-es/operands.d.ts
import { Decimal } from '@phensley/decimal';
/**
* Returns the number of digits in w, where w < RADIX.
*/
export declare const digitCount: (w: number) => number;
export declare type Operand = 'n' | 'i' | 'v' | 'w' | 'f' | 't';

@@ -3,0 +7,0 @@ /**

2

lib-es/operands.js
/**
* Returns the number of digits in w, where w < RADIX.
*/
var digitCount = function (w) {
export var digitCount = function (w) {
if (w < 10000 /* P4 */) {

@@ -6,0 +6,0 @@ if (w < 100 /* P2 */) {

@@ -8,3 +8,2 @@ import { coerceDecimal } from '@phensley/decimal';

};
var FLAG_OTHER = (5 << 5) + 5;
/**

@@ -39,3 +38,3 @@ * Set of all cardinal and ordinal plural rules, and the array of expression

var cat = this.ranges[((1 << s) << 5) + (1 << e)];
return CATEGORIES[cat || this.ranges[FLAG_OTHER]];
return CATEGORIES[cat] || 'other';
};

@@ -42,0 +41,0 @@ PluralRules.prototype.evaluate = function (operands, rules) {

import { Decimal } from '@phensley/decimal';
/**
* Returns the number of digits in w, where w < RADIX.
*/
export declare const digitCount: (w: number) => number;
export declare type Operand = 'n' | 'i' | 'v' | 'w' | 'f' | 't';

@@ -3,0 +7,0 @@ /**

@@ -6,3 +6,3 @@ "use strict";

*/
var digitCount = function (w) {
exports.digitCount = function (w) {
if (w < 10000 /* P4 */) {

@@ -69,3 +69,3 @@ if (w < 100 /* P2 */) {

// const dec = exp < 0;
var precision = (last * 7 /* RDIGITS */) + digitCount(data[last]);
var precision = (last * 7 /* RDIGITS */) + exports.digitCount(data[last]);
// Local operands

@@ -92,3 +92,3 @@ var n = 0;

var r = data[x];
var c = x !== last ? 7 /* RDIGITS */ : digitCount(r);
var c = x !== last ? 7 /* RDIGITS */ : exports.digitCount(r);
y = c - 1;

@@ -95,0 +95,0 @@ // Scan each decimal digit of the radix number from

@@ -10,3 +10,2 @@ "use strict";

};
var FLAG_OTHER = (5 << 5) + 5;
/**

@@ -41,3 +40,3 @@ * Set of all cardinal and ordinal plural rules, and the array of expression

var cat = this.ranges[((1 << s) << 5) + (1 << e)];
return CATEGORIES[cat || this.ranges[FLAG_OTHER]];
return CATEGORIES[cat] || 'other';
};

@@ -44,0 +43,0 @@ PluralRules.prototype.evaluate = function (operands, rules) {

{
"name": "@phensley/plurals",
"version": "1.0.6",
"version": "1.0.7",
"description": "Plural rules engine",

@@ -39,3 +39,3 @@ "main": "lib/index.js",

"dependencies": {
"@phensley/decimal": "1.0.6",
"@phensley/decimal": "1.0.7",
"tslib": "1.11.1"

@@ -70,3 +70,3 @@ },

},
"gitHead": "f2bf68a4be985fd349a9080b734e33fe3f19d949"
"gitHead": "f411d4925d2d57589ef2cd9f1c13ef6871224bc3"
}

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