npm install string.prototype.trimstart

ES2019 spec-compliant String.prototype.trimStart shim.

About string.prototype.trimstart

The npm package "string.prototype.trimstart" is a powerful utility tool that is compliant with ES2019 specifications. It is designed to enhance the functionality of string manipulations in JavaScript by trimming the start of a string. This means it removes any white space characters from the beginning of a string. The key purpose of this package is to provide developers with an efficient and reliable method to manipulate strings in their projects. The benefit of using "string.prototype.trimstart" is that it simplifies the process of string manipulation, allowing for cleaner and more efficient coding.

Developers can easily integrate this package into their projects through the command "npm install string.prototype.trimstart". This command initiates the installation process of the package into their project dependencies. Once installed, the package can be imported and used in any part of the project that requires string manipulation. This ease of integration is one of the many advantages of using npm modules in JavaScript projects.

Furthermore, the string.prototype.trimstart npm package is maintained and updated regularly to ensure that it remains compatible with the latest versions of JavaScript and npm. It also has a solid test coverage and dependency status, which makes it reliable for use in different types of projects. By using this package, developers can save time and resources that would have been spent writing and debugging custom code to achieve the same functionality.

More from es-shims

es-shims npm packages

Find the best node modules for your project.

Search npm

regexp.prototype.flags

ES6 spec-compliant RegExp.prototype.flags shim...

Read more
,

string.prototype.trimend

ES2019 spec-compliant String.prototype.trimEnd shim...

Read more
,

string.prototype.trimstart

ES2019 spec-compliant String.prototype.trimStart shim...

Read more
,

arraybuffer.prototype.slice

ES spec-compliant shim for ArrayBuffer.prototype...

Read more
,

string.prototype.matchall

Spec-compliant polyfill for String.prototype...

Read more
,

object.groupby

An ESnext spec-compliant `Object.groupBy` shim/polyfill/replacement that works as far down as ES3...

Read more
,

array.prototype.tosorted

An ESnext spec-compliant `Array.prototype...

Read more
,

es-iterator-helpers

An ESnext spec-compliant iterator helpers shim/polyfill/replacement that works as far down as ES3...

Read more
,

array.prototype.toreversed

An ESnext spec-compliant `Array.prototype...

Read more
,

typedarray.prototype.slice

ES spec-compliant shim for TypedArray.prototype...

Read more
,

string.prototype.replaceall

Spec-compliant polyfill for String.prototype...

Read more
,

error-cause

An ES-spec-compliant shim/polyfill/replacement for the `...

Read more

Dependencies

Core dependencies of this npm package and its dev dependencies.

call-bind, define-properties, es-object-atoms, @es-shims/api, @ljharb/eslint-config, aud, auto-changelog, eslint, functions-have-names, has-strict-mode, in-publish, npmignore, nyc, safe-publish-latest, tape

Documentation

A README file for the string.prototype.trimstart code repository. View Code

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