Packages/left-pad

Alternatives to left-pad

Its maintainers have deprecated it: no fix is coming, so the next advisory stays open. Here is what they and the community point to instead.

Deprecated by its maintainers

use String.prototype.padStart()

Named in the deprecation message

Read from the message, so worth a look before switching.

Built into the platform

From the e18e module-replacements list, maintained by the community.

Use String.prototype.padStart, built into Node 8.0.0 and later.

Before you switch

  1. 1

    Check what else depends on it

    Paste your package.json in the dependency check to see every deprecated or outdated package in one pass, not only this one.

  2. 2

    Read the replacement's peers and releases

    The page of String.prototype.padStart lists what it works with, its recent release notes and any open advisory.

  3. 3

    Know when it ships

    Follow the new package on Inlinr: its releases and advisories land in your feed, and the time spent on the migration branch shows on its page.