This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const express = require('express'); | |
const viperhtml = require('viperhtml'); | |
const app = express(); | |
const port = 3000; | |
const render = viperhtml.wire(); | |
app.get('/', (req, res) => { | |
const model = { | |
name: 'Morgan', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"contentBlocks": [ | |
{ | |
"key": "22lg9", | |
"type": "unstyled", | |
"text": "Bold text, Italic text\n", | |
"characterList": [ | |
{ | |
"style": [ | |
"BOLD" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | |
const condition = (...args) => (val) => { | |
let result = args.filter((pair) => { | |
if(pair[0] === val) return true; | |
return false; | |
}) | |
return result.length !==0 ? result[0][1] : undefined; | |
} | |