git ssb

16+

Dominic / patchbay



Tree: 2d80ace8ef63530006b28f25f53eb7577cb929c6

Files: 2d80ace8ef63530006b28f25f53eb7577cb929c6 / 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