express-sweet 1.0.29 → 1.0.31
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 +42 -15
- package/dist/build.common.js +3 -3
- package/dist/build.esm.js +6 -6
- package/docs/index.html +106 -27
- package/package.json +2 -3
- package/types/handlebars_helpers/comparison.d.ts +8 -8
- package/types/handlebars_helpers/date.d.ts +4 -4
- package/types/handlebars_helpers/html.d.ts +3 -3
- package/types/handlebars_helpers/index.d.ts +2 -1
- package/types/handlebars_helpers/number.d.ts +16 -0
- package/types/handlebars_helpers/object.d.ts +4 -4
- package/types/handlebars_helpers/string.d.ts +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,31 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
|
3
3
|
|
|
4
|
+
## [1.0.31] - 2023/6/29
|
|
5
|
+
### Changed
|
|
6
|
+
- Changed helper function names in the view (Handlebars) from SnakeCase to CamelCase.
|
|
7
|
+
|After|Before|Description|
|
|
8
|
+
|--|--|--|
|
|
9
|
+
|notEmpty|not_empty|Check that it is not empty.|
|
|
10
|
+
|formatDate|format_date|Use moment to format the date.|
|
|
11
|
+
|cacheBusting|cache_busting|Returns the Assets path containing the file update time parameter.|
|
|
12
|
+
|jsonStringify|json_stringify|Stringify an object using JSON.stringify.|
|
|
13
|
+
|jsonParse|json_parse|Parses the given string using JSON.parse.|
|
|
14
|
+
|formatBytes|format_bytes|Convert bytes to just the right units(KB, MB, GB, TB, PB, EB, ZB, YB).|
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
- Added view helper to convert numeric values to strings with language-sensitive representations.
|
|
18
|
+
```html
|
|
19
|
+
{{number2locale 123456.789}} => 123,456.789
|
|
20
|
+
|
|
21
|
+
{{!-- German uses comma as decimal separator and period for thousands. --}}
|
|
22
|
+
{{number2locale 123456.789 'de-DE'}} => 123.456,789
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## [1.0.30] - 2023/6/26
|
|
26
|
+
### Changed
|
|
27
|
+
- Fixed AWS Rekognition credentials passing.
|
|
28
|
+
|
|
4
29
|
## [1.0.29] - 2023/6/20
|
|
5
30
|
### Changed
|
|
6
31
|
- Changed class private variables and methods from soft private to hard private.
|
|
@@ -96,12 +121,12 @@ All notable changes to this project will be documented in this file.
|
|
|
96
121
|
|
|
97
122
|
## [1.0.25] - 2022/11/24
|
|
98
123
|
### Added
|
|
99
|
-
- Added
|
|
124
|
+
- Added formatBytes view helper to convert bytes to appropriate units.
|
|
100
125
|
```html
|
|
101
|
-
{{
|
|
102
|
-
{{
|
|
103
|
-
{{
|
|
104
|
-
{{
|
|
126
|
+
{{formatBytes 1024}} => 1 KB
|
|
127
|
+
{{formatBytes 1234 2}} => 1.21 KB
|
|
128
|
+
{{formatBytes 1234 3}} => 1.205 KB
|
|
129
|
+
{{formatBytes 0}} => 0 Bytes
|
|
105
130
|
```
|
|
106
131
|
|
|
107
132
|
## [1.0.24] - 2022/10/24
|
|
@@ -288,9 +313,9 @@ All notable changes to this project will be documented in this file.
|
|
|
288
313
|
### Added
|
|
289
314
|
- Add date format helper to view.
|
|
290
315
|
```html
|
|
291
|
-
{{
|
|
292
|
-
{{
|
|
293
|
-
{{
|
|
316
|
+
{{formatDate 'YYYY/MM/DD' "2021-10-24T02:13:06.610Z"}} => 2021/10/24
|
|
317
|
+
{{formatDate 'YYYY/MM/DD' "2021-10-24T02:13:06.610Z" 'jp'}} => 2021/10/24
|
|
318
|
+
{{formatDate 'YYYY/MM/DD' "2021-10-24T02:13:06.610Z" 'es'}} => 2021/10/24
|
|
294
319
|
```
|
|
295
320
|
|
|
296
321
|
## [1.0.18] - 2022/5/18
|
|
@@ -352,25 +377,25 @@ All notable changes to this project will be documented in this file.
|
|
|
352
377
|
{{empty value}} => true
|
|
353
378
|
```
|
|
354
379
|
|
|
355
|
-
- Added
|
|
380
|
+
- Added notEmpty view helper.
|
|
356
381
|
```html
|
|
357
382
|
// If the value is an array.
|
|
358
383
|
let value = [5, 6];
|
|
359
|
-
{{
|
|
384
|
+
{{notEmpty value}} => true
|
|
360
385
|
|
|
361
|
-
{{#if (
|
|
386
|
+
{{#if (notEmpty value)}}
|
|
362
387
|
Hello
|
|
363
388
|
{{/if}}
|
|
364
389
|
|
|
365
390
|
// If the value is a string.
|
|
366
391
|
let value = 'Hello';
|
|
367
|
-
{{
|
|
392
|
+
{{notEmpty value}} => true
|
|
368
393
|
|
|
369
394
|
let value = '';
|
|
370
|
-
{{
|
|
395
|
+
{{notEmpty value}} => false
|
|
371
396
|
|
|
372
397
|
let value = ' ';
|
|
373
|
-
{{
|
|
398
|
+
{{notEmpty value}} => false
|
|
374
399
|
```
|
|
375
400
|
|
|
376
401
|
## [1.0.13] - 2021/12/13
|
|
@@ -517,4 +542,6 @@ All notable changes to this project will be documented in this file.
|
|
|
517
542
|
[1.0.26]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.25...v1.0.26
|
|
518
543
|
[1.0.27]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.26...v1.0.27
|
|
519
544
|
[1.0.28]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.27...v1.0.28
|
|
520
|
-
[1.0.29]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.28...v1.0.29
|
|
545
|
+
[1.0.29]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.28...v1.0.29
|
|
546
|
+
[1.0.30]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.29...v1.0.30
|
|
547
|
+
[1.0.31]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.30...v1.0.31
|