Skip to content

[RFC]: Add @stdlib/string/base/stickycase #852

Closed
@kgryte

Description

@kgryte

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

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

Metadata

Metadata

Assignees

Labels

FeatureIssue or pull request for adding a new feature.Good First IssueA good first issue for new contributors!JavaScriptIssue involves or relates to JavaScript.Needs DiscussionNeeds further discussion.RFCRequest for comments. Feature requests and proposed changes.UtilitiesIssue or pull request concerning general utilities.difficulty: 2May require some initial design or R&D, but should be straightforward to resolve and/or implement.priority: LowLow priority concern or feature request.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions