Skip to content

Commit c7414fb

Browse files
committed
Rename parallelForEach to parallelEach
1 parent 52b7978 commit c7414fb

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

registry/lib/streams.d.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ declare type AnyIterable<T> =
77
| AsyncIterable<T>
88
| NodeJS.ReadableStream
99
declare const Streams: {
10-
parallelForEach<T>(
10+
parallelEach<T>(
1111
iterable: AnyIterable<T>,
1212
func: (data: T) => Promise<void>,
1313
options?: sIterationOptions | undefined

registry/lib/streams.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ function getStreamingIterables() {
1515
}
1616

1717
/*@__NO_SIDE_EFFECTS__*/
18-
async function parallelForEach(iterable, func, options) {
18+
async function parallelEach(iterable, func, options) {
1919
for await (const _ of parallelMap(iterable, func, options)) {
2020
/* empty block */
2121
}
@@ -52,7 +52,7 @@ function transform(iterable, func, options) {
5252
}
5353

5454
module.exports = {
55-
parallelForEach,
55+
parallelEach,
5656
parallelMap,
5757
transform
5858
}

scripts/update-licenses.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ const fs = require('node:fs/promises')
44

55
const constants = require('@socketregistry/scripts/constants')
66
const { globStreamLicenses } = require('@socketsecurity/registry/lib/globs')
7-
const { parallelForEach } = require('@socketsecurity/registry/lib/streams')
7+
const { parallelEach } = require('@socketsecurity/registry/lib/streams')
88

99
const { LICENSE, LICENSE_CONTENT, UTF8, ignoreGlobs, rootPath } = constants
1010

@@ -14,7 +14,7 @@ void (async () => {
1414
ignoreOriginals: true,
1515
ignore: [LICENSE, 'scripts/templates', ...ignoreGlobs]
1616
})
17-
await parallelForEach(
17+
await parallelEach(
1818
stream,
1919
licensePath => fs.writeFile(licensePath, LICENSE_CONTENT, UTF8),
2020
{ concurrency: 8 }

0 commit comments

Comments
 (0)