{"id":16252968,"url":"https://github.com/neki-dev/digital-mask","last_synced_at":"2026-03-17T18:38:10.241Z","repository":{"id":57685831,"uuid":"342527268","full_name":"neki-dev/digital-mask","owner":"neki-dev","description":"🧩 Easy digital mask for string and inputs","archived":false,"fork":false,"pushed_at":"2024-08-04T23:08:57.000Z","size":248,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-19T13:31:35.725Z","etag":null,"topics":["digital","format","input","mask","number","pattern"],"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/neki-dev.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-26T09:32:51.000Z","updated_at":"2024-08-25T22:34:32.000Z","dependencies_parsed_at":"2024-10-27T21:32:02.529Z","dependency_job_id":"948cf15d-f2ea-4242-bc20-4cbb863ca4ca","html_url":"https://github.com/neki-dev/digital-mask","commit_stats":{"total_commits":18,"total_committers":5,"mean_commits":3.6,"dds":0.4444444444444444,"last_synced_commit":"c43ceaae23068a10c01e0de2eb8c90d62b450d71"},"previous_names":["essle/digital-mask"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/neki-dev/digital-mask","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neki-dev%2Fdigital-mask","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neki-dev%2Fdigital-mask/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neki-dev%2Fdigital-mask/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neki-dev%2Fdigital-mask/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/neki-dev","download_url":"https://codeload.github.com/neki-dev/digital-mask/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/neki-dev%2Fdigital-mask/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30628438,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-17T17:32:55.572Z","status":"ssl_error","status_checked_at":"2026-03-17T17:32:38.732Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["digital","format","input","mask","number","pattern"],"created_at":"2024-10-10T15:15:31.363Z","updated_at":"2026-03-17T18:38:10.213Z","avatar_url":"https://github.com/neki-dev.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## ⚡ Digital mask\n[![Version](https://badgen.net/npm/v/digital-mask)](https://npmjs.com/package/digital-mask)\n[![Size](https://img.badgesize.io/neki-dev/digital-mask/master/dist/index.js)](https://github.com/neki-dev/digital-mask/blob/master/dist/index.js)\n[![Test](https://github.com/neki-dev/digital-mask/actions/workflows/test.yml/badge.svg)](https://github.com/neki-dev/digital-mask/actions/workflows/test.yml)\n[![Build](https://github.com/neki-dev/digital-mask/actions/workflows/build.yml/badge.svg)](https://github.com/neki-dev/digital-mask/actions/workflows/build.yml)\n\nEasy digital mask for string and inputs\n\n.\n\n* ### Install\n\n```sh\nnpm i digital-mask\n```\n\n* ### Usage\n\n```js\n/**\n * Return masked value from source string\n */\napplyStringMask(\n  // Unformatted string\n  source: string,\n  // Mask for format\n  format: string,\n  // Сhar from replace\n  def: string = '_'\n): string\n\n/**\n * Update input value to masked\n */\napplyInputMask(\n  // Input\n  input: HTMLInputElement,\n  // Mask for format\n  format: string,\n  // Сhar from replace\n  def: string = '_'\n): void\n```\n\n* ### Example for string\n```ts\nimport { applyStringMask } from 'digital-mask';\n\napplyStringMask('1234', '___-___'); \n// =\u003e 123-4__\n\napplyStringMask('1234', '***-***', '*'); \n// =\u003e 123-4**\n\napplyStringMask('chars1234and56', '___-___'); \n// =\u003e 123-456\n```\n\n* ### Example for input\n\n```ts\nimport { applyInputMask } from 'digital-mask';\n\nconst input = document.getElementById('inputPhone');\ninput.addEventListener('input', (event) =\u003e {\n  applyInputMask(event.target, '___-___');\n});\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneki-dev%2Fdigital-mask","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fneki-dev%2Fdigital-mask","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fneki-dev%2Fdigital-mask/lists"}