aboutsummaryrefslogtreecommitdiff
path: root/lib/util.js
diff options
context:
space:
mode:
authorcel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-05-30 10:31:38 -1000
committercel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519>2017-05-30 10:46:41 -1000
commit04e050fadf375a002f0bb294bab795a4f9389e42 (patch)
tree8e606b19cbbab74a7d5d2e42413189b38da8ef85 /lib/util.js
parentcb3aa7e2332964780e817185c05d6f98870496d7 (diff)
downloadpatchfoo-04e050fadf375a002f0bb294bab795a4f9389e42.tar.gz
patchfoo-04e050fadf375a002f0bb294bab795a4f9389e42.zip
Show warning if blob or emoji is large
Diffstat (limited to 'lib/util.js')
-rw-r--r--lib/util.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/util.js b/lib/util.js
index f8da640..a5f14f5 100644
--- a/lib/util.js
+++ b/lib/util.js
@@ -79,6 +79,10 @@ u.fromArray = function (arr) {
return Array.isArray(arr) && arr.length === 1 ? arr[0] : arr
}
+u.toLinkArray = function (x) {
+ return u.toArray(x).map(u.toLink).filter(u.linkDest)
+}
+
u.renderError = function(err) {
return h('div.error',
h('h3', err.name),