Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

string.prototype.trimstart

es-shims109.1mMIT1.0.8

ES2019 spec-compliant String.prototype.trimStart shim.

es6, es7, es8, javascript, prototype, polyfill, utility, trim, trimLeft, trimRight, trimStart, trimEnd, tc39

readme

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

changelog

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

v1.0.8 - 2024-03-21

Commits

  • [actions] use reusable workflows d139c11
  • [Dev Deps] update aud, npmignore, tape 16ff815
  • [Deps] update call-bind, define-properties 8dd308d
  • [Refactor] use es-object-atoms instead of es-abstract 4868f56
  • [meta] add missing engines.node 8c1cce6

v1.0.7 - 2023-09-04

Commits

  • [Dev Deps] update @es-shims/api, @ljharb/eslint-config, aud, tape 58e7aa6
  • [Deps] update define-properties, es-abstract 8d9a7bf

v1.0.6 - 2022-11-07

Commits

  • [meta] use npmignore to autogenerate an npmignore file 0838ae4
  • [actions] update rebase action to use reusable workflow d6bb784
  • [Dev Deps] update aud, tape 8734d9a
  • [Deps] update es-abstract 30f593f

v1.0.5 - 2022-05-02

Commits

  • [actions] reuse common workflows 61d4009
  • [actions] use node/install instead of node/run; use codecov action bfe39c4
  • [Fix] ensure main entry point properly checks the receiver in ES3 engines 36e3730
  • [Fix] as of unicode v6, the mongolian vowel separator is no longer whitespace 4f77eed
  • [Dev Deps] update eslint, @ljharb/eslint-config, @es-shims/api, safe-publish-latest, tape 59fcb99
  • [Dev Deps] update eslint, @ljharb/eslint-config, aud, auto-changelog, functions-have-names, tape 486ffcf
  • [actions] update codecov uploader b33ac48
  • [Dev Deps] update eslint, @ljharb/eslint-config, @es-shims/api, aud, auto-changelog, tape 3c89fa5
  • [readme] add github actions/codecov badges 00be6b3
  • [Dev Deps] update eslint, tape 13a08f5
  • [actions] update workflows 6ac576d
  • [meta] use prepublishOnly script for npm 7+ fa382ca
  • [Deps] update define-properties d57bffe

v1.0.4 - 2021-02-23

Commits

  • [meta] do not publish github action workflow files 9c434ec
  • [readme] remove travis badge 7843160
  • [Dev Deps] update eslint, @ljharb/eslint-config, functions-have-names, has-strict-mode, tape 8b52646
  • [Dev Deps] update eslint, @ljharb/eslint-config, aud, tape badeda2
  • [Tests] increase coverage bf8777d
  • [actions] update workflows 61be1c6
  • [meta] gitignore coverage output c9c98d7
  • [Deps] update call-bind c8645e8

v1.0.3 - 2020-11-21

Commits

  • [Tests] migrate tests to Github Actions fbc7519
  • [Tests] add implementation test; run es-shim-api in postlint; use tape runner 3c9330b
  • [Tests] run nyc on all tests 52229ca
  • [Deps] replace es-abstract with call-bind 5e5068d
  • [Dev Deps] update eslint, aud; add safe-publish-latest 42a853e

v1.0.2 - 2020-10-20

Commits

  • [Dev Deps] update eslint, @ljharb/eslint-config, aud, auto-changelog, tape d032b38
  • [actions] add "Allow Edits" workflow 83e30ba
  • [Deps] update es-abstract 707d85d
  • [actions] switch Automatic Rebase workflow to pull_request_target event 096c6d9

v1.0.1 - 2020-04-09

Commits

  • [meta] add some missing repo metadata 3385da3
  • [Dev Deps] update auto-changelog 879377d

v1.0.0 - 2020-03-30

Commits

  • [Breaking] convert to es-shim API 970922c
  • [meta] add auto-changelog ff30c09
  • [meta] update readme 816291d
  • [Tests] add npm run lint 3341104
  • Only apps should have lockfiles f008df7
  • [actions] add automatic rebasing / merge commit blocking e5ba35c
  • [Tests] use shared travis-ci configs 46516b1
  • [meta] add funding field 34ae856
  • [meta] fix non-updated version number 3b0e262

v0.1.0 - 2017-12-19

Commits

v0.0.1 - 2017-12-19

Commits