How we built it

String.prototype.padStart() / String.prototype.padEnd()

String formatting tools which returns a target/receiver string prepended or appended with a repeating pattern of characters: "foo".padStart(10, "0"); -> "0000000foo"; "foo".padEnd(10, "0"); -> "foo0000000";

Documentation

Specification

Editor's draft

Status in Chromium

Behind a flag (launch bug) in:

  • Chrome for desktop release 52
  • Chrome for Android release 52
  • Android WebView release 52
  • Opera release 52
  • Opera for Android release 52

Consensus & Standardization

  • Shipped
  • Shipped
  • Shipped
  • Positive

Owner

Last updated on 2016-09-30