Skip to content

dasherize & Consecutive Capital Letters: Unexpected Behavior? #89

@rallison

Description

@rallison

This may or may not be expected behavior, however neither the documentation nor the current test cases cover this.

Example code:

_('thisIsATest').dasherize();

What I expect to get: this-is-a-test
What I actually get: this-is-atest

Because of this, you also end up with this outcome:

var foo = 'thisIsATest';
_(foo).chain().dasherize().camelize().value() === foo;  // is false

Basically, is the current behavior the expected behavior, or is this an overlooked edge case?

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