Skip to content

Add string built-ins to lodash wrapper? #1016

@jasonkarns

Description

@jasonkarns

It's super handy that a bunch of the built-in Array methods (concat, join, pop, push, etc) are all added to the wrapper object. Thus when an array is wrapped, one can use any of the built-in array methods directly on the chain as if operating directly on the array.

Now that lodash has a suite of String methods, I was a bit surprised to learn that the String built-ins aren't added to the wrapper object as well.

Was this intentional or an oversight? I would love to be able to use methods like split or replace directly on a lodash-wrapped string.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions