Skip to content

JS identifier related helpers #219

@lasjorg

Description

@lasjorg

Should we add some identifier related helpers?

It might be nice to have identifier matcher and validator helpers. Not sure how often they are needed.

E.g.

https://github.com/sindresorhus/identifier-regex

https://github.com/sindresorhus/is-identifier


BTW, I was looking at getFunctionParams and it is matching on \w+ which would include invalid identifiers. Not sure if it really matters, probably not.

getFunctionParams("function test(42) {}");
getFunctionParams("function test(case) {}");

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions