Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
64 lines (47 sloc) 1.24 KB

purescript-bouzuya-string-case

Bouzuya.String.Case module

Usage

import Bouzuya.String.Case as Case
import Data.Foldable as Foldable
import Test.Unit (TestSuite)
import Test.Unit as TestUnit
import Test.Unit.Assert as Assert

tests :: TestSuite
tests = TestUnit.suite "Case" do
  TestUnit.test "examples" do
    Foldable.for_ ["foo-bar", "foo_bar", "fooBar", "FooBar"] \s -> do
      Assert.equal "fooBar" (Case.camelCase s)
      Assert.equal "foo-bar" (Case.kebabCase s)
      Assert.equal "FooBar" (Case.pascalCase s)
      Assert.equal "foo_bar" (Case.snakeCase s)

See test/Bouzuya/String/Case.purs

Installation

packages.dhall

let additions = {=} //
      { bouzuya-string-case =
          mkPackage
          [ "arrays"
          , "prelude"
          , "strings"
          ]
          "https://github.com/bouzuya/purescript-bouzuya-string-case.git"
          "v0.1.0"
      }
spago install bouzuya-string-case

How to build

npm install

License

MIT

Author

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

You can’t perform that action at this time.