about summary refs log tree commit diff
path: root/app/javascript/glitch/util
diff options
context:
space:
mode:
authorkibigo! <marrus-sh@users.noreply.github.com>2017-07-13 03:26:08 -0700
committerkibigo! <marrus-sh@users.noreply.github.com>2017-07-13 03:26:08 -0700
commit35fda84ba830415a575b5f99f7405353ab8d3c93 (patch)
tree60f24d1b5c36605c8ed10c6c8b736c457cd1b9f9 /app/javascript/glitch/util
parent5770d461b21cf5b6a8adcaa44d19832e11289960 (diff)
Documentation pt. I
Diffstat (limited to 'app/javascript/glitch/util')
-rw-r--r--app/javascript/glitch/util/bio_metadata.js30
1 files changed, 30 insertions, 0 deletions
diff --git a/app/javascript/glitch/util/bio_metadata.js b/app/javascript/glitch/util/bio_metadata.js
index bdbb1750b..c5e87f356 100644
--- a/app/javascript/glitch/util/bio_metadata.js
+++ b/app/javascript/glitch/util/bio_metadata.js
@@ -1,3 +1,33 @@
+/*
+
+`util/bio_metadata`
+========================
+
+>   For more information on the contents of this file, please contact:
+>
+>   - kibigo! [@kibi@glitch.social]
+
+This file provides two functions for dealing with bio metadata. The
+functions are:
+
+ -  __`processBio(content)` :__
+    Processes `content` to extract any frontmatter. The returned
+    object has two properties: `text`, which contains the text of
+    `content` sans-frontmatter, and `metadata`, which is an array
+    of key-value pairs (in two-element array format). If no
+    frontmatter was provided in `content`, then `metadata` will be
+    an empty array.
+
+ -  __`createBio(note, data)` :__
+    Reverses the process in `processBio()`; takes a `note` and an
+    array of two-element arrays (which should give keys and values)
+    and outputs a string containing a well-formed bio with
+    frontmatter.
+
+*/
+
+                            /* * * * */
+
 /*********************************************************************\
 
                                        To my lovely code maintainers,