{"id":15659854,"url":"https://github.com/jonschlinkert/repeat-element","last_synced_at":"2025-07-27T10:34:24.772Z","repository":{"id":25674536,"uuid":"29110441","full_name":"jonschlinkert/repeat-element","owner":"jonschlinkert","description":"Create an array by repeating the given string n times.","archived":false,"fork":false,"pushed_at":"2021-04-07T23:13:31.000Z","size":24,"stargazers_count":19,"open_issues_count":0,"forks_count":7,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-07-18T02:55:10.199Z","etag":null,"topics":["array","element","item","javascript","jonschlinkert","js","node","nodejs","repeat","value"],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jonschlinkert.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-01-11T23:42:24.000Z","updated_at":"2024-11-06T09:52:34.000Z","dependencies_parsed_at":"2022-08-06T06:16:06.694Z","dependency_job_id":null,"html_url":"https://github.com/jonschlinkert/repeat-element","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/jonschlinkert/repeat-element","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Frepeat-element","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Frepeat-element/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Frepeat-element/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Frepeat-element/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jonschlinkert","download_url":"https://codeload.github.com/jonschlinkert/repeat-element/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jonschlinkert%2Frepeat-element/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266217170,"owners_count":23894242,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["array","element","item","javascript","jonschlinkert","js","node","nodejs","repeat","value"],"created_at":"2024-10-03T13:19:25.757Z","updated_at":"2025-07-27T10:34:24.722Z","avatar_url":"https://github.com/jonschlinkert.png","language":"JavaScript","readme":"# repeat-element [![NPM version](https://img.shields.io/npm/v/repeat-element.svg?style=flat)](https://www.npmjs.com/package/repeat-element) [![NPM monthly downloads](https://img.shields.io/npm/dm/repeat-element.svg?style=flat)](https://npmjs.org/package/repeat-element) [![NPM total downloads](https://img.shields.io/npm/dt/repeat-element.svg?style=flat)](https://npmjs.org/package/repeat-element) [![Linux Build Status](https://img.shields.io/travis/jonschlinkert/repeat-element.svg?style=flat\u0026label=Travis)](https://travis-ci.org/jonschlinkert/repeat-element)\n\n\u003e Create an array by repeating the given value n times.\n\nPlease consider following this project's author, [Jon Schlinkert](https://github.com/jonschlinkert), and consider starring the project to show your :heart: and support.\n\n## Install\n\nInstall with [npm](https://www.npmjs.com/):\n\n```sh\n$ npm install --save repeat-element\n```\n\n## Usage\n\n```js\nconst repeat = require('repeat-element');\n\nrepeat('a', 5);\n//=\u003e ['a', 'a', 'a', 'a', 'a']\n\nrepeat('a', 1);\n//=\u003e ['a']\n\nrepeat('a', 0);\n//=\u003e []\n\nrepeat(null, 5)\n//» [ null, null, null, null, null ]\n\nrepeat({some: 'object'}, 5)\n//» [ { some: 'object' },\n//    { some: 'object' },\n//    { some: 'object' },\n//    { some: 'object' },\n//    { some: 'object' } ]\n\nrepeat(5, 5)\n//» [ 5, 5, 5, 5, 5 ]\n```\n\n## About\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eContributing\u003c/strong\u003e\u003c/summary\u003e\n\nPull requests and stars are always welcome. For bugs and feature requests, [please create an issue](../../issues/new).\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eRunning Tests\u003c/strong\u003e\u003c/summary\u003e\n\nRunning 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:\n\n```sh\n$ npm install \u0026\u0026 npm test\n```\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003e\u003cstrong\u003eBuilding docs\u003c/strong\u003e\u003c/summary\u003e\n\n_(This project's readme.md is generated by [verb](https://github.com/verbose/verb-generate-readme), please don't edit the readme directly. Any changes to the readme must be made in the [.verb.md](.verb.md) readme template.)_\n\nTo generate the readme, run the following command:\n\n```sh\n$ npm install -g verbose/verb#dev verb-generate-readme \u0026\u0026 verb\n```\n\n\u003c/details\u003e\n\n### Contributors\n\n| **Commits** | **Contributor** | \n| --- | --- |\n| 17 | [jonschlinkert](https://github.com/jonschlinkert) |\n| 3 | [LinusU](https://github.com/LinusU) |\n| 1 | [architectcodes](https://github.com/architectcodes) |\n\n### Author\n\n**Jon Schlinkert**\n\n* [GitHub Profile](https://github.com/jonschlinkert)\n* [Twitter Profile](https://twitter.com/jonschlinkert)\n* [LinkedIn Profile](https://linkedin.com/in/jonschlinkert)\n\n### License\n\nCopyright © 2018, [Jon Schlinkert](https://github.com/jonschlinkert).\nReleased under the [MIT License](LICENSE).\n\n***\n\n_This file was generated by [verb-generate-readme](https://github.com/verbose/verb-generate-readme), v0.6.0, on August 19, 2018._","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Frepeat-element","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjonschlinkert%2Frepeat-element","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjonschlinkert%2Frepeat-element/lists"}