source: imaps-frontend/node_modules/string.prototype.trimstart/README.md

main
Last change on this file was d565449, checked in by stefan toskovski <stefantoska84@…>, 4 weeks ago

Update repo after prototype presentation

  • Property mode set to 100644
File size: 2.3 KB
Line 
1# String.prototype.trimStart <sup>[![Version Badge][npm-version-svg]][package-url]</sup>
2
3[![github actions][actions-image]][actions-url]
4[![coverage][codecov-image]][codecov-url]
5[![dependency status][deps-svg]][deps-url]
6[![dev dependency status][dev-deps-svg]][dev-deps-url]
7[![License][license-image]][license-url]
8[![Downloads][downloads-image]][downloads-url]
9
10[![npm badge][npm-badge-png]][package-url]
11
12An ES2019-spec-compliant `String.prototype.trimStart` shim. Invoke its "shim" method to shim `String.prototype.trimStart` if it is unavailable.
13
14This package implements the [es-shim API](https://github.com/es-shims/api) interface. It works in an ES3-supported environment and complies with the [spec](https://www.ecma-international.org/ecma-262/6.0/#sec-object.assign). In an ES6 environment, it will also work properly with `Symbol`s.
15
16Most common usage:
17```js
18var trimStart = require('string.prototype.trimstart');
19
20assert(trimStart(' \t\na \t\n') === 'a \t\n');
21
22if (!String.prototype.trimStart) {
23 trimStart.shim();
24}
25
26assert(trimStart(' \t\na \t\n') === ' \t\na \t\n'.trimStart());
27```
28
29## Tests
30Simply clone the repo, `npm install`, and run `npm test`
31
32[package-url]: https://npmjs.com/package/string.prototype.trimstart
33[npm-version-svg]: https://vb.teelaun.ch/es-shims/String.prototype.trimStart.svg
34[deps-svg]: https://david-dm.org/es-shims/String.prototype.trimStart.svg
35[deps-url]: https://david-dm.org/es-shims/String.prototype.trimStart
36[dev-deps-svg]: https://david-dm.org/es-shims/String.prototype.trimStart/dev-status.svg
37[dev-deps-url]: https://david-dm.org/es-shims/String.prototype.trimStart#info=devDependencies
38[npm-badge-png]: https://nodei.co/npm/string.prototype.trimstart.png?downloads=true&stars=true
39[license-image]: https://img.shields.io/npm/l/string.prototype.trimstart.svg
40[license-url]: LICENSE
41[downloads-image]: https://img.shields.io/npm/dm/string.prototype.trimstart.svg
42[downloads-url]: https://npm-stat.com/charts.html?package=string.prototype.trimstart
43[codecov-image]: https://codecov.io/gh/es-shims/String.prototype.trimStart/branch/main/graphs/badge.svg
44[codecov-url]: https://app.codecov.io/gh/es-shims/String.prototype.trimStart/
45[actions-image]: https://img.shields.io/endpoint?url=https://github-actions-badge-u3jn4tfpocch.runkit.sh/es-shims/String.prototype.trimStart
46[actions-url]: https://github.com/es-shims/String.prototype.trimStart/actions
Note: See TracBrowser for help on using the repository browser.