From 39a74a61775e78f4ddeb9592b4d90148f2133d6f Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Sun, 25 Oct 2020 01:20:20 +0200 Subject: [PATCH] Automatically generate service provider data --- src/serviceproviders.js | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/src/serviceproviders.js b/src/serviceproviders.js index 7f8d4de..09ee81b 100644 --- a/src/serviceproviders.js +++ b/src/serviceproviders.js @@ -21,13 +21,10 @@ const list = [ 'lobsters', ] -const data = { - dns: require('./serviceproviders/dns'), - xmpp: require('./serviceproviders/xmpp'), - twitter: require('./serviceproviders/twitter'), - hackernews: require('./serviceproviders/hackernews'), - lobsters: require('./serviceproviders/lobsters'), -} +const data = {} +list.forEach((item, i) => { + data[item] = require(`./serviceproviders/${item}`) +}) const match = (uri, opts) => { let matches = [], sp