@samline/formatter 1.0.0 → 1.0.1
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 +3 -3
- package/dist/browser/global.global.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -41,15 +41,15 @@ Requires Node 20+ when bundling. Runtime target is ES2020.
|
|
|
41
41
|
Use the browser build when you do not have a bundler and need to run the package directly in HTML, Shopify, WordPress, or any traditional template.
|
|
42
42
|
|
|
43
43
|
```html
|
|
44
|
-
<script src="https://unpkg.com/@samline/formatter@1.0.
|
|
44
|
+
<script src="https://unpkg.com/@samline/formatter@1.0.1/dist/browser/global.global.js"></script>
|
|
45
45
|
```
|
|
46
46
|
|
|
47
|
-
> Pin the version in production. Replace `1.0.
|
|
47
|
+
> Pin the version in production. Replace `1.0.1` with the version you ship.
|
|
48
48
|
|
|
49
49
|
The browser bundle exposes a single global: `window.Formatter`.
|
|
50
50
|
|
|
51
51
|
```html
|
|
52
|
-
<script src="https://unpkg.com/@samline/formatter@1.0.
|
|
52
|
+
<script src="https://unpkg.com/@samline/formatter@1.0.1/dist/browser/global.global.js"></script>
|
|
53
53
|
<script>
|
|
54
54
|
const result = window.Formatter.format('5512345678', 'phone')
|
|
55
55
|
console.log(result.formatted) // '55 1234 5678'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@samline/formatter",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Lightweight, framework-agnostic input formatter (phone, numeral, date, time, credit card, general) that returns split formatted/raw outputs.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "MIT",
|