complete-string
TypeScript icon, indicating that this package has built-in type declarations

3.0.2 • Public • Published

complete-string

node version npm version downloads count size license github-ci

🔨 Complete string by any char.

WARNING: This repo is shim for String.prototype.padStart (defined in ES2017 spec).

Usage

Installation:

npm install complete-string
// CommonJS
const CompleteString = require('complete-string');

// or ES Modules
import * as CompleteString from 'complete-string';

CompleteString.withChar(' batman', 10, 'a') // => 'aaa batman'
CompleteString.withZero('5', 2) // => '05'
// or import particular functions
import { withChar, withZero } from "complete-string";

withChar(' zorro', 10, 'z') // => 'zzzz zorro'
withZero('6', 2) // => '06'

License

The MIT License @ 2014

Package Sidebar

Install

npm i complete-string

Weekly Downloads

24

Version

3.0.2

License

MIT

Unpacked Size

8.53 kB

Total Files

6

Last publish

Collaborators

  • piecioshka