Skip to content

Commit 6f87677

Browse files
committed
Fix typos
1 parent d0fbec1 commit 6f87677

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ at Twitter.
2727
This project is [semantically versioned](https://semver.org) and if you want support in migrating between versions you can schedule us for training or support us through donations, so we can prioritize.
2828

2929
> [!CAUTION]
30-
> As of April 2025, old versions like v1 and v2 are still the most used, while they are deperecated for years -- they are also vulnerable to attacks if you are not implementing it properly. **Please upgrade!** We are here to help, and AI Editors & Agents could help a lot in such codemod-like migrations.
30+
> As of April 2025, old versions like v1 and v2 are still the most used, while they are deprecated for years -- they are also vulnerable to attacks if you are not implementing it properly. **Please upgrade!** We are here to help, and AI Editors & Agents could help a lot in such codemod-like migrations.
3131
3232
> [!TIP]
3333
> If you are starting a fresh project, you can check out the `formidable-mini` which is a super minimal version of Formidable (not quite configurable yet, but when it does it could become the basis for `formidable@v4`), using web standards like FormData API and File API, and you can use it to stream uploads directly to S3 or other such services.
@@ -322,7 +322,7 @@ See it's defaults in [src/Formidable.js DEFAULT_OPTIONS](./src/Formidable.js)
322322
extensions of the original files or not
323323
- `options.allowEmptyFiles` **{boolean}** - default `false`; allow upload empty
324324
files
325-
- `options.minFileSize` **{number}** - default `1` (1byte); the minium size of
325+
- `options.minFileSize` **{number}** - default `1` (1byte); the minimum size of
326326
uploaded file.
327327
- `options.maxFiles` **{number}** - default `Infinity`;
328328
limit the amount of uploaded files, set Infinity for unlimited

benchmark/server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// inital copy of with-http.js
1+
// initial copy of with-http.js
22
// made a copy so that examples can be changed without impacting tests
33
import http from 'node:http';
44
import slugify from '@sindresorhus/slugify';

examples/forceBuffer.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// warning: forcing file into a Buffer elminates the benefits of using streams and may cause memory overflow
1+
// warning: forcing file into a Buffer eliminates the benefits of using streams and may cause memory overflow
22
import http from 'node:http';
33
import { Buffer } from 'node:buffer'
44
import { Writable } from 'node:stream';
@@ -12,10 +12,10 @@ const server = http.createServer((req, res) => {
1212
const form = formidable({
1313
fileWriteStreamHandler: (file) => {
1414
const chunks = [];
15-
15+
1616
const writable = new Writable({
1717
write (chunk, enc, next) {
18-
chunks.push(chunk);
18+
chunks.push(chunk);
1919
next();
2020
},
2121
destroy() {

examples/with-http.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ const server = http.createServer((req, res) => {
2828
if (!originalFilename) {
2929
return 'invalid';
3030
}
31-
32-
// return 'yo.txt'; // or completly different name
31+
32+
// return 'yo.txt'; // or completely different name
3333
// return 'z/yo.txt'; // subdirectory
3434
return originalFilename.split("/").map((subdir) => {
3535
return slugify(subdir, {separator: ''}); // slugify to avoid invalid filenames
36-
}).join("/").substr(0, 100); // substr to define a maximum
36+
}).join("/").substr(0, 100); // substr to define a maximum
3737
},
3838
filter: function ({name, originalFilename, mimetype}) {
3939
return Boolean(originalFilename);

0 commit comments

Comments
 (0)