mirror of
https://github.com/facebook/docusaurus.git
synced 2025-06-02 19:03:38 +02:00
refactor: use js-yaml to parse both JSON and YAML (#5806)
This commit is contained in:
parent
9f13f8f7af
commit
1363a25819
6 changed files with 21 additions and 35 deletions
|
@ -313,7 +313,6 @@ export async function mapAsyncSequencial<T extends unknown, R extends unknown>(
|
|||
const results: R[] = [];
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
for (const t of array) {
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
const result = await action(t);
|
||||
results.push(result);
|
||||
}
|
||||
|
@ -326,7 +325,6 @@ export async function findAsyncSequential<T>(
|
|||
): Promise<T | undefined> {
|
||||
// eslint-disable-next-line no-restricted-syntax
|
||||
for (const t of array) {
|
||||
// eslint-disable-next-line no-await-in-loop
|
||||
if (await predicate(t)) {
|
||||
return t;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue