Socket
Socket
Sign inDemoInstall

repeating

Package Overview
Dependencies
0
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    repeating

Repeat a string - fast


Version published
Weekly downloads
4.5M
decreased by-16.72%
Maintainers
1
Install size
5.11 kB
Created
Weekly downloads
 

Package description

What is repeating?

The 'repeating' npm package is a simple utility that allows you to create a new string by repeating a given string a specified number of times. It is useful for generating repeated patterns, filling spaces, or creating specific string-based designs programmatically.

What are repeating's main functionalities?

String repetition

This feature allows you to repeat a string a specified number of times. The first argument is the number of times to repeat, and the second argument is the string to repeat.

const repeating = require('repeating');
console.log(repeating(3, 'abc')); // 'abcabcabc'

Other packages similar to repeating

Readme

Source

repeating

Repeat a string - fast

This module is moot now. Just use String#repeat().

Install

$ npm install repeating

Usage

import repeating from 'repeating';

repeating(5);
//=> '     '

repeating(100, 'unicorn ');
//=> 'unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn unicorn '

API

repeating(count, string?)

count

Type: number

Times the string should be repeated.

string

Type: string
Default: ' '

String to repeat.


Get professional support for this package with a Tidelift subscription
Tidelift helps make open source sustainable for maintainers while giving companies
assurances about security, maintenance, and licensing for their dependencies.

Keywords

FAQs

Last updated on 03 May 2021

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