项目作者: nonbili

项目描述 :
ES2015 template literals in PureScript
高级语言: PureScript
项目地址: git://github.com/nonbili/purescript-template-literals.git
创建时间: 2019-09-09T08:08:55Z
项目社区:https://github.com/nonbili/purescript-template-literals

开源协议:BSD 3-Clause "New" or "Revised" License

下载


purescript-template-literals

ES2015 template literals in PureScript

purescript-template-literals on Pursuit

In spago repl

  1. > import Data.TemplateLiteral
  2. > template "Hello, ${t}!" { t: Just "world" }
  3. "Hello, world!"
  4. > template "${obj.id} - ${obj.name}" { obj : { id: 1, name: "obj" } }
  5. "1 - obj"
  6. > template' "${text} - ${tr(text)}!" { text: "hello", tr: String.toUpper }
  7. "hello - HELLO"

Development

  1. yarn
  2. spago build -w
  3. yarn jest --watch