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.
- package/package.json +1 -1
- package/utils.js +5 -0
package/package.json
CHANGED
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));
|