{"analyzedAt":"2022-07-03T06:38:47.302Z","collected":{"metadata":{"name":"driver-license-validator","scope":"unscoped","version":"3.1.1","description":"Validate driver license numbers.","keywords":["driver-license","drivers-license","validation","validator"],"date":"2022-01-08T03:46:44.907Z","author":{"name":"Justin Lettau","email":"me@justinlettau.com","url":"https://justinlettau.com","username":"justinlettau"},"publisher":{"username":"justinlettau","email":"me@justinlettau.com"},"maintainers":[{"username":"justinlettau","email":"me@justinlettau.com"}],"repository":{"type":"git","url":"git+https://github.com/justinlettau/driver-license-validator.git"},"links":{"npm":"https://www.npmjs.com/package/driver-license-validator","homepage":"https://github.com/justinlettau/driver-license-validator","repository":"https://github.com/justinlettau/driver-license-validator","bugs":"https://github.com/justinlettau/driver-license-validator/issues"},"license":"MIT","devDependencies":{"@types/jest":"^27.0.2","@typescript-eslint/eslint-plugin":"^5.2.0","@typescript-eslint/parser":"^5.2.0","eslint":"^8.1.0","eslint-config-prettier":"^8.3.0","husky":"^7.0.4","jest":"^27.3.1","prettier":"^2.4.1","pretty-quick":"^3.1.1","standard-version":"^9.3.2","ts-jest":"^27.0.7","ts-node":"^10.4.0","typescript":"^4.4.4"},"releases":[{"from":"2022-06-03T00:00:00.000Z","to":"2022-07-03T00:00:00.000Z","count":0},{"from":"2022-04-04T00:00:00.000Z","to":"2022-07-03T00:00:00.000Z","count":1},{"from":"2022-01-04T00:00:00.000Z","to":"2022-07-03T00:00:00.000Z","count":2},{"from":"2021-07-03T00:00:00.000Z","to":"2022-07-03T00:00:00.000Z","count":4},{"from":"2020-07-03T00:00:00.000Z","to":"2022-07-03T00:00:00.000Z","count":7}],"hasTestScript":true,"hasSelectiveFiles":true,"readme":"[![NPM Version](https://badge.fury.io/js/driver-license-validator.svg)](https://badge.fury.io/js/driver-license-validator)\r\n[![CI](https://github.com/justinlettau/driver-license-validator/workflows/CI/badge.svg)](https://github.com/justinlettau/driver-license-validator/actions)\r\n[![codecov](https://codecov.io/gh/justinlettau/driver-license-validator/branch/master/graph/badge.svg)](https://codecov.io/gh/justinlettau/driver-license-validator)\r\n\r\n# Driver License Validator\r\n\r\nValidate driver license numbers.\r\nFormats based on [https://ntsi.com/drivers-license-format/](https://ntsi.com/drivers-license-format/).\r\n\r\n# Table of Contents\r\n\r\n- [Installation](#installation)\r\n- [Usage](#usage)\r\n- [Development](#development)\r\n\r\n# Installation\r\n\r\n```bash\r\nnpm install driver-license-validator --save\r\n```\r\n\r\n# Usage\r\n\r\n```js\r\nimport { getMatches, isValid } from 'driver-license-validator';\r\n\r\nisValid('A1234567');\r\n// => true\r\n\r\nisValid('invalid_dl');\r\n// => false\r\n\r\ngetMatches('A1234567');\r\n// => [\r\n//   { description: '1 letter followed by 1-8 numbers', state: 'AZ' },\r\n//   { description: '1 letter followed by 7 numbers', state: 'CA' },\r\n//   { description: '1 letter followed by 5-9 numbers', state: 'MO' },\r\n//   { description: '1 letter followed by 6-8 numbers', state: 'NE' },\r\n//   { description: '1 letter followed by 7 numbers', state: 'NY' },\r\n//   { description: '1 letter followed by 4-8 numbers', state: 'OH' }\r\n// ]\r\n\r\ngetMatches('A1234567', { states: 'NY' });\r\n// => [\r\n//   { description: '1 letter followed by 7 numbers', state: 'NY' }\r\n// ]\r\n\r\ngetMatches('A1234567', { states: ['NY', 'OH'] });\r\n// => [\r\n//   { description: '1 letter followed by 7 numbers', state: 'NY' },\r\n//   { description: '1 letter followed by 4-8 numbers', state: 'OH' }\r\n// ]\r\n\r\ngetMatches('A123456789', { country: 'CA' });\r\n// => [\r\n//   { description: '1 letter followed by 9 numbers', state: 'NL' }\r\n// ]\r\n\r\ngetMatches('invalid_dl');\r\n// => null\r\n```\r\n\r\nOptions:\r\n\r\n| Option       | Type                   | Description                    | Default |\r\n| ------------ | ---------------------- | ------------------------------ | ------- |\r\n| `country`    | `string`               | Country to use.                | `US`    |\r\n| `states`     | `string` or `string[]` | State(s) to filter results to. | n/a     |\r\n| `ignoreCase` | `boolean`              | True to ignore case.           | `false` |\r\n\r\n# Development\r\n\r\n```\r\nnpm install\r\nnpm run build\r\n```"},"npm":{"downloads":[{"from":"2022-07-02T00:00:00.000Z","to":"2022-07-03T00:00:00.000Z","count":70},{"from":"2022-06-26T00:00:00.000Z","to":"2022-07-03T00:00:00.000Z","count":3518},{"from":"2022-06-03T00:00:00.000Z","to":"2022-07-03T00:00:00.000Z","count":16665},{"from":"2022-04-04T00:00:00.000Z","to":"2022-07-03T00:00:00.000Z","count":55378},{"from":"2022-01-04T00:00:00.000Z","to":"2022-07-03T00:00:00.000Z","count":117554},{"from":"2021-07-03T00:00:00.000Z","to":"2022-07-03T00:00:00.000Z","count":198808}],"starsCount":0},"github":{"starsCount":3,"forksCount":7,"subscribersCount":2,"issues":{"count":53,"openCount":7,"distribution":{"3600":3,"10800":0,"32400":1,"97200":2,"291600":4,"874800":3,"2624400":11,"7873200":17,"23619600":11,"70858800":1,"212576400":0},"isDisabled":false},"contributors":[{"username":"renovate-bot","commitsCount":2},{"username":"justinlettau","commitsCount":30},{"username":"renovate[bot]","commitsCount":6},{"username":"TroyMorvant","commitsCount":1},{"username":"willclark","commitsCount":1}],"commits":[{"from":"2022-06-26T00:00:00.000Z","to":"2022-07-03T00:00:00.000Z","count":0},{"from":"2022-06-03T00:00:00.000Z","to":"2022-07-03T00:00:00.000Z","count":0},{"from":"2022-04-04T00:00:00.000Z","to":"2022-07-03T00:00:00.000Z","count":0},{"from":"2022-01-04T00:00:00.000Z","to":"2022-07-03T00:00:00.000Z","count":2},{"from":"2021-07-03T00:00:00.000Z","to":"2022-07-03T00:00:00.000Z","count":15}],"statuses":[{"context":"codecov/patch","state":"success"},{"context":"codecov/project","state":"success"}]},"source":{"files":{"readmeSize":2373,"testsSize":11808,"hasChangelog":true},"linters":["eslint","prettier"],"coverage":0.97}},"evaluation":{"quality":{"carefulness":0.9999999999999999,"tests":0.9954999999999999,"health":1,"branding":0},"popularity":{"communityInterest":17,"downloadsCount":18459.333333333332,"downloadsAcceleration":29.804718417047184,"dependentsCount":0},"maintenance":{"releasesFrequency":0.9,"commitsFrequency":0.9,"openIssues":1,"issuesDistribution":0.9}},"score":{"final":0.6562150576499924,"detail":{"quality":0.8994174622296482,"popularity":0.1040300597943553,"maintenance":0.9999408515802104}}}