Skip to content

Deprecated left-pad #8516

Closed
Closed
@sidoruk-sv

Description

@sidoruk-sv

🚀 Feature Proposal

Replace left-pad with String.prototype.padStart() (from deprecation message):
https://www.npmjs.com/package/left-pad

use String.prototype.padStart()

Example

Please provide an example for how this feature would be used.
Need to be done:

Remove left-pad dependency here: https://github.com/facebook/jest/blob/master/package.json#L57

Remove import of left-pad here:
https://github.com/facebook/jest/blob/master/packages/pretty-format/perf/test.js#L13

Replace leftPad(current.time, 6) with String(current.time).padStart(6) here:
https://github.com/facebook/jest/blob/master/packages/pretty-format/perf/test.js#L83

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