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.6.0 to 1.6.1

36

lib-es/operands.js

@@ -5,23 +5,23 @@ /**

export var digitCount = function (w) {
if (w < 10000 /* Constants.P4 */) {
if (w < 100 /* Constants.P2 */) {
return w < 10 /* Constants.P1 */ ? 1 : 2;
if (w < 10000 /* P4 */) {
if (w < 100 /* P2 */) {
return w < 10 /* P1 */ ? 1 : 2;
}
return w < 1000 /* Constants.P3 */ ? 3 : 4;
return w < 1000 /* P3 */ ? 3 : 4;
}
if (w < 1000000 /* Constants.P6 */) {
return w < 100000 /* Constants.P5 */ ? 5 : 6;
if (w < 1000000 /* P6 */) {
return w < 100000 /* P5 */ ? 5 : 6;
}
return w < 10000000 /* Constants.P7 */ ? 7 : 8;
return w < 10000000 /* P7 */ ? 7 : 8;
};
var POWERS10 = [
1 /* Constants.P0 */,
10 /* Constants.P1 */,
100 /* Constants.P2 */,
1000 /* Constants.P3 */,
10000 /* Constants.P4 */,
100000 /* Constants.P5 */,
1000000 /* Constants.P6 */,
10000000 /* Constants.P7 */,
100000000 /* Constants.P8 */,
1 /* P0 */,
10 /* P1 */,
100 /* P2 */,
1000 /* P3 */,
10000 /* P4 */,
100000 /* P5 */,
1000000 /* P6 */,
10000000 /* P7 */,
100000000 /* P8 */,
];

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

var last = len - 1;
var precision = last * 7 /* Constants.RDIGITS */ + digitCount(data[last]);
var precision = last * 7 /* RDIGITS */ + digitCount(data[last]);
// Local operands

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

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

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

@@ -8,24 +8,24 @@ "use strict";

var digitCount = function (w) {
if (w < 10000 /* Constants.P4 */) {
if (w < 100 /* Constants.P2 */) {
return w < 10 /* Constants.P1 */ ? 1 : 2;
if (w < 10000 /* P4 */) {
if (w < 100 /* P2 */) {
return w < 10 /* P1 */ ? 1 : 2;
}
return w < 1000 /* Constants.P3 */ ? 3 : 4;
return w < 1000 /* P3 */ ? 3 : 4;
}
if (w < 1000000 /* Constants.P6 */) {
return w < 100000 /* Constants.P5 */ ? 5 : 6;
if (w < 1000000 /* P6 */) {
return w < 100000 /* P5 */ ? 5 : 6;
}
return w < 10000000 /* Constants.P7 */ ? 7 : 8;
return w < 10000000 /* P7 */ ? 7 : 8;
};
exports.digitCount = digitCount;
var POWERS10 = [
1 /* Constants.P0 */,
10 /* Constants.P1 */,
100 /* Constants.P2 */,
1000 /* Constants.P3 */,
10000 /* Constants.P4 */,
100000 /* Constants.P5 */,
1000000 /* Constants.P6 */,
10000000 /* Constants.P7 */,
100000000 /* Constants.P8 */,
1 /* P0 */,
10 /* P1 */,
100 /* P2 */,
1000 /* P3 */,
10000 /* P4 */,
100000 /* P5 */,
1000000 /* P6 */,
10000000 /* P7 */,
100000000 /* P8 */,
];

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

var last = len - 1;
var precision = last * 7 /* Constants.RDIGITS */ + (0, exports.digitCount)(data[last]);
var precision = last * 7 /* RDIGITS */ + (0, exports.digitCount)(data[last]);
// Local operands

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

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

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

{
"name": "@phensley/plurals",
"version": "1.6.0",
"version": "1.6.1",
"description": "Plural rules engine",

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

"dependencies": {
"@phensley/decimal": "~1.6.0",
"@phensley/decimal": "~1.6.1",
"tslib": "^2.4.0"

@@ -26,0 +26,0 @@ },

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