Snippet format update
To match the starter (for the migration)
This commit is contained in:
@ -1,4 +1,7 @@
|
||||
### CSVToArray
|
||||
---
|
||||
title: CSVToArray
|
||||
tags: string,array,utility,intermediate
|
||||
---
|
||||
|
||||
Converts a comma-separated values (CSV) string to a 2D array.
|
||||
|
||||
@ -19,4 +22,4 @@ const CSVToArray = (data, delimiter = ',', omitFirstRow = false) =>
|
||||
CSVToArray('a,b\nc,d'); // [['a','b'],['c','d']];
|
||||
CSVToArray('a;b\nc;d', ';'); // [['a','b'],['c','d']];
|
||||
CSVToArray('col1,col2\na,b\nc,d', ',', true); // [['a','b'],['c','d']];
|
||||
```
|
||||
```
|
||||
Reference in New Issue
Block a user