Big update!Introducing GitHub Bot Commands. Learn more
Socket
Log inBook a demo

repeat-element

Package Overview
Dependencies
0
Maintainers
1
Versions
6
Issues
File Explorer

Advanced tools

repeat-element

Create an array by repeating the given value n times.

    1.1.4latest

Version published
Maintainers
1
Weekly downloads
16,356,712
increased by0.45%

Weekly downloads

Readme

Source

repeat-element NPM version NPM monthly downloads NPM total downloads Linux Build Status

Create an array by repeating the given value n times.

Please consider following this project's author, Jon Schlinkert, and consider starring the project to show your :heart: and support.

Install

Install with npm:

$ npm install --save repeat-element

Usage

const repeat = require('repeat-element'); repeat('a', 5); //=> ['a', 'a', 'a', 'a', 'a'] repeat('a', 1); //=> ['a'] repeat('a', 0); //=> [] repeat(null, 5) //» [ null, null, null, null, null ] repeat({some: 'object'}, 5) //» [ { some: 'object' }, // { some: 'object' }, // { some: 'object' }, // { some: 'object' }, // { some: 'object' } ] repeat(5, 5) //» [ 5, 5, 5, 5, 5 ]

About

Contributing

Pull requests and stars are always welcome. For bugs and feature requests, please create an issue.

Running Tests

Running and reviewing unit tests is a great way to get familiarized with a library and its API. You can install dependencies and run tests with the following command:

$ npm install && npm test
Building docs

(This project's readme.md is generated by verb, please don't edit the readme directly. Any changes to the readme must be made in the .verb.md readme template.)

To generate the readme, run the following command:

$ npm install -g verbose/verb#dev verb-generate-readme && verb

Contributors

CommitsContributor
17jonschlinkert
3LinusU
1architectcodes

Author

Jon Schlinkert

License

Copyright © 2018, Jon Schlinkert. Released under the MIT License.


This file was generated by verb-generate-readme, v0.6.0, on August 19, 2018.

Keywords

FAQs

What is repeat-element?

Create an array by repeating the given value n times.

Is repeat-element popular?

The npm package repeat-element receives a total of 14,199,305 weekly downloads. As such, repeat-element popularity was classified as popular.

Is repeat-element well maintained?

We found that repeat-element demonstrated a not healthy version release cadence and project activity because the last version was released a year ago.It has 1 open source maintainer collaborating on the project.

Last updated on 07 Apr 2021

Did you know?

Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.

Install Socket
Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc