Skip to content

Commit

Permalink
- Added .d.ts file
Browse files Browse the repository at this point in the history
- Added working example in demo-ts
- Fixed README for headerError and uniqueError
  • Loading branch information
igors-levkovs committed Aug 19, 2021
1 parent e50646d commit e42eee3
Show file tree
Hide file tree
Showing 19 changed files with 14,412 additions and 15 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ node_modules
coverage
.DS_Store
demo/node_modules
demo-ts/node_modules
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ Makes column optional. If true column value will be return
Type: `Function` <br>

If a header name is omitted or is not the same as in config *name* headerError function will be called with arguments
**headerName**
**headerValue, headerName, rowNumber, columnNumber**

### required
Type: `Boolean` <br>
Expand All @@ -92,7 +92,7 @@ If it is true all header (title) column values will be checked for uniqueness
### uniqueError
Type: `Function` <br>

If one of the header value is not unique uniqueError function will be called with argument **headerName**
If one of the header value is not unique uniqueError function will be called with argument **headerName, rowNumber**

### validate
Type: `Function` <br>
Expand Down
4 changes: 4 additions & 0 deletions demo-ts/demo.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
First Name;Last Name;Email;Password;Roles
Vasyl;Stokolosa;api01@test.com;123;admin, manager
Vasyl_2;Stokolosa_2;api01@test.com;123123123;admin, manager, user
;Stokolosa_2;api@test;123123123;admin, manager, user
Binary file added demo-ts/demo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit e42eee3

Please sign in to comment.