nonbili / purescript-template-literals

ES2015 template literals in PureScript

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

purescript-template-literals

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

About

ES2015 template literals in PureScript

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:PureScript 66.7%Language:JavaScript 18.7%Language:Dhall 14.6%