{"id":16965097,"url":"https://github.com/elsangedy/use-input-mask","last_synced_at":"2025-04-11T23:02:09.409Z","repository":{"id":57388128,"uuid":"197793685","full_name":"elsangedy/use-input-mask","owner":"elsangedy","description":null,"archived":false,"fork":false,"pushed_at":"2019-09-05T23:00:33.000Z","size":11,"stargazers_count":16,"open_issues_count":1,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-25T18:54:04.731Z","etag":null,"topics":["hooks","input-mask","react","text-mask"],"latest_commit_sha":null,"homepage":"https://use-input-mask.now.sh","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elsangedy.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-07-19T15:03:26.000Z","updated_at":"2023-02-23T21:24:37.000Z","dependencies_parsed_at":"2022-09-14T16:02:05.085Z","dependency_job_id":null,"html_url":"https://github.com/elsangedy/use-input-mask","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsangedy%2Fuse-input-mask","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsangedy%2Fuse-input-mask/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsangedy%2Fuse-input-mask/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elsangedy%2Fuse-input-mask/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elsangedy","download_url":"https://codeload.github.com/elsangedy/use-input-mask/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248492875,"owners_count":21113162,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hooks","input-mask","react","text-mask"],"created_at":"2024-10-13T23:45:00.004Z","updated_at":"2025-04-11T23:02:09.373Z","avatar_url":"https://github.com/elsangedy.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# use-input-mask\n![MIT License][license-badge]\n[![downloads][downloads-badge]][npmcharts]\n[![PRs Welcome][prs-badge]][prs]\n[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#contributors)\n\n## Installation\n\n```bash\n$ yarn add use-input-mask\n# or\n$ npm i use-input-mask\n```\n\n## Usage\n\n```jsx\nimport React from 'react'\n\nimport useInputMask from 'use-input-mask'\n\nimport { createAutoCorrectedDatePipe } from \"text-mask-addons\";\n\nconst MyDateInput = props =\u003e {\n  const input = useRef(null);\n\n  const autoCorrectedDatePipe = createAutoCorrectedDatePipe(\"dd/mm/yyyy HH:MM\");\n\n  const onChange = useInputMask({\n    input,\n    onChange: props.onChange,\n    mask: [/\\d/, /\\d/, \"/\", /\\d/, /\\d/, \"/\", /\\d/, /\\d/, /\\d/, /\\d/],\n    pipe: autoCorrectedDatePipe,\n    keepCharPositions: true\n  });\n\n  return \u003cinput {...props} ref={input} onChange={onChange} /\u003e;\n};\n\nexport default MyDateInput\n```\n\n## Roadmap\n* [ ] tests\n* [ ] ci/cd\n* [ ] semantic-release\n* [ ] docs\n* [x] all-contributors\n\n## Inspiration\n\n[text-mask](https://github.com/text-mask/text-mask)\n\n## Contributors\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n\u003c!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section --\u003e\n\u003c!-- prettier-ignore-start --\u003e\n\u003c!-- markdownlint-disable --\u003e\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"https://munir.dev\"\u003e\u003cimg src=\"https://avatars3.githubusercontent.com/u/5339664?v=4\" width=\"100px;\" alt=\"Munir Ahmed Elsangedy\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eMunir Ahmed Elsangedy\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/elsangedy/use-input-mask/commits?author=elsangedy\" title=\"Code\"\u003e💻\u003c/a\u003e \u003ca href=\"https://github.com/elsangedy/use-input-mask/commits?author=elsangedy\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n    \u003ctd align=\"center\"\u003e\u003ca href=\"http://twitter.com/renatorib_\"\u003e\u003cimg src=\"https://avatars2.githubusercontent.com/u/3277185?v=4\" width=\"100px;\" alt=\"Renato Ribeiro\"/\u003e\u003cbr /\u003e\u003csub\u003e\u003cb\u003eRenato Ribeiro\u003c/b\u003e\u003c/sub\u003e\u003c/a\u003e\u003cbr /\u003e\u003ca href=\"https://github.com/elsangedy/use-input-mask/commits?author=renatorib\" title=\"Documentation\"\u003e📖\u003c/a\u003e\u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\n\u003c!-- markdownlint-enable --\u003e\n\u003c!-- prettier-ignore-end --\u003e\n\u003c!-- ALL-CONTRIBUTORS-LIST:END --\u003e\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n\n## LIENSE\n\nMIT\n\n[license-badge]: https://img.shields.io/npm/l/use-input-mask.svg?style=flat-square\n[downloads-badge]: https://img.shields.io/npm/dm/use-input-mask.svg?style=flat-square\n[prs-badge]: https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square\n[prs]: http://makeapullrequest.com\n[npmcharts]: http://npmcharts.com/compare/use-input-mask\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felsangedy%2Fuse-input-mask","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felsangedy%2Fuse-input-mask","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felsangedy%2Fuse-input-mask/lists"}