https://github.com/masa0902dev/csv-control-nodejs
https://github.com/masa0902dev/csv-control-nodejs
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/masa0902dev/csv-control-nodejs
- Owner: masa0902dev
- Created: 2024-04-04T07:01:19.000Z (about 2 years ago)
- Default Branch: dev
- Last Pushed: 2024-04-08T07:26:30.000Z (about 2 years ago)
- Last Synced: 2025-06-19T03:40:11.296Z (12 months ago)
- Language: JavaScript
- Size: 99.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## makeRandCSV()
You can make random csv files with below parameters.
It helps you check whether a system works correctly.
Be Careful: If the same name files already exist, these are overwritten.
- dir_path: directory path for generating csv files.
- length_per_line: the number of data for 1 line.
- nember_of_csvs: the number of csv files you generate.
- skip_row: the number of lines of header.
- max_column: the max number of column.
- max_value: the max value of each data.
## readAllLineCSV()
You can read all lines of 1 csv file excluded a header.
## readLastNLineCSV()
You can read last N lines of 1 csv file.
- If the csv file has a blank line in a last line, it is ignored.
## rmAllLastLineOfCSV()
You can remove a last line of csv files that exist in a specified directory path.
- If the csv files has a blank line in a last line, it is ignored.
## rmLastLineOfCSV()
You can remove a last line of a csv file you specified.
- If the csv file has a blank line in a last line, it is ignored.
## writeNewCSV()
You can write some data on a specified new csv file.
- If the csv file does not exist, a new file is generated and write data in. If the csv file exists, this function throws an error.
## appendInCSV()
You can append some data on a specified csv file.
- If the csv file does not exist, a new file is generated and write data in. If the csv file exists, appends the data.
- If the length of data you want to append is different from the length of a line in existing csv file, this function throws an error.