Skip to content

Commit 13e1576

Browse files
authored
chore(csv-parse): fix typos (#470)
1 parent bf77241 commit 13e1576

19 files changed

+26
-26
lines changed

packages/csv-parse/CHANGELOG.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ See also [CSV package for Node.js version 6 (11/15/2021)](https://www.adaltas.co
320320

321321
## Version 4.16.0
322322

323-
- fix: info print the number of encountered line when emited
323+
- fix: info print the number of encountered line when emitted
324324
- feat: cast expose context.empty_lines
325325
- fix: handle empty column names properly
326326
- feat: enforce usage of columns with columns_duplicates_to_array
@@ -430,7 +430,7 @@ New feature:
430430

431431
Project management:
432432

433-
- samples: new file recipie
433+
- samples: new file recipe
434434

435435
## Version 4.9.1
436436

packages/csv-parse/lib/api/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -306,7 +306,7 @@ const transform = function (original_options = {}) {
306306
this.info.comment_lines++;
307307
// Skip full comment line
308308
} else {
309-
// Activate records emition if above from_line
309+
// Activate records emission if above from_line
310310
if (
311311
this.state.enabled === false &&
312312
this.info.lines +

packages/csv-parse/lib/index.d.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ export interface Info {
5656

5757
export interface InfoCallback extends Info {
5858
/**
59-
* Normalized verion of `options.columns` when `options.columns` is true, boolean otherwise.
59+
* Normalized version of `options.columns` when `options.columns` is true, boolean otherwise.
6060
*/
6161
readonly columns: boolean | { name: string }[] | { disabled: true }[];
6262
}
@@ -178,7 +178,7 @@ export interface OptionsNormalized<T = string[]> {
178178
*/
179179
ltrim: boolean;
180180
/**
181-
* Maximum numer of characters to be contained in the field and line buffers before an exception is raised,
181+
* Maximum number of characters to be contained in the field and line buffers before an exception is raised,
182182
* used to guard against a wrong delimiter or record_delimiter,
183183
* default to 128000 characters.
184184
*/
@@ -353,7 +353,7 @@ export interface Options<T = string[]> {
353353
*/
354354
ltrim?: boolean | null;
355355
/**
356-
* Maximum numer of characters to be contained in the field and line buffers before an exception is raised,
356+
* Maximum number of characters to be contained in the field and line buffers before an exception is raised,
357357
* used to guard against a wrong delimiter or record_delimiter,
358358
* default to 128000 characters.
359359
*/
@@ -369,7 +369,7 @@ export interface Options<T = string[]> {
369369
on_record?: (record: T, context: InfoRecord) => T | null | undefined;
370370
onRecord?: (record: T, context: InfoRecord) => T | null | undefined;
371371
/**
372-
* Function called when an error occured if the `skip_records_with_error`
372+
* Function called when an error occurred if the `skip_records_with_error`
373373
* option is activated.
374374
*/
375375
on_skip?: (err: CsvError | undefined, raw: string | undefined) => undefined;

packages/csv-parse/lib/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ const parse = function () {
124124
parser.write(data);
125125
parser.end();
126126
};
127-
// Support Deno, Rollup doesnt provide a shim for setImmediate
127+
// Support Deno, Rollup doesn't provide a shim for setImmediate
128128
if (typeof setImmediate === "function") {
129129
setImmediate(writer);
130130
} else {

packages/csv-parse/samples/async.iterator.coffee

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { parse } from 'csv-parse'
99
high_water_mark: 64 * 64
1010
length: 1000
1111
).pipe parse()
12-
# Intialise count
12+
# Initialise count
1313
count = 0
1414
# Report start
1515
process.stdout.write 'start\n'

packages/csv-parse/samples/async.iterator.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { parse } from "csv-parse";
88
high_water_mark: 64 * 64,
99
length: 100,
1010
}).pipe(parse());
11-
// Intialise count
11+
// Initialise count
1212
let count = 0;
1313
// Report start
1414
process.stdout.write("start\n");

packages/csv-parse/samples/option.cast.context.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const data = dedent`
77
2050-11-27,date2
88
`;
99
const records = parse(data, {
10-
// The cast option exect a function which
10+
// The cast option expect a function which
1111
// is called with two arguments,
1212
// the parsed value and a context object
1313
cast: function (value, context) {

packages/csv-parse/samples/option.cast.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const data = dedent`
77
4,5,6
88
`;
99
const records = parse(data, {
10-
// The cast option exect a function which
10+
// The cast option expect a function which
1111
// is called with two arguments,
1212
// the parsed value and a context object
1313
cast: function (value, context) {

packages/csv-parse/test/api.assert_error.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,9 +96,9 @@ describe("API assert_error", function () {
9696
(() => {
9797
assert_error(err, {
9898
code: "CSV_UNKNOWN_ERROR",
99-
message: "Another mesage",
99+
message: "Another message",
100100
});
101-
}).should.throw("expected 'A message' to equal 'Another mesage'");
101+
}).should.throw("expected 'A message' to equal 'Another message'");
102102
});
103103

104104
it("validate a null value", function () {

packages/csv-parse/test/api.stream.destroy.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ describe("API destroy", function () {
2525
next();
2626
});
2727
parser.on("end", () => {
28-
next(Error("End event shouldnt be called"));
28+
next(Error("End event shouldn't be called"));
2929
});
3030
// Note, removing =nextTick trigger both the error and end events
3131
process.nextTick(() => {
@@ -48,14 +48,14 @@ describe("API destroy", function () {
4848
next();
4949
});
5050
parser.on("end", () => {
51-
next(Error("End event shouldnt be called"));
51+
next(Error("End event shouldn't be called"));
5252
});
5353
fs.createReadStream(`${os.tmpdir()}/data.csv`).pipe(parser);
5454
});
5555
});
5656

5757
it("inside readable with generator input stream", function (next) {
58-
// csv-generate emit data synchronously, it cant detect error on time
58+
// csv-generate emit data synchronously, it can't detect error on time
5959
const parser = parse() as Parser & ParserPrivate;
6060
parser.on("readable", function () {
6161
while (parser.read()) {

0 commit comments

Comments
 (0)