{"id":15391914,"url":"https://github.com/scrum/credit-card-gaps-pattern","last_synced_at":"2025-10-26T20:45:31.635Z","repository":{"id":141889303,"uuid":"181036843","full_name":"Scrum/credit-card-gaps-pattern","owner":"Scrum","description":"Creates a pattern for restricted-input from data obtained from credit-card-type","archived":false,"fork":false,"pushed_at":"2019-05-21T08:47:07.000Z","size":39,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-02-15T18:40:33.926Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","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/Scrum.png","metadata":{"files":{"readme":"readme.md","changelog":"changelog.md","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":"2019-04-12T15:37:24.000Z","updated_at":"2019-05-21T08:47:07.000Z","dependencies_parsed_at":null,"dependency_job_id":"fb9b6bb9-792d-4af6-9c4a-6a6f9038d10f","html_url":"https://github.com/Scrum/credit-card-gaps-pattern","commit_stats":{"total_commits":21,"total_committers":1,"mean_commits":21.0,"dds":0.0,"last_synced_commit":"4e258abab4b424b7fb7029c1b722f1e54588a743"},"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scrum%2Fcredit-card-gaps-pattern","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scrum%2Fcredit-card-gaps-pattern/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scrum%2Fcredit-card-gaps-pattern/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Scrum%2Fcredit-card-gaps-pattern/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Scrum","download_url":"https://codeload.github.com/Scrum/credit-card-gaps-pattern/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240131736,"owners_count":19752727,"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-10-01T15:13:28.623Z","updated_at":"2025-10-26T20:45:31.547Z","avatar_url":"https://github.com/Scrum.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# credit-card-gaps-pattern\n\n\u003e Creates a pattern for [restricted-input](https://github.com/braintree/restricted-input) from data obtained from [credit-card-type](https://github.com/braintree/credit-card-type)\n\n[![Travis Build Status](https://img.shields.io/travis/Scrum/credit-card-gaps-pattern/master.svg?style=flat-square\u0026label=unix)](https://travis-ci.org/Scrum/credit-card-gaps-pattern)[![AppVeyor Build Status](https://img.shields.io/appveyor/ci/GitScrum/credit-card-gaps-pattern/master.svg?style=flat-square\u0026label=windows)](https://ci.appveyor.com/project/GitScrum/credit-card-gaps-pattern)[![node](https://img.shields.io/node/v/credit-card-gaps-pattern.svg?style=flat-square)]()[![npm version](https://img.shields.io/npm/v/credit-card-gaps-pattern.svg?style=flat-square)](https://www.npmjs.com/package/credit-card-gaps-pattern)[![Dependency Status](https://david-dm.org/Scrum/credit-card-gaps-pattern.svg?style=flat-square)](https://david-dm.org/Scrum/credit-card-gaps-pattern)[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg?style=flat-square)](https://github.com/sindresorhus/xo)[![Coveralls status](https://img.shields.io/coveralls/Scrum/credit-card-gaps-pattern.svg?style=flat-square)](https://coveralls.io/r/Scrum/credit-card-gaps-pattern)\n\n[![npm downloads](https://img.shields.io/npm/dm/credit-card-gaps-pattern.svg?style=flat-square)](https://www.npmjs.com/package/credit-card-gaps-pattern)[![npm](https://img.shields.io/npm/dt/credit-card-gaps-pattern.svg?style=flat-square)](https://www.npmjs.com/package/credit-card-gaps-pattern)\n\n## Why ?\nMasks on hot for [HTMLInputElement](https://developer.mozilla.org/ru/docs/Web/API/HTMLInputElement)\n\n## Install\n\n```bash\n$ npm install credit-card-gaps-pattern \n```\n\n\u003e **Note:** This project is compatible with node v8+\n\n## Usage\n\n```js\n// Dependencies\nimport creditCardGapsPattern from 'credit-card-gaps-pattern';\n\nconst gaps = [4, 10];\nconst lengths = [14, 16, 19];\n\nconsole.log(creditCardGapsPattern(gaps, lengths));\n// =\u003e {{9999}} {{999999}} {{999999999}}\n```\n\n## Example\n```js\n// Dependencies\nimport RestrictedInput from 'restricted-input';\nimport creditCardType from 'credit-card-type';\nimport creditCardGapsPattern from 'credit-card-gaps-pattern';\n\nconst input = document.querySelector('input');\nconst {gaps, lengths} = creditCardType('30');\n\nnew RestrictedInput({\n  element: input,\n  pattern: creditCardGapsPattern(gaps, lengths)\n});\n```\n\u003e [Demo](https://scrum.github.io/credit-card-gaps-pattern/)\n\n## Related\n\n- [restricted-input](https://github.com/braintree/restricted-input) - Allow restricted character sets in `input` elements.\n- [credit-card-type](https://github.com/braintree/credit-card-type) - A library for determining credit card type \n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscrum%2Fcredit-card-gaps-pattern","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscrum%2Fcredit-card-gaps-pattern","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscrum%2Fcredit-card-gaps-pattern/lists"}