2

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

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

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.