{"id":21487010,"url":"https://github.com/ntsd/mirrorinput","last_synced_at":"2025-03-17T10:14:20.944Z","repository":{"id":34508760,"uuid":"166684828","full_name":"ntsd/mirrorinput","owner":"ntsd","description":"A library to copy an input element and allow you to custom string to show","archived":false,"fork":false,"pushed_at":"2023-01-04T01:57:27.000Z","size":1463,"stargazers_count":0,"open_issues_count":15,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-01-23T19:47:10.622Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ntsd.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-20T16:45:58.000Z","updated_at":"2019-11-06T13:56:02.000Z","dependencies_parsed_at":"2023-01-15T07:45:36.618Z","dependency_job_id":null,"html_url":"https://github.com/ntsd/mirrorinput","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntsd%2Fmirrorinput","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntsd%2Fmirrorinput/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntsd%2Fmirrorinput/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ntsd%2Fmirrorinput/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ntsd","download_url":"https://codeload.github.com/ntsd/mirrorinput/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244014186,"owners_count":20383716,"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":[],"created_at":"2024-11-23T13:25:45.714Z","updated_at":"2025-03-17T10:14:19.739Z","avatar_url":"https://github.com/ntsd.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Mirrorinput.js\n\nA library to copy an input element and allow you to custom string to show.\n\n\n#### Features\n- Edit value to show as you want without effect primary value\n- Number pads for mobile when you need to add text on input field\n- Caret selection position when value size is change\n- No jQuery need\n\n\n#### Example \n\n```\nfunction onCreditCardShow(text) {\n    let newText = \"\";\n    let spaces = \"\";\n    for (let i in text.split(\"\")) {\n        if (i%4 == 0) {\n            newText += \" \";\n            spaces += \"0\";\n        }\n        if (i \u003e 2 \u0026\u0026 i \u003c 12) {\n            newText += \"*\";\n        } else {\n            newText += text[i];\n        }\n        spaces += \"1\";\n    }\n    return { text: newText, spaces: spaces };\n}\n\nvar cardMirrorInput = new MirrorInput(document.getElementById(\"exampleInputCard\"), onCreditCardShow);\n```\n\n**Warning caret position do not support in type number, email, date**\n\nYou can use type text and tel instead\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fntsd%2Fmirrorinput","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fntsd%2Fmirrorinput","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fntsd%2Fmirrorinput/lists"}