Package

purescript-template-literals

Repository
nonbili/purescript-template-literals
License
BSD-3-Clause
Uploaded by
rnons
Published on
2019-09-11T03:49:39Z

ES2015 template literals in PureScript

purescript-template-literals on Pursuit

In spago repl

> import Data.TemplateLiteral
> template "Hello, ${t}!" { t: Just "world" }
"Hello, world!"

> template "${obj.id} - ${obj.name}" { obj : { id: 1, name: "obj" } }
"1 - obj"

> template' "${text} - ${tr(text)}!" { text: "hello", tr: String.toUpper }
"hello - HELLO"

Development

yarn
spago build -w
yarn jest --watch