string-repeat-x

1.1.2 • Public • Published

Travis status Dependency status devDependency status npm version jsDelivr hits bettercodehub score Coverage Status

string-repeat-x

Constructs and returns a new string which contains the specified number of copies of the string.

module.exports*

Kind: Exported member
Returns: * - The target.

Param Type Description
string string The string.
count number string

Example

import repeat from 'string-repeat-x';
 
repeat('abc', -1); // RangeError
repeat('abc', 0); // ''
repeat('abc', 1); // 'abc'
repeat('abc', 2); // 'abcabc'
repeat('abc', 3.5); // 'abcabcabc' (count will be converted to integer)
repeat('abc', 1/0); // RangeError

/string-repeat-x/

    Package Sidebar

    Install

    npm i string-repeat-x

    Weekly Downloads

    6

    Version

    1.1.2

    License

    MIT

    Unpacked Size

    245 kB

    Total Files

    11

    Last publish

    Collaborators

    • xotic750