use-mask-input 3.5.1 → 3.5.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/CHANGELOG.md +7 -0
- package/dist/index.cjs +2 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/types.ts +17 -17
- package/src/withMask.ts +3 -9
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## [3.5.2](https://github.com/eduardoborges/use-mask-input/compare/3.5.1...3.5.2) (2025-09-24)
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
### Bug Fixes
|
|
5
|
+
|
|
6
|
+
* add .node-version file and refactor types and withMask function for improved type handling ([9f34a7b](https://github.com/eduardoborges/use-mask-input/commit/9f34a7bb6a1ed721efb04ffe53ea12bbd8102227))
|
|
7
|
+
|
|
1
8
|
## [3.5.1](https://github.com/eduardoborges/use-mask-input/compare/3.5.0...3.5.1) (2025-09-05)
|
|
2
9
|
|
|
3
10
|
|
package/dist/index.cjs
CHANGED
|
@@ -3981,13 +3981,9 @@ function withHookFormMask(register, mask, options) {
|
|
|
3981
3981
|
var import_inputmask2 = __toESM(require_inputmask());
|
|
3982
3982
|
function withMask(mask, options) {
|
|
3983
3983
|
return (input) => {
|
|
3984
|
-
if (isServer_default) return
|
|
3985
|
-
if (mask === null) return input;
|
|
3984
|
+
if (isServer_default || mask === null || !input) return;
|
|
3986
3985
|
const maskInput = interopDefaultSync(import_inputmask2.default)(getMaskOptions(mask, options));
|
|
3987
|
-
|
|
3988
|
-
maskInput.mask(input);
|
|
3989
|
-
}
|
|
3990
|
-
return input;
|
|
3986
|
+
maskInput.mask(input);
|
|
3991
3987
|
};
|
|
3992
3988
|
}
|
|
3993
3989
|
|