diff --git a/docs/csvtojson-v2.md b/docs/csvtojson-v2.md index d2cab17..7fefdd4 100644 --- a/docs/csvtojson-v2.md +++ b/docs/csvtojson-v2.md @@ -64,7 +64,7 @@ csv() csv() .fromFile(csvFilePath) .subscribe((json,lineNumber)=>{ - // process the json line in synchronouse. + // process the json line in synchronous. },onError, onComplete) ``` @@ -194,7 +194,7 @@ const jsonArray=await csv().fromString(myCSV); // async /await Worker feature makes sense to Command Line where it could utilize multiple CPU cores to speed up processing large csv file. However, it does not quite work as expected mainly because cooperation of multiple processes' result is very complex. Also the inter process communication adds too much overhead which minimize the benefit gained from spawning workers. -Thus in verions `2.0.0` I decided to temporarily remove `Worker` feature and will re-think how to better utilize multiple CPU Cores. +Thus in version `2.0.0` I decided to temporarily remove `Worker` feature and will re-think how to better utilize multiple CPU Cores. ## fromFile / fromStream / fromString will not accept callback. Use `.then` instead @@ -273,9 +273,9 @@ csv() csv() .preRawData((csvRawData)=>{ var newData=csvRawData.replace('some value','another value') - // synchronouse + // synchronous return newData; - // or asynchronousely + // or asynchronously return Promise.resolve(newData); }) ``` diff --git a/readme.md b/readme.md index 8fff914..9596eaf 100644 --- a/readme.md +++ b/readme.md @@ -7,7 +7,7 @@ `csvtojson` module is a comprehensive nodejs csv parser to convert csv to json or column arrays. It can be used as node.js library / command line tool / or in browser. Below are some features: -* Strictly follow CSV definition [RF4180](https://www.loc.gov/preservation/digital/formats/fdd/fdd000323.shtml) +* Strictly follow CSV definition [RFC4180](https://www.loc.gov/preservation/digital/formats/fdd/fdd000323.shtml) * Work with millions of lines of CSV data * Provide comprehensive parsing parameters * Provide out of box CSV parsing tool for Command Line @@ -342,7 +342,7 @@ the hook -- `preRawData` will be called with csv string passed to parser. ```js const csv=require('csvtojson') -// synchronouse +// synchronous csv() .preRawData((csvRawData)=>{ var newData=csvRawData.replace('some value','another value'); @@ -366,7 +366,7 @@ The function is called each time a file line has been parsed in csv stream. The ```js const csv=require('csvtojson') -// synchronouse +// synchronous csv() .preFileLine((fileLineString, lineIdx)=>{ if (lineIdx === 2){ @@ -529,7 +529,7 @@ There are currently following built-in parser: * number: Convert value to number * omit: omit the whole column -This will override types infered from `checkType:true` parameter. More built-in parsers will be added as requested in [issues page](https://github.com/Keyang/node-csvtojson/issues). +This will override types inferred from `checkType:true` parameter. More built-in parsers will be added as requested in [issues page](https://github.com/Keyang/node-csvtojson/issues). Example: