Skip to content

Commit 493ec88

Browse files
authored
fix: Spelling (#897)
by: Josh Soref
1 parent e060e3f commit 493ec88

16 files changed

+30
-30
lines changed

.eslintrc.cjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ const ignoredProps = bestPractices.rules[
1818
'cfg',
1919
);
2020

21-
// Additional rules that are specific and overiding previous
21+
// Additional rules that are specific and overriding previous
2222
const additionalChanges = {
2323
strict: 'off',
2424

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ at Twitter.
2020

2121
[![Conventional Commits][ccommits-img]][ccommits-url]
2222
[![Minimum Required Nodejs][nodejs-img]][npmv-url]
23-
[![Tidelift Subcsription][tidelift-img]][tidelift-url]
23+
[![Tidelift Subscription][tidelift-img]][tidelift-url]
2424
[![Buy me a Kofi][kofi-img]][kofi-url]
2525
[![Renovate App Status][renovateapp-img]][renovateapp-url]
2626
[![Make A Pull Request][prs-welcome-img]][prs-welcome-url]
@@ -491,7 +491,7 @@ form.on('data', ({ name, key, value, buffer, start, end, formname, ...more }) =>
491491
### .use(plugin: Plugin)
492492

493493
A method that allows you to extend the Formidable library. By default we include
494-
4 plugins, which esentially are adapters to plug the different built-in parsers.
494+
4 plugins, which essentially are adapters to plug the different built-in parsers.
495495

496496
**The plugins added by this method are always enabled.**
497497

@@ -648,7 +648,7 @@ form.on('fileBegin', (formName, file) => {
648648
// formName the name in the form (<input name="thisname" type="file">) or http filename for octetstream
649649
// file.originalFilename http filename or null if there was a parsing error
650650
// file.newFilename generated hexoid or what options.filename returned
651-
// file.filepath default pathnme as per options.uploadDir and options.filename
651+
// file.filepath default pathname as per options.uploadDir and options.filename
652652
// file.filepath = CUSTOM_PATH // to change the final path
653653
});
654654
```

examples/json.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ const server = http.createServer((req, res) => {
3434
});
3535

3636
server.listen(PORT, () => {
37-
const choosenPort = server.address().port;
38-
console.log(`Listening on http://localhost:${choosenPort}/`);
37+
const chosenPort = server.address().port;
38+
console.log(`Listening on http://localhost:${chosenPort}/`);
3939

4040
const body = JSON.stringify({
4141
numbers: [1, 2, 3, 4, 5],
@@ -46,7 +46,7 @@ server.listen(PORT, () => {
4646
{
4747
host: 'localhost',
4848
path: '/',
49-
port: choosenPort,
49+
port: chosenPort,
5050
method: 'POST',
5151
headers: {
5252
'Content-Type': 'application/json',

examples/multiples.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ const server = http.createServer((req, res) => {
2020
<label>file html array0<input type="file" name="filearray[]" /></label><br />
2121
<label>file html array1<input type="file" name="filearray[]" /></label><br />
2222
23-
<label>file html array and mulitple0<input type="file" name="filearray_with_multiple[]" multiple /></label><br />
24-
<label>file html array and mulitple1<input type="file" name="filearray_with_multiple[]" multiple /></label><br />
23+
<label>file html array and multiple0<input type="file" name="filearray_with_multiple[]" multiple /></label><br />
24+
<label>file html array and multiple1<input type="file" name="filearray_with_multiple[]" multiple /></label><br />
2525
<br />
2626
<button>Upload</button>
2727
</form>

examples/with-http.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ const server = http.createServer((req, res) => {
2121
// slugify to avoid invalid filenames
2222
// substr to define a maximum
2323
return `${slugify(name)}.${slugify(ext, {separator: ''})}`.substr(0, 100);
24-
// return 'yo.txt'; // or completly different name
24+
// return 'yo.txt'; // or completely different name
2525
// return 'z/yo.txt'; // subdirectory
2626
},
2727
// filter: function ({name, originalFilename, mimetype}) {

src/Formidable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,7 @@ class IncomingForm extends EventEmitter {
359359
if (!this.options.allowEmptyFiles && fileSize === 0) {
360360
this._error(
361361
new FormidableError(
362-
`options.allowEmptyFiles is false, file size should be greather than 0`,
362+
`options.allowEmptyFiles is false, file size should be greater than 0`,
363363
errors.noEmptyFiles,
364364
400,
365365
),

src/parsers/Multipart.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -237,7 +237,7 @@ class MultipartParser extends Transform {
237237
prevIndex = index;
238238

239239
if (index === 0) {
240-
// boyer-moore derrived algorithm to safely skip non-boundary data
240+
// boyer-moore derived algorithm to safely skip non-boundary data
241241
i += boundaryEnd;
242242
while (i < this.bufferLength && !(buffer[i] in boundaryChars)) {
243243
i += boundaryLength;

src/plugins/multipart.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ function createInitMultipart(boundary) {
124124
/*
125125
four bytes (chars) in base64 converts to three bytes in binary
126126
encoding. So we should always work with a number of bytes that
127-
can be divided by 4, it will result in a number of buytes that
127+
can be divided by 4, it will result in a number of bytes that
128128
can be divided vy 3.
129129
*/
130130
const offset = parseInt(part.transferBuffer.length / 4, 10) * 4;

test/integration/fixtures.test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ test('fixtures', (done) => {
9797
function callback(...args) {
9898
const realCallback = cb;
9999
// eslint-disable-next-line no-param-reassign
100-
cb = function calbackFn() {};
100+
cb = function callbackFn() {};
101101

102102
realCallback(...args);
103103
}

test/standalone/connection-aborted.test.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,9 @@ test('connection aborted', (done) => {
3232
});
3333

3434
server.listen(PORT, 'localhost', () => {
35-
const choosenPort = server.address().port;
35+
const chosenPort = server.address().port;
3636

37-
const client = connect(choosenPort);
37+
const client = connect(chosenPort);
3838

3939
client.write(
4040
'POST / HTTP/1.1\r\n' +

0 commit comments

Comments
 (0)