Skip to content

Instantly share code, notes, and snippets.

Avatar

Jorge Bucaran jorgebucaran

View GitHub Profile
View colors.js
const format = (open, close) => (s) => open + s + close
export const reset = format("\x1B[0m", "\x1B[0m")
export const bold = format("\x1B[1m", "\x1B[22m")
export const dim = format("\x1B[2m", "\x1B[22m")
export const italic = format("\x1B[3m", "\x1B[23m")
export const underline = format("\x1B[4m", "\x1B[24m")
export const inverse = format("\x1B[7m", "\x1B[27m")
export const hidden = format("\x1B[8m", "\x1B[28m")
export const strikethrough = format("\x1B[9m", "\x1B[29m")
@jorgebucaran
jorgebucaran / index.html
Last active Jul 14, 2020
Getting started with Hyperapp
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<script type="module">
import { h, text, app } from "https://unpkg.com/hyperapp"
app({
init: () => 0,
view: state =>
h("main", {}, [