git ssb

1+

dinoworm ๐Ÿ› / catstack



Tree: 49c6e5459b68f2a30bcecf7727b8c9a99cfe4e79

Files: 49c6e5459b68f2a30bcecf7727b8c9a99cfe4e79 / lib / scopeModule.js

313 bytesRaw
1const { basename, dirname, sep } = require('path')
2const assign = require('object-assign')
3
4module.exports = (definition, { filename }) => {
5 const scope = dirname(filename).split(sep).slice(0, 1)
6
7 return assign({}, definition, {
8 create: (api) => assign({
9 scope
10 }, definition.create(api))
11 })
12}
13

Built with git-ssb-web