string.prototype.trimstart (1.0.8)

Published 2026-02-24 14:05:40 +00:00 by atheaadmin

Installation

registry=
npm install string.prototype.trimstart@1.0.8
"string.prototype.trimstart": "1.0.8"

About this package

String.prototype.trimStart Version Badge

github actions coverage dependency status dev dependency status License Downloads

npm badge

An ES2019-spec-compliant String.prototype.trimStart shim. Invoke its "shim" method to shim String.prototype.trimStart if it is unavailable.

This package implements the es-shim API interface. It works in an ES3-supported environment and complies with the spec. In an ES6 environment, it will also work properly with Symbols.

Most common usage:

var trimStart = require('string.prototype.trimstart');

assert(trimStart(' \t\na \t\n') === 'a \t\n');

if (!String.prototype.trimStart) {
	trimStart.shim();
}

assert(trimStart(' \t\na \t\n') === ' \t\na \t\n'.trimStart());

Tests

Simply clone the repo, npm install, and run npm test

Dependencies

Dependencies

ID Version
call-bind ^1.0.7
define-properties ^1.2.1
es-object-atoms ^1.0.0

Development Dependencies

ID Version
@es-shims/api ^2.4.2
@ljharb/eslint-config ^21.1.0
aud ^2.0.4
auto-changelog ^2.4.0
eslint =8.8.0
functions-have-names ^1.2.3
has-strict-mode ^1.0.1
in-publish ^2.0.1
npmignore ^0.3.1
nyc ^10.3.2
safe-publish-latest ^2.0.0
tape ^5.7.5

Keywords

es6 es7 es8 javascript prototype polyfill utility trim trimLeft trimRight trimStart trimEnd tc39
Details
npm
2026-02-24 14:05:40 +00:00
1
Jordan Harband
MIT
latest
7.6 KiB
Assets (1)
Versions (1) View all
1.0.8 2026-02-24