File tree Expand file tree Collapse file tree 1 file changed +16
-15
lines changed Expand file tree Collapse file tree 1 file changed +16
-15
lines changed Original file line number Diff line number Diff line change 1
1
# gh-conf-validate
2
2
3
+ [ ![ npm (scoped)] ( https://img.shields.io/npm/v/@gh-conf/gh-conf-validate )] ( https://www.npmjs.com/package/@gh-conf/gh-conf-validate )
3
4
[ ![ Build Status] ( https://travis-ci.com/gh-conf/gh-conf-validate.svg?branch=master )] ( https://travis-ci.com/gh-conf/gh-conf-validate )
4
5
[ ![ 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 )
5
8
[ ![ Contributors] ( https://img.shields.io/github/contributors/gh-conf/gh-conf-validate.svg )] ( https://github.com/gh-conf/gh-conf-validate/graphs/contributors )
6
9
[ ![ Commit] ( https://img.shields.io/github/last-commit/gh-conf/gh-conf-validate.svg )] ( https://github.com/gh-conf/gh-conf-validate/commits/master )
7
10
@@ -23,31 +26,29 @@ $ npm install @gh-conf/gh-conf-validate
23
26
## Usage
24
27
25
28
``` javascript
26
- const { validatePath } = require (' @gh-conf/gh-conf-validate' );
29
+ const { validatePath } = require (" @gh-conf/gh-conf-validate" );
27
30
28
31
// Valid path
29
- const isValid = validatePath (' ./gh-conf-validate' );
32
+ const isValid = validatePath (" ./gh-conf-validate" );
30
33
console .log (isValid);
31
34
// Output
32
35
// true
33
36
34
-
35
37
// Invalid path
36
38
try {
37
- validatePath ()
39
+ validatePath ();
38
40
} 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
+ **/
49
51
}
50
-
51
52
```
52
53
53
54
## Contributing
You can’t perform that action at this time.
0 commit comments