@jsenv/humanize 1.3.0 → 1.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -209,11 +209,11 @@ const groupDigits = (digits, {
209
209
  if (digitCount < minimumDigits) {
210
210
  return digits;
211
211
  }
212
- let digitsWithSeparator = digits.slice(-groupLength);
213
- let remainingDigits = digits.slice(0, -groupLength);
212
+ let digitsWithSeparator = digits.slice(-3);
213
+ let remainingDigits = digits.slice(0, -3);
214
214
  while (remainingDigits.length) {
215
- const group = remainingDigits.slice(-groupLength);
216
- remainingDigits = remainingDigits.slice(0, -groupLength);
215
+ const group = remainingDigits.slice(-3);
216
+ remainingDigits = remainingDigits.slice(0, -3);
217
217
  digitsWithSeparator = "".concat(group, "_").concat(digitsWithSeparator);
218
218
  }
219
219
  return digitsWithSeparator;
@@ -227,11 +227,11 @@ const groupDigits = (digits, { minimumDigits, groupLength }) => {
227
227
  return digits;
228
228
  }
229
229
 
230
- let digitsWithSeparator = digits.slice(-groupLength);
231
- let remainingDigits = digits.slice(0, -groupLength);
230
+ let digitsWithSeparator = digits.slice(-3);
231
+ let remainingDigits = digits.slice(0, -3);
232
232
  while (remainingDigits.length) {
233
- const group = remainingDigits.slice(-groupLength);
234
- remainingDigits = remainingDigits.slice(0, -groupLength);
233
+ const group = remainingDigits.slice(-3);
234
+ remainingDigits = remainingDigits.slice(0, -3);
235
235
  digitsWithSeparator = `${group}_${digitsWithSeparator}`;
236
236
  }
237
237
  return digitsWithSeparator;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jsenv/humanize",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Generate messages meant to read by humans",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -32,6 +32,7 @@
32
32
  "/dist/",
33
33
  "/src/"
34
34
  ],
35
+ "sideEffects": false,
35
36
  "scripts": {
36
37
  "build": "node ./scripts/build.mjs",
37
38
  "prepublishOnly": "npm run build"