Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/Bouzuya
test
.gitignore
.travis.yml
LICENSE
README.md
package-lock.json
package.json
packages.dhall
spago.dhall

README.md

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/)

You can’t perform that action at this time.