stdlib icon indicating copy to clipboard operation
stdlib copied to clipboard

[RFC]: Add `@stdlib/string/base/stickycase`

Open kgryte opened this issue 2 years ago • 0 comments

Description

This RFC proposes adding support for converting a string to "sticky caps" case (also known as "studly case" or sponge case), where capitalization is random.

E.g.,

stickycase( 'foo bar' );
// returns 'fOo bAR'

Package: @stdlib/string/base/stickycase Alias: stickycase

Related Issues

None.

Questions

  • We should use @stdlib/random/base/bernoulli. We could consider supporting a p (probability) parameter in which randomness of capitalization is controlled by a specified probability.
  • Should this package be named differently? (e.g., spongecase?)

Other

See @stdlib/string/base/constantcase for a similar package.

Checklist

  • [X] I have read and understood the Code of Conduct.
  • [X] Searched for existing issues and pull requests.
  • [X] The issue name begins with RFC:.

kgryte avatar Feb 07 '23 23:02 kgryte