tripstorekrabi-shared 1.12.4 → 1.12.6

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/utils.js +5 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "tripstorekrabi-shared",
3
- "version": "1.12.4",
3
+ "version": "1.12.6",
4
4
  "description": "Shared library for Trip Store Krabi",
5
5
  "author": "Stefan Sommer <tonprince@gmail.com>",
6
6
  "repository": {
package/utils.js CHANGED
@@ -43,6 +43,7 @@ export function createPdfPreview(path, size) {
43
43
  export function formatNumber(number, fraction = 2) {
44
44
  return number.toLocaleString("th-TH", {
45
45
  minimumFractionDigits: fraction,
46
+ maximumFractionDigits: fraction
46
47
  });
47
48
  }
48
49
 
@@ -209,6 +210,10 @@ export function capitalize(string) {
209
210
  return string.charAt(0).toUpperCase() + string.slice(1).toLowerCase();
210
211
  }
211
212
 
213
+ export function uncapitalizeFirstLetter(string) {
214
+ return string.charAt(0).toLowerCase() + string.slice(1);
215
+ }
216
+
212
217
  export function transformToNCols(array, n) {
213
218
  let converted = [];
214
219
  let chunks = chunkArray(array, Math.ceil(array.length / n));