Skip to content

Please add examples of each option to package description #45

@glittalogik

Description

@glittalogik

Some are obvious, others less so. I experimented and wrote up my results so feel free to just cut and paste this if you wish.

change-case:camel         "Hello, world!" > helloWorld
change-case:constant      "Hello, world!" > HELLO_WORLD
change-case:dot           "Hello, world!" > hello.world
change-case:lower         "Hello, world!" > "hello, world!"
change-case:param         "Hello, world!" > hello-world
change-case:pascal        "Hello, world!" > HelloWorld
change-case:path          "Hello, world!" > hello/world
change-case:sentence      "Hello, world!" > Hello world
change-case:snake         "Hello, world!" > hello_world
change-case:swap          "HELLO, world!" > "hello, WORLD!"
change-case:title         "Hello, world!" > Hello World
change-case:upper         "Hello, world!" > "HELLO, WORLD!"
change-case:upperFirst    hello, "WORLD!" > Hello, "WORLD!"
change-case:kebab         "Hello, world!" > hello-world

Thank you!

P.S. Probably also worth noting:

  • The difference, if any, between 'param' and 'kebab' (I couldn't figure it out)
  • upperFirst only works on letters. Nothing will happen to selections beginning with a symbol, number, or punctuation.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions