express-sweet 1.0.30 → 1.0.32

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 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.32] - 2023/7/1
5
+ ### Fixed
6
+ - Fixed a bug that cookies (req.cookies) cannot be referenced in the hook function before view rendering (config/view.js#beforeRender).
7
+
8
+ ## [1.0.31] - 2023/6/29
9
+ ### Changed
10
+ - Changed helper function names in the view (Handlebars) from SnakeCase to CamelCase.
11
+ |After|Before|Description|
12
+ |--|--|--|
13
+ |notEmpty|not_empty|Check that it is not empty.|
14
+ |formatDate|format_date|Use moment to format the date.|
15
+ |cacheBusting|cache_busting|Returns the Assets path containing the file update time parameter.|
16
+ |jsonStringify|json_stringify|Stringify an object using JSON.stringify.|
17
+ |jsonParse|json_parse|Parses the given string using JSON.parse.|
18
+ |formatBytes|format_bytes|Convert bytes to just the right units(KB, MB, GB, TB, PB, EB, ZB, YB).|
19
+
20
+ ### Added
21
+ - Added view helper to convert numeric values to strings with language-sensitive representations.
22
+ ```html
23
+ {{number2locale 123456.789}} => 123,456.789
24
+
25
+ {{!-- German uses comma as decimal separator and period for thousands. --}}
26
+ {{number2locale 123456.789 'de-DE'}} => 123.456,789
27
+ ```
28
+
4
29
  ## [1.0.30] - 2023/6/26
5
30
  ### Changed
6
31
  - Fixed AWS Rekognition credentials passing.
@@ -100,12 +125,12 @@ All notable changes to this project will be documented in this file.
100
125
 
101
126
  ## [1.0.25] - 2022/11/24
102
127
  ### Added
103
- - Added format_bytes view helper to convert bytes to appropriate units.
128
+ - Added formatBytes view helper to convert bytes to appropriate units.
104
129
  ```html
105
- {{format_bytes 1024}} => 1 KB
106
- {{format_bytes 1234 2}} => 1.21 KB
107
- {{format_bytes 1234 3}} => 1.205 KB
108
- {{format_bytes 0}} => 0 Bytes
130
+ {{formatBytes 1024}} => 1 KB
131
+ {{formatBytes 1234 2}} => 1.21 KB
132
+ {{formatBytes 1234 3}} => 1.205 KB
133
+ {{formatBytes 0}} => 0 Bytes
109
134
  ```
110
135
 
111
136
  ## [1.0.24] - 2022/10/24
@@ -292,9 +317,9 @@ All notable changes to this project will be documented in this file.
292
317
  ### Added
293
318
  - Add date format helper to view.
294
319
  ```html
295
- {{format_date 'YYYY/MM/DD' "2021-10-24T02:13:06.610Z"}} => 2021/10/24
296
- {{format_date 'YYYY/MM/DD' "2021-10-24T02:13:06.610Z" 'jp'}} => 2021/10/24
297
- {{format_date 'YYYY/MM/DD' "2021-10-24T02:13:06.610Z" 'es'}} => 2021/10/24
320
+ {{formatDate 'YYYY/MM/DD' "2021-10-24T02:13:06.610Z"}} => 2021/10/24
321
+ {{formatDate 'YYYY/MM/DD' "2021-10-24T02:13:06.610Z" 'jp'}} => 2021/10/24
322
+ {{formatDate 'YYYY/MM/DD' "2021-10-24T02:13:06.610Z" 'es'}} => 2021/10/24
298
323
  ```
299
324
 
300
325
  ## [1.0.18] - 2022/5/18
@@ -356,25 +381,25 @@ All notable changes to this project will be documented in this file.
356
381
  {{empty value}} => true
357
382
  ```
358
383
 
359
- - Added not_empty view helper.
384
+ - Added notEmpty view helper.
360
385
  ```html
361
386
  // If the value is an array.
362
387
  let value = [5, 6];
363
- {{not_empty value}} => true
388
+ {{notEmpty value}} => true
364
389
 
365
- {{#if (not_empty value)}}
390
+ {{#if (notEmpty value)}}
366
391
  Hello
367
392
  {{/if}}
368
393
 
369
394
  // If the value is a string.
370
395
  let value = 'Hello';
371
- {{not_empty value}} => true
396
+ {{notEmpty value}} => true
372
397
 
373
398
  let value = '';
374
- {{not_empty value}} => false
399
+ {{notEmpty value}} => false
375
400
 
376
401
  let value = ' ';
377
- {{not_empty value}} => false
402
+ {{notEmpty value}} => false
378
403
  ```
379
404
 
380
405
  ## [1.0.13] - 2021/12/13
@@ -522,4 +547,6 @@ All notable changes to this project will be documented in this file.
522
547
  [1.0.27]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.26...v1.0.27
523
548
  [1.0.28]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.27...v1.0.28
524
549
  [1.0.29]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.28...v1.0.29
525
- [1.0.30]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.29...v1.0.30
550
+ [1.0.30]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.29...v1.0.30
551
+ [1.0.31]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.30...v1.0.31
552
+ [1.0.32]: https://github.com/takuya-motoshima/express-sweet/compare/v1.0.31...v1.0.32