{"id":26502010,"url":"https://github.com/lavesan/function-masks","last_synced_at":"2026-04-11T13:02:43.782Z","repository":{"id":57242965,"uuid":"292856033","full_name":"lavesan/function-masks","owner":"lavesan","description":"Function masks to be used by any variable, like input in a website","archived":false,"fork":false,"pushed_at":"2020-11-13T16:42:38.000Z","size":50,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-06-04T14:22:01.311Z","etag":null,"topics":["babel","gulp","masks"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/function-masks","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/lavesan.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":"2020-09-04T13:32:29.000Z","updated_at":"2020-11-13T16:42:40.000Z","dependencies_parsed_at":"2022-09-15T00:50:37.090Z","dependency_job_id":null,"html_url":"https://github.com/lavesan/function-masks","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/lavesan/function-masks","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lavesan%2Ffunction-masks","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lavesan%2Ffunction-masks/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lavesan%2Ffunction-masks/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lavesan%2Ffunction-masks/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lavesan","download_url":"https://codeload.github.com/lavesan/function-masks/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lavesan%2Ffunction-masks/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260653790,"owners_count":23042642,"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":["babel","gulp","masks"],"created_at":"2025-03-20T17:23:17.543Z","updated_at":"2025-12-30T22:30:26.884Z","avatar_url":"https://github.com/lavesan.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Function masks\n\nFunction masks to be used by any variable, like inputs in a website\n\nIf there's some bug/feature, submit a Issue :D\n\n## Pre-requisites\n\n- node\n\n## Installing\n\n\u003e npm i --save function-masks\n\nor with yarn\n\n\u003e yarn add function-masks\n\n## Usage\n\n```javascript\nimport { onlyNumberMask, maxLengthMask } from 'function-masks'\n\nconst string1 = 'string with some numbers 123'\nconsole.log(onlyNumberMask(string1)) // -\u003e Output: 123\n\nconst string2 = \"string-with more digits than it's permitted\"\nconsole.log(maxLengthMask(6)(string2)) // -\u003e Output: string\n```\n\n## Functions\n\n|name          |parameters|description                     |\n|--------------|----------|--------------------------------|\n|onlyNumberMask|(value: string)     |Returns string with only numbers|\n|cpfMask|(value: string)     |Returns string with cpf format '000-000-000-00'|\n|maxLengthMask|(length: number)(value: string)     |Returns string with limited length|\n|onlyCharactersMask|(value: string)     |Returns string with only characters and special characters|\n|celphoneMask|(value: string)     |Returns string with celphone format '(00) 00000-0000'|\n|telephoneMask|(value: string)     |Returns string with telephone format '(00) 0000-0000'|\n|onlyNumberStringToThreeDigit|(value: string)     |Returns string with three digit dots format '0,000'|\n|percentageMask|(value: string)     |Returns string with only integer percentage format '0%'|\n|cardNumberMask|(value: string)     |Returns string with card format '0000 0000 0000 0000'|\n|moneyMask|(value: string)     |Returns string with br money format 'R$ 0,00'|\n|cepMask|(value: string)     |Returns string with cep format '00000-000'|\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flavesan%2Ffunction-masks","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flavesan%2Ffunction-masks","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flavesan%2Ffunction-masks/lists"}