Skip to content
Evergreen Evergreen
Documentation

left-pad is deprecated

Deprecated. The source gives no day. Replacement: String.prototype.padStart(). Source: left-pad package deprecation notice.

Check a version:

evergreen check pkg:npm/left-pad

The package author recommends the built-in String.prototype.padStart method.

Look up another package or runtime · <form action="../lookup.html" method="get" role="search"> </form>

   
Status Deprecated
Severity medium
Ecosystem npm
Component pkg:npm/left-pad
Affected versions vers:npm/*
Date from the source The source gives no day
Replacement String.prototype.padStart()
Evidence last seen 2026-10-13
Reviewed 2026-10-14 by arminazimi
Review due 2027-10-14 (365 days after the last review)
Rule ID npm.package.left-pad.deprecated

Sources

Migration

Constraints

  • Preserve target width, fill-string behavior, string coercion, and handling of values already wider than the requested length.

Steps

  1. Replace left-pad calls. Convert each reported call to String(value).padStart(length, fill) while preserving existing coercion and defaults.
  2. Remove the dependency. Delete left-pad from package metadata and refresh the lockfile.

Verification

  • npm run test --if-present: Run padding edge cases and repository tests when defined.
  • npm run build --if-present: Verify the project builds without left-pad.

Detected by

The npm detector. See Detectors and Compatibility.

Same ecosystem

Data

This page is generated from registry/npm.json, rule npm.package.left-pad.deprecated, in the ebb.registry.v2 format (how rules are written). A CLE (ECMA-428) export is not published yet. The same facts are embedded in this page as schema.org structured data.

Last updated