{"id":22096502,"url":"https://github.com/uphold/ssn-validator","last_synced_at":"2025-07-24T22:32:07.854Z","repository":{"id":46692568,"uuid":"51143262","full_name":"uphold/ssn-validator","owner":"uphold","description":"Validate and mask a U.S. Social Security Number (SSN)","archived":false,"fork":false,"pushed_at":"2023-07-18T20:11:15.000Z","size":173,"stargazers_count":12,"open_issues_count":7,"forks_count":9,"subscribers_count":57,"default_branch":"master","last_synced_at":"2024-11-11T18:56:57.021Z","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/uphold.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":"2016-02-05T11:38:39.000Z","updated_at":"2024-09-21T15:12:06.000Z","dependencies_parsed_at":"2024-06-18T18:16:12.731Z","dependency_job_id":"b8423149-6db2-4298-8532-ecfc73ddbef5","html_url":"https://github.com/uphold/ssn-validator","commit_stats":null,"previous_names":["seegno/ssn-validator"],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uphold%2Fssn-validator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uphold%2Fssn-validator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uphold%2Fssn-validator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/uphold%2Fssn-validator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/uphold","download_url":"https://codeload.github.com/uphold/ssn-validator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227482485,"owners_count":17779968,"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-12-01T04:11:20.989Z","updated_at":"2024-12-01T04:11:21.600Z","avatar_url":"https://github.com/uphold.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ssn-validator\nValidate and mask a U.S. Social Security Number (SSN).\n\n## Status\n[![npm version][npm-image]][npm-url] [![build status][travis-image]][travis-url]\n\n## Installation\nInstall the package via `npm`:\n\n```sh\nnpm install ssn-validator --save\n```\n\n## Usage\n### `isValid(value)`\nThis method validates if the given value is a valid `Social Security Number`.\n\n#### Arguments\n1. `value` _(*)_: The value to validate.\n\n#### Returns\n_(boolean)_:  Returns whether the input value is a valid SSN or not.\n\n#### Example\n\n```js\nisValid({});\n// =\u003e false\n\nisValid('0-1-1234567');\n// =\u003e false\n\nisValid('011-23-4567');\n// =\u003e true\n\nisValid('011234567');\n// =\u003e true\n```\n\n--------------------------------------------------------------------------------\n\n### `mask(value)`\nThis method will help you protect this sensitive piece of information by obfuscating some digits.\n\n#### Arguments\n1. `value` _(*)_: The value to mask.\n\n#### Returns\n_(string)_: Returns the masked value by replacing value certain digits by 'X'.\n\n#### Example\n\n```js\nmask({});\n// Throws an Error.\n\nmask('0-1-1234567');\n// Throws an Error.\n\nmask('011-23-4567');\n// =\u003e XXX-XX-4567\n\nmask('011234567');\n// =\u003e XXXXX4567\n```\n\n--------------------------------------------------------------------------------\n\n## Tests\nTo test using a local installation of `node.js`:\n\n```sh\nnpm test\n```\n\n## Release\n\n```sh\nnpm version [\u003cnewversion\u003e | major | minor | patch] -m \"Release %s\"\n```\n\n## License\nMIT\n\n[npm-image]: https://img.shields.io/npm/v/ssn-validator.svg?style=flat-square\n[npm-url]: https://npmjs.org/package/ssn-validator\n[travis-image]: https://img.shields.io/travis/uphold/ssn-validator.svg?style=flat-square\n[travis-url]: https://img.shields.io/travis/uphold/ssn-validator.svg?style=flat-square\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuphold%2Fssn-validator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fuphold%2Fssn-validator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fuphold%2Fssn-validator/lists"}