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.2.0 to 1.2.1

1

lib-es/api.d.ts

@@ -1,2 +0,1 @@

export { NumberOperands } from './operands';
import { PluralRules } from './rules';

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

import { cardinalRules, expressions, ordinalRules } from './autogen.rules';
import { pluralRanges } from './autogen.ranges';
export { NumberOperands } from './operands';
import { PluralRules } from './rules';

@@ -5,0 +4,0 @@ var resolve = function (r, language, region) {

11

lib-es/operands.js

@@ -25,3 +25,3 @@ /**

10000000 /* P7 */,
100000000 /* P8 */
100000000 /* P8 */,
];

@@ -67,3 +67,3 @@ // When a number crosses this limit we reduce it to avoid overflow.

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

@@ -86,5 +86,4 @@ var n = 0;

}
outer:
// Start at most-significant digit to least
while (x >= 0) {
outer: while (x >= 0) {
var r = data[x];

@@ -100,3 +99,3 @@ var c = x !== last ? 7 /* RDIGITS */ : digitCount(r);

// Integer part
n = (n * 10) + q;
n = n * 10 + q;
// If the integer digits exceed the limit we apply modulus.

@@ -118,3 +117,3 @@ if (n > LIMIT) {

}
f = (f * 10) + q;
f = f * 10 + q;
}

@@ -121,0 +120,0 @@ // If the decimal digits exceed our limit we bail out early.

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

var CATEGORIES = ['zero', 'one', 'two', 'few', 'many', 'other'];
var arg = function (n) {
return new NumberOperands(coerceDecimal(n));
};
var arg = function (n) { return new NumberOperands(coerceDecimal(n)); };
/**

@@ -10,0 +8,0 @@ * Set of all cardinal and ordinal plural rules, and the array of expression

@@ -1,2 +0,1 @@

export { NumberOperands } from './operands';
import { PluralRules } from './rules';

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

@@ -5,4 +5,2 @@ "use strict";

var autogen_ranges_1 = require("./autogen.ranges");
var operands_1 = require("./operands");
exports.NumberOperands = operands_1.NumberOperands;
var rules_1 = require("./rules");

@@ -9,0 +7,0 @@ var resolve = function (r, language, region) {

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

10000000 /* P7 */,
100000000 /* P8 */
100000000 /* P8 */,
];

@@ -69,3 +69,3 @@ // When a number crosses this limit we reduce it to avoid overflow.

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

@@ -88,5 +88,4 @@ var n = 0;

}
outer:
// Start at most-significant digit to least
while (x >= 0) {
outer: while (x >= 0) {
var r = data[x];

@@ -102,3 +101,3 @@ var c = x !== last ? 7 /* RDIGITS */ : exports.digitCount(r);

// Integer part
n = (n * 10) + q;
n = n * 10 + q;
// If the integer digits exceed the limit we apply modulus.

@@ -120,3 +119,3 @@ if (n > LIMIT) {

}
f = (f * 10) + q;
f = f * 10 + q;
}

@@ -123,0 +122,0 @@ // If the decimal digits exceed our limit we bail out early.

@@ -7,5 +7,3 @@ "use strict";

var CATEGORIES = ['zero', 'one', 'two', 'few', 'many', 'other'];
var arg = function (n) {
return new operands_1.NumberOperands(decimal_1.coerceDecimal(n));
};
var arg = function (n) { return new operands_1.NumberOperands(decimal_1.coerceDecimal(n)); };
/**

@@ -12,0 +10,0 @@ * Set of all cardinal and ordinal plural rules, and the array of expression

{
"name": "@phensley/plurals",
"version": "1.2.0",
"version": "1.2.1",
"description": "Plural rules engine",

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

"dependencies": {
"@phensley/decimal": "^1.2.0",
"tslib": "^1.11.1"
"@phensley/decimal": "^1.2.1",
"tslib": "^1.13.0"
},
"devDependencies": {
"@microsoft/api-extractor": "^7.7.13",
"@microsoft/api-extractor": "^7.8.0",
"@types/jest": "^25.2.1",
"@types/node": "^13.13.4",
"@typescript-eslint/eslint-plugin": "^2.30.0",
"@typescript-eslint/parser": "^2.30.0",
"@types/node": "^14.0.1",
"@typescript-eslint/eslint-plugin": "^2.33.0",
"@typescript-eslint/parser": "^2.33.0",
"beautify-benchmark": "^0.2.4",
"benchmark": "^2.1.4",
"chalk": "^4.0.0",
"eslint": "^6.8.0",
"eslint": "^7.0.0",
"eslint-config-prettier": "^6.11.0",
"eslint-plugin-prettier": "^3.1.3",
"jest": "^25.4.0",
"jest": "^26.0.1",
"prettier": "^2.0.5",
"rimraf": "^3.0.2",
"ts-jest": "^25.4.0",
"typescript": "^3.8.3"
"ts-jest": "^25.5.1",
"typescript": "~3.8.3"
},

@@ -74,3 +74,3 @@ "jest": {

},
"gitHead": "42b88fa1fa672c12a88dfe4fea152d1eb614e919"
"gitHead": "b4e3308079a0bcb58a666cd94c248ffd452b2486"
}

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

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