@beauraines/node-helpers 4.1.0 → 4.1.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/CHANGELOG.md +2 -0
- package/package.json +1 -1
- package/src/helpers.js +3 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
|
|
4
4
|
|
|
5
|
+
### [4.1.1](https://github.com/beauraines/node-helpers/compare/v4.1.0...v4.1.1) (2024-10-05)
|
|
6
|
+
|
|
5
7
|
## [4.1.0](https://github.com/beauraines/node-helpers/compare/v4.0.39...v4.1.0) (2024-10-05)
|
|
6
8
|
|
|
7
9
|
|
package/package.json
CHANGED
package/src/helpers.js
CHANGED
|
@@ -106,6 +106,7 @@ function getEpochMillis() {
|
|
|
106
106
|
return Date.now()
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
+
|
|
109
110
|
// TODO Add unit test
|
|
110
111
|
// Expected output last 30 days [1,5] ▁▂▄▆█ 5 from [1,2,3,4,5]
|
|
111
112
|
/**
|
|
@@ -129,6 +130,8 @@ function sparkline(data,label,options) {
|
|
|
129
130
|
// coerces the minimum value to zero because the mimimum option is only used for range validation,
|
|
130
131
|
// not display https://github.com/sindresorhus/sparkly/blob/9e33eaff891c41e8fb8c8883f62e9821729a9882/index.js#L15
|
|
131
132
|
// sparkly(open,{minimum:27,maximum:50})
|
|
133
|
+
|
|
134
|
+
// TODO add option to not display labels issue #148
|
|
132
135
|
return `${label} [${minValue},${maxValue}] ${sparkly(data.map( x=> x- minValue))} ${lastValue}`
|
|
133
136
|
}
|
|
134
137
|
|