@aemforms/af-formatters 0.22.22 → 0.22.23
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/README.md +42 -0
- package/package.json +2 -2
package/README.md
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
# Introduction
|
|
2
|
+
|
|
3
|
+
The module contains the apis to format the values in form fields as per CLDR spec
|
|
4
|
+
|
|
5
|
+
* http://www.unicode.org/reports/tr35/tr35-dates.html#Date_Field_Symbol_Table
|
|
6
|
+
* https://www.unicode.org/reports/tr35/tr35-numbers.html#Number_Patterns
|
|
7
|
+
|
|
8
|
+
## Installation
|
|
9
|
+
|
|
10
|
+
Save it as a dependency
|
|
11
|
+
```
|
|
12
|
+
npm i --save @aemforms/af-formatters
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
## Usage
|
|
16
|
+
```
|
|
17
|
+
import {format} from '@aemforms/af-formatters'
|
|
18
|
+
const value = 1234
|
|
19
|
+
format(1234, 'en-US', 'num|currency') //outputs $1,234.00
|
|
20
|
+
|
|
21
|
+
const value = 2022-10-10
|
|
22
|
+
format(1234, 'en-US', 'date|MMM dd, y') //outputs Oct 10, 2022
|
|
23
|
+
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
## License
|
|
28
|
+
|
|
29
|
+
Copyright 2022 Adobe
|
|
30
|
+
All Rights Reserved.
|
|
31
|
+
|
|
32
|
+
NOTICE: All information contained herein is, and remains
|
|
33
|
+
the property of Adobe and its suppliers, if any. The intellectual
|
|
34
|
+
and technical concepts contained herein are proprietary to Adobe
|
|
35
|
+
and its suppliers and are protected by all applicable intellectual
|
|
36
|
+
property laws, including trade secret and copyright laws.
|
|
37
|
+
Dissemination of this information or reproduction of this material
|
|
38
|
+
is strictly forbidden unless prior written permission is obtained
|
|
39
|
+
from Adobe.
|
|
40
|
+
|
|
41
|
+
Adobe permits you to use and modify this file solely in accordance with
|
|
42
|
+
the terms of the Adobe license agreement accompanying it.
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aemforms/af-formatters",
|
|
3
|
-
"version": "0.22.
|
|
4
|
-
"description": "
|
|
3
|
+
"version": "0.22.23",
|
|
4
|
+
"description": "Formatting Module for Forms Runtime",
|
|
5
5
|
"author": "Adobe Systems",
|
|
6
6
|
"license": "Adobe Proprietary",
|
|
7
7
|
"main": "lib/cjs/index.cjs",
|