https://github.com/alanbsmith/input-validator-lib
an example library for a JavaScript January article
https://github.com/alanbsmith/input-validator-lib
Last synced: 10 months ago
JSON representation
an example library for a JavaScript January article
- Host: GitHub
- URL: https://github.com/alanbsmith/input-validator-lib
- Owner: alanbsmith
- License: mit
- Created: 2017-12-24T21:14:31.000Z (over 8 years ago)
- Default Branch: add-initial-phone-validation
- Last Pushed: 2017-12-29T07:24:59.000Z (over 8 years ago)
- Last Synced: 2025-08-18T08:42:14.749Z (11 months ago)
- Language: JavaScript
- Size: 137 KB
- Stars: 1
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Input Validator Lib
_an example library for a [JavaScript January](https://www.javascriptjanuary.com/) article_
## INSTALLATION
_If this were actually published to npm_, you could install this library by running:
```sh
$ npm install input-validator-lib
```
## UP & RUNNING
To install dependencies with Yarn, run:
```sh
$ yarn install
```
or to install with npm, run:
```sh
$ npm install
```
## LOCAL DEVELOPMENT
### LINTING
To run the linter once:
```
$ yarn lint
```
To run the watch task:
```
$ yarn lint:watch
```
### TESTING
To run the tests once:
```
$ Yarn test
```
To run the watch script (for only relevant test files)
```
$ yarn test:watch
```
To run the watch script (for all test files)
```
$ yarn test:watchAll
```
To view the coverage report:
```
$ yarn test:coverage:report
```
### REVIEW
If you'd like to run the linters and tests at once (this is a nice check before pushing to
Github or deploys), you can run:
```
$ yarn review
```
### BUILD
_**NOTE:** When you run `build`, Babel will create a `build` directory. This is what your users
will interact with when they use your library. Nothing in `lib` gets shipped with your
published module._
Run once:
```
$ yarn build
```
Run the watch script:
```
$ yarn build:watch
```
_**NOTE:** the build script runs in the `prepublish` script just before you publish to npm._
## CONTRIBUTING
I am thankful for any contributions made by the community. By contributing you agree to abide by
the Code of Conduct in the [Contributing Guidelines](https://github.com/alanbsmith/input-validator-lib/blob/master/.github/CONTRIBUTING.md).
## LICENSE
[MIT](https://github.com/alanbsmith/input-validator-lib/blob/master/LICENSE)