Delimiter-isolated values API
The delimiter can be defined as multiple character sequences used to describe the boundary among independent, separate regions inside the simple text or other data. Any field delimiter can be an order of comma-isolated values. However delimiter-isolated values are CSV (Comma Separated Values) or TSV (Tab Separated Values). This division will let us know about the delimiter isolated values.
Configuring API
The following syntax can be used for loading the API:
Methods of API
The various delimiter-isolated values API methods are discussed and explained below:
1. csvParse(string[, row])
It is applied to parse a format of CSV file. Let’s take a file info.csv, i.e., depicted below:
The above can be used in other functions like given below:
It parses a described string inside the delimiter-isolated values. It will return the object’s array illustrating a parsed row.
2. csvParseRows(string[, row])
It can be applied to parse a format of CSV file equal to rows.
Look at the following code:
It will parse all the rows inside a CSV file.
3. csvFormat(rows[, columns])
It is applied to format some columns and rows of a CSV file.
In case, no column is defined, the column name’s list that will form any header row can be defined through all the property’s union over every object inside the row. While in other cases, it is the string’s array that illustrates the names of a column.
4. csvFormatRows(rows)
It is applied to format any CSV rows. It is explained below:
The above code can format the described string row’s array like the delimiter-isolated values, and return the string.
5. tsvParse(string[, row])
It is applied to parse any tsv format. It is the same as the csvParse.
6. tsvParseRows(string[, row])
It is applied to parse any tsv format similar to the rows. It is the same as a function called csvParseRows.
7. tsvFormat(rows[, columns])
It is applied to format both the tsv columns and rows.
8. tsvFormatRows(rows)
It is applied to format any tsv rows only.