{"id":24614444,"url":"https://github.com/tabuckner/lazy-vin-lib","last_synced_at":"2026-04-12T20:40:40.360Z","repository":{"id":34290735,"uuid":"174448716","full_name":"tabuckner/lazy-vin-lib","owner":"tabuckner","description":null,"archived":false,"fork":false,"pushed_at":"2022-12-08T16:18:41.000Z","size":453,"stargazers_count":1,"open_issues_count":25,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-25T01:47:29.344Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","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/tabuckner.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"code-of-conduct.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-08T01:37:47.000Z","updated_at":"2020-04-08T13:29:27.000Z","dependencies_parsed_at":"2023-01-15T05:55:45.949Z","dependency_job_id":null,"html_url":"https://github.com/tabuckner/lazy-vin-lib","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/tabuckner%2Flazy-vin-lib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tabuckner%2Flazy-vin-lib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tabuckner%2Flazy-vin-lib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tabuckner%2Flazy-vin-lib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tabuckner","download_url":"https://codeload.github.com/tabuckner/lazy-vin-lib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244273402,"owners_count":20426922,"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":"2025-01-24T21:16:52.013Z","updated_at":"2026-04-12T20:40:35.309Z","avatar_url":"https://github.com/tabuckner.png","language":"TypeScript","funding_links":["https://paypal.me/AJoverMorales"],"categories":[],"sub_categories":[],"readme":"# Lazy VIN Library\n\n[![styled with prettier](https://img.shields.io/badge/styled_with-prettier-ff69b4.svg)](https://github.com/prettier/prettier)\n\u003c!-- [![Greenkeeper badge](https://badges.greenkeeper.io/alexjoverm/typescript-library-starter.svg)](https://greenkeeper.io/)\n[![Travis](https://img.shields.io/travis/alexjoverm/typescript-library-starter.svg)](https://travis-ci.org/alexjoverm/typescript-library-starter)\n[![Coveralls](https://img.shields.io/coveralls/alexjoverm/typescript-library-starter.svg)](https://coveralls.io/github/alexjoverm/typescript-library-starter)\n[![Dev Dependencies](https://david-dm.org/alexjoverm/typescript-library-starter/dev-status.svg)](https://david-dm.org/alexjoverm/typescript-library-starter?type=dev)\n[![Donate](https://img.shields.io/badge/donate-paypal-blue.svg)](https://paypal.me/AJoverMorales) --\u003e\n\nA very quick and very dirty library for getting random VINs.\n\n[StackBlitz Demo](https://stackblitz.com/edit/lazy-vin-lib-demo)\n[App Using the Library](https://tabuckner.github.io/barcode-tool)\n\n## Usage\n\n### Importing library\n\nInstall via yarn/npm\n```bash\nyarn add lazy-vin-lib\n```\n\nYou can import the generated bundle to use the whole library generated by this starter:\n\n```typescript\nimport LazyVin from 'lazy-vin-lib'\n\nclass MyClass {\n  private lazyVin;\n\n  constructor() {\n    this.lazyVin = new LazyVin();\n  }\n\n  someSlightlyBetterMethod(): string {\n    return this.lazyVin.getRandomValidVin();\n  }\n\n  someMethod(): string {\n    return this.lazyVin.getRandomCleanVin();\n  }\n\n  someRiskierMethod(): string {\n    return this.lazyVin.getRandomDirtyVin();\n  }\n}\n```\n\n### Methods\n\nThis library exposes the following methods:\n\n#### getRandomValidVin()\nReturns a quick and dirty 'random' VIN, complete with a North American [valid Check Digit](https://en.wikibooks.org/wiki/Vehicle_Identification_Numbers_(VIN_codes)/Check_digit).\n\n#### getRandomDirtyVin()\nA simple, quick and dirty 'random' VIN. It is not guaranteed to be valid. ...did I mention it's quick and dirty?\n\n#### getRandomCleanVin()\nA simple, quick and 'clean' 'random' VIN. It is not guaranteed to be valid. ...did I mention it's quick and clean? \n\nWhat makes the return value more 'clean' is a randomly generated six digit unique identifier at the end of a given VIN. The aim is to _lower_ the chances of getting a repeat VIN--not eliminate it.\n\n\u003c!-- Additionally, you can import the transpiled modules from `dist/lib` in case you have a modular library:\n\n```javascript\nimport something from 'mylib/dist/lib/something'\n``` --\u003e\n\n## Features Offered by Seed Project\n\n - Zero-setup. After running `npm install` things will setup for you :wink:\n - **[RollupJS](https://rollupjs.org/)** for multiple optimized bundles following the [standard convention](http://2ality.com/2017/04/setting-up-multi-platform-packages.html) and [Tree-shaking](https://alexjoverm.github.io/2017/03/06/Tree-shaking-with-Webpack-2-TypeScript-and-Babel/)\n - Tests, coverage and interactive watch mode using **[Jest](http://facebook.github.io/jest/)**\n - **[Prettier](https://github.com/prettier/prettier)** and **[TSLint](https://palantir.github.io/tslint/)** for code formatting and consistency\n - **Docs automatic generation and deployment** to `gh-pages`, using **[TypeDoc](http://typedoc.org/)**\n - Automatic types `(*.d.ts)` file generation\n - **[Travis](https://travis-ci.org)** integration and **[Coveralls](https://coveralls.io/)** report\n - (Optional) **Automatic releases and changelog**, using [Semantic release](https://github.com/semantic-release/semantic-release), [Commitizen](https://github.com/commitizen/cz-cli), [Conventional changelog](https://github.com/conventional-changelog/conventional-changelog) and [Husky](https://github.com/typicode/husky) (for the git hooks)\n\n### NPM scripts\n\n - `npm t`: Run test suite\n - `npm start`: Run `npm run build` in watch mode\n - `npm run test:watch`: Run test suite in [interactive watch mode](http://facebook.github.io/jest/docs/cli.html#watch)\n - `npm run test:prod`: Run linting and generate coverage\n - `npm run build`: Generate bundles and typings, create docs\n - `npm run lint`: Lints code\n - `npm run commit`: Commit using conventional commit style ([husky](https://github.com/typicode/husky) will tell you to use it if you haven't :wink:)\n\n### Excluding peerDependencies\n\nOn library development, one might want to set some peer dependencies, and thus remove those from the final bundle. You can see in [Rollup docs](https://rollupjs.org/#peer-dependencies) how to do that.\n\nGood news: the setup is here for you, you must only include the dependency name in `external` property within `rollup.config.js`. For example, if you want to exclude `lodash`, just write there `external: ['lodash']`.\n\n### Automatic releases\n\n_**Prerequisites**: you need to create/login accounts and add your project to:_\n - [npm](https://www.npmjs.com/)\n - [Travis CI](https://travis-ci.org)\n - [Coveralls](https://coveralls.io)\n\n_**Prerequisite for Windows**: Semantic-release uses\n**[node-gyp](https://github.com/nodejs/node-gyp)** so you will need to\ninstall\n[Microsoft's windows-build-tools](https://github.com/felixrieseberg/windows-build-tools)\nusing this command:_\n\n```bash\nnpm install --global --production windows-build-tools\n```\n\n#### Setup steps\n\nFollow the console instructions to install semantic release and run it (answer NO to \"Do you want a `.travis.yml` file with semantic-release setup?\").\n\n_Note: make sure you've setup `repository.url` in your `package.json` file_\n\n```bash\nnpm install -g semantic-release-cli\nsemantic-release-cli setup\n# IMPORTANT!! Answer NO to \"Do you want a `.travis.yml` file with semantic-release setup?\" question. It is already prepared for you :P\n```\n\nFrom now on, you'll need to use `npm run commit`, which is a convenient way to create conventional commits.\n\nAutomatic releases are possible thanks to [semantic release](https://github.com/semantic-release/semantic-release), which publishes your code automatically on [github](https://github.com/) and [npm](https://www.npmjs.com/), plus generates automatically a changelog. This setup is highly influenced by [Kent C. Dodds course on egghead.io](https://egghead.io/courses/how-to-write-an-open-source-javascript-library)\n\n### Git Hooks\n\nThere is already set a `precommit` hook for formatting your code with Prettier :nail_care:\n\nBy default, there are two disabled git hooks. They're set up when you run the `npm run semantic-release-prepare` script. They make sure:\n - You follow a [conventional commit message](https://github.com/conventional-changelog/conventional-changelog)\n - Your build is not going to fail in [Travis](https://travis-ci.org) (or your CI server), since it's runned locally before `git push`\n\nThis makes more sense in combination with [automatic releases](#automatic-releases)\n\n### FAQ\n\n#### `Array.prototype.from`, `Promise`, `Map`... is undefined?\n\nTypeScript or Babel only provides down-emits on syntactical features (`class`, `let`, `async/await`...), but not on functional features (`Array.prototype.find`, `Set`, `Promise`...), . For that, you need Polyfills, such as [`core-js`](https://github.com/zloirock/core-js) or [`babel-polyfill`](https://babeljs.io/docs/usage/polyfill/) (which extends `core-js`).\n\nFor a library, `core-js` plays very nicely, since you can import just the polyfills you need:\n\n```javascript\nimport \"core-js/fn/array/find\"\nimport \"core-js/fn/string/includes\"\nimport \"core-js/fn/promise\"\n...\n```\n\n#### What if I don't want git-hooks, automatic releases or semantic-release?\n\nThen you may want to:\n - Remove `commitmsg`, `postinstall` scripts from `package.json`. That will not use those git hooks to make sure you make a conventional commit\n - Remove `npm run semantic-release` from `.travis.yml`\n\n#### What if I don't want to use coveralls or report my coverage?\n\nRemove `npm run report-coverage` from `.travis.yml`\n\n## Acknowledgements\n\n### Typescript-Libarary-Starter\n\n[Check It Out](https://github.com/alexjoverm/typescript-library-starter)\n\nMade with :heart: by [@alexjoverm](https://twitter.com/alexjoverm) and all these wonderful contributors ([emoji key](https://github.com/kentcdodds/all-contributors#emoji-key)):\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftabuckner%2Flazy-vin-lib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftabuckner%2Flazy-vin-lib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftabuckner%2Flazy-vin-lib/lists"}