{"id":13674947,"url":"https://github.com/bguzmanrio/maskjs","last_synced_at":"2025-04-28T19:31:40.891Z","repository":{"id":22316209,"uuid":"25651468","full_name":"bguzmanrio/maskjs","owner":"bguzmanrio","description":"Mask.js is a simple functionality that you can use to force user met a pattern into inputs","archived":false,"fork":false,"pushed_at":"2016-02-03T07:15:45.000Z","size":40,"stargazers_count":242,"open_issues_count":6,"forks_count":8,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-11-11T15:43:02.445Z","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":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bguzmanrio.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":"2014-10-23T18:24:31.000Z","updated_at":"2024-03-28T13:06:45.000Z","dependencies_parsed_at":"2022-08-05T17:15:16.897Z","dependency_job_id":null,"html_url":"https://github.com/bguzmanrio/maskjs","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/bguzmanrio%2Fmaskjs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bguzmanrio%2Fmaskjs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bguzmanrio%2Fmaskjs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bguzmanrio%2Fmaskjs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bguzmanrio","download_url":"https://codeload.github.com/bguzmanrio/maskjs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251375405,"owners_count":21579440,"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-08-02T12:00:20.939Z","updated_at":"2025-04-28T19:31:40.612Z","avatar_url":"https://github.com/bguzmanrio.png","language":"JavaScript","readme":"Mask.js\n======\n\nWhat is Mask.js about?\n----------------------\n\nMask.js is a simple functionality that you can use to force user met a pattern into inputs\n\n\nDependencies?\n-------------\n\nMask.js works on most jQuery versions.\n\nMain Features\n-------------\n\n\u003cul\u003e\n    \u003cli\u003e\n        Accepts any pattern order you would like to use\n    \u003c/li\u003e\n    \u003cli\u003e\n        In case of dates, it will validates days out of range, and even leap years\n    \u003c/li\u003e\n    \u003cli\u003e\n        You can use a custom function to handle the non validating inputs\n    \u003c/li\u003e\n    \u003cli\u003e\n        It will write down any token automatically while you are typing.\n    \u003c/li\u003e\n    \u003cli\u003e\n        In erasing, tokens will be omitted, and while you are re-typing, them are going to ve pass over\n    \u003c/li\u003e\n    \n\u003c/ul\u003e\n\n\nHow can I use Mask.js?\n----------------------\n\nThere are just a few steps:\n\n1. You have to import mark.js into your project \n2. Once imported, just pass the next parameter with you desired configuration:\n\n    ```\n    var options = {\n      $el: jQuery input,\n      mask: pattern to apply(described in the next section),\n      errorFunction: callback function triggered on every error,\n      defaultValue: defaultValue to be shown on initialization(applies on date format),\n      hidePlaceholder: boolean for not showing the pattern placeholder,\n      isUtc: if the pattern is a date format, utc will be considered\n    }\n    Mask.newMask(options);\n    ```\n3. Pattern is the mask you want to apply over the input. It can be one of the following:\n\u003cul\u003e\n\u003cli\u003eAny combination of YYYY-MM-DD HH:mm, where:\n\u003cul\u003e\n    \u003cli\u003e\n        Y means year\n    \u003c/li\u003e\n    \u003cli\u003e\n        M means month\n    \u003c/li\u003e\n    \u003cli\u003e\n        D means day\n    \u003c/li\u003e\n    \u003cli\u003e\n        H means hour\n    \u003c/li\u003e\n    \u003cli\u003e\n        m means minutes\n    \u003c/li\u003e\n\u003c/ul\u003e\n\u003c/li\u003e\n\u003cli\u003en for typing only numbers\u003c/li\u003e\n\u003cli\u003eaz for typing only characters\u003c/li\u003e\n\u003cli\u003eaz/n for typing both characters and numbers\u003c/li\u003e\n\u003c/ul\u003e\n\n4. Additionaly you can add a number after n or az to limit the maximun characters users can write\n\n\nTry it out\n----------\n\nYou can play around with it here: http://bguzmanrio.github.io/maskjs\n","funding_links":[],"categories":["Javascript","JavaScript"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbguzmanrio%2Fmaskjs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbguzmanrio%2Fmaskjs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbguzmanrio%2Fmaskjs/lists"}