|
| 1 | +<h1 align="center">codebar-regex</h1> |
| 2 | +<div align="center"> |
| 3 | + <strong>Regular expression for matching codebar barcode</strong> |
| 4 | +</div> |
| 5 | +<br> |
| 6 | +<div align="center"> |
| 7 | + <a href="https://npmjs.org/package/codebar-regex"> |
| 8 | + <img src="https://img.shields.io/npm/v/codebar-regex.svg?style=flat-square" alt="Package version" /> |
| 9 | + </a> |
| 10 | + <a href="https://npmjs.org/package/codebar-regex"> |
| 11 | + <img src="https://img.shields.io/npm/dm/codebar-regex.svg?style=flat-square" alt="Downloads" /> |
| 12 | + </a> |
| 13 | + <a href="https://github.com/feross/standard"> |
| 14 | + <img src="https://img.shields.io/badge/code%20style-standard-brightgreen.svg?style=flat-square" alt="Standard" /> |
| 15 | + </a> |
| 16 | + <a href="https://travis-ci.org/tiaanduplessis/codebar-regex"> |
| 17 | + <img src="https://img.shields.io/travis/tiaanduplessis/codebar-regex.svg?style=flat-square" alt="Travis Build" /> |
| 18 | + </a> |
| 19 | + <a href="https://github.com/RichardLitt/standard-readme)"> |
| 20 | + <img src="https://img.shields.io/badge/standard--readme-OK-green.svg?style=flat-square" alt="Standard Readme" /> |
| 21 | + </a> |
| 22 | + <a href="https://badge.fury.io/gh/tiaanduplessis%2Fcodebar-regex"> |
| 23 | + <img src="https://badge.fury.io/gh/tiaanduplessis%2Fcodebar-regex.svg?style=flat-square" alt="GitHub version" /> |
| 24 | + </a> |
| 25 | + <a href="https://dependencyci.com/github/tiaanduplessis/codebar-regex"> |
| 26 | + <img src="https://dependencyci.com/github/tiaanduplessis/codebar-regex/badge?style=flat-square" alt="Dependency CI" /> |
| 27 | + </a> |
| 28 | + <a href="https://github.com/tiaanduplessis/codebar-regex/blob/master/LICENSE"> |
| 29 | + <img src="https://img.shields.io/npm/l/codebar-regex.svg?style=flat-square" alt="License" /> |
| 30 | + </a> |
| 31 | + <a href="http://makeapullrequest.com"> |
| 32 | + <img src="https://img.shields.io/badge/PRs-welcome-brightgreen.svg?style=flat-square" alt="PRs" /> |
| 33 | + </a> |
| 34 | + <a href="https://www.paypal.me/tiaanduplessis/1"> |
| 35 | + <img src="https://img.shields.io/badge/$-support-green.svg?style=flat-square" alt="Donate" /> |
| 36 | + </a> |
| 37 | +</div> |
| 38 | +<br> |
| 39 | +<div align="center"> |
| 40 | + <a href="https://github.com/tiaanduplessis/codebar-regex/watchers"> |
| 41 | + <img src="https://img.shields.io/github/watchers/tiaanduplessis/codebar-regex.svg?style=social" alt="Github Watch Badge" /> |
| 42 | + </a> |
| 43 | + <a href="https://github.com/tiaanduplessis/codebar-regex/stargazers"> |
| 44 | + <img src="https://img.shields.io/github/stars/tiaanduplessis/codebar-regex.svg?style=social" alt="Github Star Badge" /> |
| 45 | + </a> |
| 46 | + <a href="https://twitter.com/intent/tweet?text=Check%20out%20codebar-regex!%20https://github.com/tiaanduplessis/codebar-regex%20%F0%9F%91%8D"> |
| 47 | + <img src="https://img.shields.io/twitter/url/https/github.com/tiaanduplessis/codebar-regex.svg?style=social" alt="Tweet" /> |
| 48 | + </a> |
| 49 | +</div> |
| 50 | +<br> |
| 51 | +<div align="center"> |
| 52 | + Built with ❤︎ by <a href="tiaan.beer">Tiaan</a> and <a href="https://github.com/tiaanduplessis/codebar-regex/graphs/contributors">contributors</a> |
| 53 | +</div> |
| 54 | + |
| 55 | +<h2>Table of Contents</h2> |
| 56 | +<details> |
| 57 | + <summary>Table of Contents</summary> |
| 58 | + <li><a href="#install">Install</a></li> |
| 59 | + <li><a href="#usage">Usage</a></li> |
| 60 | + <li><a href="#cli">CLI</a></li> |
| 61 | + <li><a href="#contribute">Contribute</a></li> |
| 62 | + <li><a href="#license">License</a></li> |
| 63 | +</details> |
| 64 | + |
| 65 | +## Install |
| 66 | + |
| 67 | +```sh |
| 68 | +$ npm install --save codebar-regex |
| 69 | +# OR |
| 70 | +$ yarn add codebar-regex |
| 71 | +``` |
| 72 | + |
| 73 | +## Usage |
| 74 | + |
| 75 | +```js |
| 76 | + |
| 77 | +const codebarRegex = require('codebar-regex') |
| 78 | + |
| 79 | +console.log(codebarRegex().test('A40156B')) // true |
| 80 | + |
| 81 | +console.log(codebarRegex().test('A31117013206375B')) // true |
| 82 | + |
| 83 | +``` |
| 84 | + |
| 85 | + |
| 86 | +## CLI |
| 87 | + |
| 88 | +```sh |
| 89 | +$ npm install --global codebar-regex |
| 90 | +# OR |
| 91 | +$ yarn global add codebar-regex |
| 92 | +``` |
| 93 | + |
| 94 | +Then: |
| 95 | + |
| 96 | +```sh |
| 97 | +$ codebar A40156B |
| 98 | +# true |
| 99 | +``` |
| 100 | + |
| 101 | +## Contribute |
| 102 | + |
| 103 | +Contributions are welcome. Please open up an issue or create PR if you would like to help out. |
| 104 | + |
| 105 | +Note: If editing the README, please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification. |
| 106 | + |
| 107 | +## License |
| 108 | + |
| 109 | +Licensed under the MIT License. |
0 commit comments