@vbarbarosh/node-helpers 3.47.0 → 3.47.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.
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "author": "Vladimir Barbarosh <vladimir.barbarosh@gmail.com>",
3
3
  "license": "MIT",
4
4
  "name": "@vbarbarosh/node-helpers",
5
- "version": "3.47.0",
5
+ "version": "3.47.1",
6
6
  "description": "A set of helpers for JavaScript/Node.js",
7
7
  "files": [
8
8
  "src"
@@ -8,7 +8,7 @@ function format_kilo(num)
8
8
  return '0';
9
9
  }
10
10
  if (num < 1000) {
11
- return num.toString();
11
+ return num.toFixed(0);
12
12
  }
13
13
  const i = parseInt(Math.floor(Math.log(num) / Math.log(1000)), 10);
14
14
  return `${(num / (1000 ** i)).toFixed(2)}${sizes[i]}`;
@@ -7,6 +7,8 @@ const items = [
7
7
  [undefined, 'n/a'],
8
8
  [0, '0'],
9
9
  [1, '1'],
10
+ [55.45, '55'],
11
+ [55.55, '56'],
10
12
  [900, '900'],
11
13
  [1500, '1.50K'],
12
14
  [2000, '2.00K'],
@@ -1,7 +1,7 @@
1
1
  const stream = require('stream');
2
2
 
3
3
  /**
4
- * Pass each item through a user-defined generator, which yields each item as it is passed down
4
+ * Pass each item through a user-defined generator, passes down each yielded item.
5
5
  */
6
6
  function stream_map_flatten(fn)
7
7
  {