Published
Edited
Jan 5, 2022
1 fork
Importers
2 stars
Insert cell
# Helpers
Insert cell
simpleTemplate = (f) => (strings, ...vals) => {
// took this template literal concatenator from https://observablehq.com/@shaunlebron/wasm#wasm
return f(strings.reduce((acc, str, i) => acc + vals[i - 1] + str));
}
Insert cell
testplate = simpleTemplate((c) => `hello ${c}`)
Insert cell
testplate`world`
Insert cell

Purpose-built for displays of data

Observable is your go-to platform for exploring data and creating expressive data visualizations. Use reactive JavaScript notebooks for prototyping and a collaborative canvas for visual data exploration and dashboard creation.
Learn more