Skip to content

Commit ff8ccd9

Browse files
author
SianLouisa
committed
added badges with links for npm version, downloads and licence
1 parent a7c416d commit ff8ccd9

File tree

1 file changed

+16
-15
lines changed

1 file changed

+16
-15
lines changed

README.md

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
# gh-conf-validate
22

3+
[![npm (scoped)](https://img.shields.io/npm/v/@gh-conf/gh-conf-validate)](https://www.npmjs.com/package/@gh-conf/gh-conf-validate)
34
[![Build Status](https://travis-ci.com/gh-conf/gh-conf-validate.svg?branch=master)](https://travis-ci.com/gh-conf/gh-conf-validate)
45
[![Github Repo Size](https://img.shields.io/github/repo-size/gh-conf/gh-conf-validate.svg)](https://github.com/gh-conf/gh-conf-validate)
6+
[![npm](https://img.shields.io/npm/dt/@gh-conf/gh-conf-validate)](https://www.npmjs.com/package/@gh-conf/gh-conf-validate)
7+
[![GitHub](https://img.shields.io/github/license/gh-conf/gh-conf-validate)](https://github.com/gh-conf/gh-conf-validate/blob/master/LICENSE)
58
[![Contributors](https://img.shields.io/github/contributors/gh-conf/gh-conf-validate.svg)](https://github.com/gh-conf/gh-conf-validate/graphs/contributors)
69
[![Commit](https://img.shields.io/github/last-commit/gh-conf/gh-conf-validate.svg)](https://github.com/gh-conf/gh-conf-validate/commits/master)
710

@@ -23,31 +26,29 @@ $ npm install @gh-conf/gh-conf-validate
2326
## Usage
2427

2528
```javascript
26-
const { validatePath } = require('@gh-conf/gh-conf-validate');
29+
const { validatePath } = require("@gh-conf/gh-conf-validate");
2730

2831
// Valid path
29-
const isValid = validatePath('./gh-conf-validate');
32+
const isValid = validatePath("./gh-conf-validate");
3033
console.log(isValid);
3134
// Output
3235
// true
3336

34-
3537
// Invalid path
3638
try {
37-
validatePath()
39+
validatePath();
3840
} catch (err) {
39-
console.log(err);
40-
41-
// Output
42-
/**
43-
* {
44-
* status: 'err',
45-
* message: 'No path input',
46-
* data: {}
47-
* }
48-
**/
41+
console.log(err);
42+
43+
// Output
44+
/**
45+
* {
46+
* status: 'err',
47+
* message: 'No path input',
48+
* data: {}
49+
* }
50+
**/
4951
}
50-
5152
```
5253

5354
## Contributing

0 commit comments

Comments
 (0)