From 4075254c9e38be6741527e1fb535eed444e6ad08 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Sun, 26 Jun 2022 16:41:09 -0300 Subject: initial prettier/eslint commit --- src/util/io.js | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/util/io.js') diff --git a/src/util/io.js b/src/util/io.js index 1d74399f..c17e2633 100644 --- a/src/util/io.js +++ b/src/util/io.js @@ -1,14 +1,14 @@ // Utility functions for interacting with files and other external data // interfacey constructs. -import { readdir } from 'fs/promises'; -import * as path from 'path'; +import { readdir } from "fs/promises"; +import * as path from "path"; -export async function findFiles(dataPath, { - filter = f => true, - joinParentDirectory = true, -} = {}) { - return (await readdir(dataPath)) - .filter(file => filter(file)) - .map(file => joinParentDirectory ? path.join(dataPath, file) : file); +export async function findFiles( + dataPath, + { filter = (f) => true, joinParentDirectory = true } = {} +) { + return (await readdir(dataPath)) + .filter((file) => filter(file)) + .map((file) => (joinParentDirectory ? path.join(dataPath, file) : file)); } -- cgit 1.3.0-6-gf8a5