Skip to content
PureScript `Bouzuya.String.Case` module
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/String
test
.gitignore
.travis.yml
LICENSE
README.md
package-lock.json
package.json
packages.dhall
spago.dhall

README.md

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.