2

I need list of transormations, like downcase, upcase, capitalize. Where is the list of such? Good documentation.

Beau Smith
34.5k14 gold badges97 silver badges102 bronze badges
asked Jul 7, 2018 at 22:28

1 Answer 1

7

The official documentation is snippets grammar. It shows the transforms but only provides one example. The built-in transforms are

/upcase or /downcase or /capitalize or /pascalcase

/pascalcase was added by a commit on October 2, 2018 but hasn't made it into the documentation (as of June, 2019). It works to do this:

some-file-name.js => SomeFileName // or another separator like _ or any [^a-z]/i character.

Since the capability of snippet transforms has recently been enhanced, see placeholder transforms, v1.25 release notes (with another example) there should be more examples arriving on SO soon.

For examples, see capitalized a snippet and

transform foo_bar to FooBar, camelCase and

capitalize classNames of variables and lowercase a component name.

answered Jul 7, 2018 at 22:48
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.