{"id":18282789,"url":"https://github.com/chrishanzlik/textmasks","last_synced_at":"2025-08-22T05:07:11.183Z","repository":{"id":57702555,"uuid":"500233988","full_name":"chrishanzlik/textmasks","owner":"chrishanzlik","description":"Masking texts with typescript / javascript","archived":false,"fork":false,"pushed_at":"2022-06-13T15:23:28.000Z","size":377,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"development","last_synced_at":"2025-07-10T21:27:11.146Z","etag":null,"topics":["inputmask","mask","placeholders","textmask","typescript"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/chrishanzlik.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":"2022-06-05T23:17:28.000Z","updated_at":"2022-06-07T12:20:02.000Z","dependencies_parsed_at":"2022-09-26T21:11:20.961Z","dependency_job_id":null,"html_url":"https://github.com/chrishanzlik/textmasks","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/chrishanzlik/textmasks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrishanzlik%2Ftextmasks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrishanzlik%2Ftextmasks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrishanzlik%2Ftextmasks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrishanzlik%2Ftextmasks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chrishanzlik","download_url":"https://codeload.github.com/chrishanzlik/textmasks/tar.gz/refs/heads/development","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chrishanzlik%2Ftextmasks/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271121135,"owners_count":24702722,"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","status":"online","status_checked_at":"2025-08-19T02:00:09.176Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["inputmask","mask","placeholders","textmask","typescript"],"created_at":"2024-11-05T13:06:15.673Z","updated_at":"2025-08-22T05:07:11.159Z","avatar_url":"https://github.com/chrishanzlik.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# textmasks\n\n[![npm](https://img.shields.io/npm/v/textmasks)](https://www.npmjs.com/package/textmasks)\n\nExperimental typescript/javascript lib for masking texts.\n\n## Installation guide\n\n```bash\nnpm install textmasks --save\n```\n\n## Mask options\n\nTBC...\n\n### Default definitions\n\nDefault definitions for all numbers and alphabetical characters:\n\n| Char(s) | Description         | Expression  |\n| ------- | ------------------- | ----------- |\n| a-z     | Lower case letters  | `/^[a-z]$/` |\n| A-Z     | Uppser case letters | `/^[A-Z]$/` |\n| 0-9     | Numbers             | `/^[0-9]$/` |\n\n## Work with the string extension\n\n```typescript\n'123456'.mask('(999)-999', options);\n```\n\n## Examples\n\nDirect match:\n\n```typescript\nimport { maskText } from 'textmasks';\n\nconst result = maskText({\n  text: '123456',\n  mask: '(9)99-999',\n});\n\nresult.output === '(1)23-456'; // true\n```\n\nPartial mask output:\n\n```typescript\nimport { maskText } from 'textmasks';\n\nconst result = maskText({\n  text: '123',\n  mask: '(9)99-999',\n  options: {\n    partialOutput: true,\n  },\n});\n\nresult.output === '(1)123-'; // true\n```\n\nFull mask output with RTL-direction:\n\n```typescript\nimport { maskText } from 'textmasks';\n\nconst result = maskText({\n  text: '12',\n  mask: '(9)99-999',\n  options: {\n    placeholder: '_',\n    partialOutput: false,\n    direction: 'rtl',\n  },\n});\n\nresult.output === '(_)__-_21'; // true\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrishanzlik%2Ftextmasks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchrishanzlik%2Ftextmasks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchrishanzlik%2Ftextmasks/lists"}