« get me outta code hell

initial prettier/eslint commit - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/util/io.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2022-06-26 16:41:09 -0300
committer(quasar) nebula <qznebula@protonmail.com>2022-06-26 16:41:09 -0300
commit4075254c9e38be6741527e1fb535eed444e6ad08 (patch)
tree38c03dcb93b3a53d316b86ed9fcfc46250da208f /src/util/io.js
parent0746b3a494cee55dbf90466859691c93dd8b2ca2 (diff)
initial prettier/eslint commit
Diffstat (limited to 'src/util/io.js')
-rw-r--r--src/util/io.js18
1 files changed, 9 insertions, 9 deletions
diff --git a/src/util/io.js b/src/util/io.js
index 1d74399..c17e263 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));
 }