git ssb

16+

Dominic / patchbay



Tree: 0a50ea2f8ea043de9dac604adc0602cd504b2f25

Files: 0a50ea2f8ea043de9dac604adc0602cd504b2f25 / modules_extra / split.js

462 bytesRaw
1var h = require('hyperscript')
2
3//var screen_view =
4// require('../plugs').first(exports._screen_view = [])
5
6
7exports.needs = {
8 screen_view: 'first'
9}
10
11exports.gives = 'screen_view'
12
13exports.create = function (api) {
14
15 return function (path) {
16 var m = /^split\s*\((.*)\)$/.exec(path)
17 if(!m)
18 return
19
20 return h('div.row',
21 m[1].split(',').map(function (e) {
22 return api.screen_view(e.trim())
23 }).filter(Boolean)
24 )
25 }
26
27}
28

Built with git-ssb-web