Skip to content
This repository has been archived by the owner on Oct 10, 2020. It is now read-only.

bouzuya/purescript-bouzuya-template-string

Repository files navigation

purescript-bouzuya-template-string

Bouzuya.TemplateString module

Usage

import Bouzuya.TemplateString as TemplateString
import Data.Tuple (Tuple(..))
import Foreign.Object as Object
import Test.Unit (TestSuite)
import Test.Unit as TestUnit
import Test.Unit.Assert as Assert

tests :: TestSuite
tests = TestUnit.suite "Bouzuya.TemplateString" do
  TestUnit.test "template" do
    let
      obj1 =
        Object.fromFoldable
          [ Tuple "foo" "FOO"
          , Tuple "bar" "BAR"
          -- baz is nothing
          ]
    Assert.equal "FOOBAR" (TemplateString.template "{{foo}}{{bar}}{{baz}}" obj1)

See: test/Bouzuya/TemplateString.purs.

Note

packages.dhall

let additions = {=} //
      { bouzuya-template-string =
          mkPackage
          [ "arrays"
          , "either"
          , "foreign-object"
          , "maybe"
          , "partial"
          , "prelude"
          , "strings"
          ]
          "https://github.com/bouzuya/purescript-bouzuya-template-string.git"
          "v1.0.0"
      }

How to build

npm install

License

MIT

Author

bouzuya <m@bouzuya.net> (https://bouzuya.net/)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published