Socket
Socket
Sign inDemoInstall

string.prototype.trimstart

Package Overview
Dependencies
64
Maintainers
2
Versions
11
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

string.prototype.trimstart

ES2019 spec-compliant String.prototype.trimStart shim.


Version published
Maintainers
2
Weekly downloads
31,375,780
decreased by-6.03%

Weekly downloads

Readme

Source

String.prototype.trimStart Version Badge

Build Status dependency status dev dependency status License Downloads

npm badge

browser support

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

Keywords

FAQs

Last updated on 30 Mar 2020

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc