git ssb

1+

dinoworm ๐Ÿ› / catstack



Tree: dd64a0d510ecc727cffa7698d15154b14189b73c

Files: dd64a0d510ecc727cffa7698d15154b14189b73c / app / services / index.js

431 bytesRaw
1const fs = require('fs')
2const { map, filter, invoker, zip } = require('ramda')
3const { join, basename } = require('path')
4
5const serviceCreatorNames = filter(
6 (name) => name !== 'index',
7 map(
8 basename,
9 fs.readdirSync(__dirname)
10 )
11)
12
13const serviceCreators = zip(
14 serviceCreatorNames,
15 map(
16 (name) => {
17 require(join(__dirname, name))
18 },
19 serviceCreatorNames
20 )
21)
22
23module.exports = serviceCreators
24

Built with git-ssb-web