« get me outta code hell

finish up cosmetic style changes - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/util/urls.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2022-11-26 23:44:08 -0400
committer(quasar) nebula <qznebula@protonmail.com>2022-11-26 23:44:08 -0400
commit003f594f6348b55109dd66416e75fcc2a88faade (patch)
treeb4cb05ed4e145e604356786a1d98926040fe5ff0 /src/util/urls.js
parent768927503b5948b846b9a6cddf4b788ca9792e8c (diff)
finish up cosmetic style changes
Diffstat (limited to 'src/util/urls.js')
-rw-r--r--src/util/urls.js19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/util/urls.js b/src/util/urls.js
index d86c047d..1f9cd9c0 100644
--- a/src/util/urls.js
+++ b/src/util/urls.js
@@ -1,5 +1,3 @@
-/** @format */
-
 // Code that deals with URLs (really the pathnames that get referenced all
 // throughout the gener8ted HTML). Most nota8ly here is generateURLs, which
 // is in charge of pre-gener8ting a complete network of template strings
@@ -28,9 +26,7 @@ export function generateURLs(urlSpec) {
     const group = obj[groupKey];
 
     if (!Object.hasOwn(group, subKey)) {
-      throw new Error(
-        `Expected valid subkey (got ${subKey} for group ${groupKey})`
-      );
+      throw new Error(`Expected valid subkey (got ${subKey} for group ${groupKey})`);
     }
 
     return {
@@ -47,9 +43,8 @@ export function generateURLs(urlSpec) {
   const generateTo = (fromPath, fromGroup) => {
     const A = trimLeadingSlash(fromPath);
 
-    const rebasePrefix = '../'.repeat(
-      (fromGroup.prefix || '').split('/').filter(Boolean).length
-    );
+    const rebasePrefix = '../'
+      .repeat((fromGroup.prefix || '').split('/').filter(Boolean).length);
 
     const pathHelper = (toPath, toGroup) => {
       let B = trimLeadingSlash(toPath);
@@ -117,14 +112,14 @@ export function generateURLs(urlSpec) {
   };
 
   const generateFrom = () => {
-    const map = withEntries(urlSpec, (entries) =>
-      entries.map(([key, group]) => [
+    const map = withEntries(
+      urlSpec,
+      (entries) => entries.map(([key, group]) => [
         key,
         withEntries(group.paths, (entries) =>
           entries.map(([key, path]) => [key, generateTo(path, group)])
         ),
-      ])
-    );
+      ]));
 
     const from = (key) => getValueForFullKey(map, key).value;