@canutin/svelte-currency-input 0.0.1 → 0.0.2
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 +16 -23
- package/package.json +3 -4
package/README.md
CHANGED
|
@@ -1,22 +1,27 @@
|
|
|
1
|
-
#
|
|
1
|
+
# svelte-currency-input
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A field input that formats numbers as currencies as you type
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
<img width="1059" alt="image" src="https://user-images.githubusercontent.com/1434675/190315136-c1d310ab-0ef1-441d-a80c-2b3727d74f59.png">
|
|
6
6
|
|
|
7
|
-
If you're seeing this, you've probably already done this step. Congrats!
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
8
|
+
## Features
|
|
9
|
+
|
|
10
|
+
- Format **positive** and **negative** value
|
|
11
|
+
- Leverages `Intl.NumberFormat` for **localizing** string formatting and currency denominations.
|
|
12
|
+
- Easy to customize/theme
|
|
12
13
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
14
|
+
|
|
15
|
+
## Contributing
|
|
16
|
+
|
|
17
|
+
Here's ways in which you can contribute:
|
|
18
|
+
- Found a bug? Open a [new issue](https://github.com/Canutin/svelte-currency-input/issues/new)
|
|
19
|
+
- Help us complete our [existing issues](https://github.com/Canutin/svelte-currency-input/issues)
|
|
20
|
+
- Submit a [pull request](https://github.com/Canutin/svelte-currency-input/pulls)
|
|
16
21
|
|
|
17
22
|
## Developing
|
|
18
23
|
|
|
19
|
-
|
|
24
|
+
Install dependencies with `npm install`, start a development server:
|
|
20
25
|
|
|
21
26
|
```bash
|
|
22
27
|
npm run dev
|
|
@@ -24,15 +29,3 @@ npm run dev
|
|
|
24
29
|
# or start the server and open the app in a new browser tab
|
|
25
30
|
npm run dev -- --open
|
|
26
31
|
```
|
|
27
|
-
|
|
28
|
-
## Building
|
|
29
|
-
|
|
30
|
-
To create a production version of your app:
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
npm run build
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
You can preview the production build with `npm run preview`.
|
|
37
|
-
|
|
38
|
-
> To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment.
|
package/package.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@canutin/svelte-currency-input",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"devDependencies": {
|
|
5
5
|
"@playwright/test": "^1.25.0",
|
|
6
6
|
"@sveltejs/adapter-auto": "next",
|
|
7
7
|
"@sveltejs/kit": "next",
|
|
8
|
-
"@sveltejs/package": "
|
|
8
|
+
"@sveltejs/package": "next",
|
|
9
9
|
"@typescript-eslint/eslint-plugin": "^5.27.0",
|
|
10
10
|
"@typescript-eslint/parser": "^5.27.0",
|
|
11
11
|
"eslint": "^8.16.0",
|
|
@@ -22,8 +22,7 @@
|
|
|
22
22
|
"vite": "^3.1.0"
|
|
23
23
|
},
|
|
24
24
|
"type": "module",
|
|
25
|
-
"description": "
|
|
26
|
-
"main": "svelte.config.js",
|
|
25
|
+
"description": "An input field that formats numbers to currency as you type",
|
|
27
26
|
"dependencies": {
|
|
28
27
|
"acorn": "^8.8.0",
|
|
29
28
|
"abbrev": "^1.1.1",
|