1.1.4 • Published 3 years ago

repeat-element v1.1.4

Weekly downloads
16,535,425
License
MIT
Repository
github
Last release
3 years ago

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

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

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

(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.

archetype-librarycomponennenttvuedragdropuploadimagespopsmart-common-authreact-native-bluetooth2killi8n-react-native-fast-imagern-send-smsspecify-importsbabel-specify-imports@icanpm/api-mastergew-nodejs-api-client@arisageha/react-lazyload@arisageha/react-lazyload-fix@cashremit/cr-streamline-iconsreact-native-template-rfbasecloud-archive-s3airscanairscan-examplebb-chatreact-native-esc-pos-sahaab@borisovart/atol-kkt-module@frxf/frxf@phil8795/pecuniarius-apideneme323112@texttree/demo-bsa-reference-rcl@fundefund/funde_ck@ntt_app/react-native-custom-notificationreact-native-custom-text-hwjamesreact-native-covid-sdkgql_din_modbitgetreact-native-thanh-toast-library@thanhnguyen14797/react-native-thanh-toast-library@l1nyanm1ng/react-picture-viewercthpb-plugin-socialpanqibaoreact-native-printer-brothersrn-pdf-reader-offlinereact-native-shekhar-bridge-testuinz-notificationwilscanner@oiti/documentoscopy-react-nativejs4cytoscape@mink-opn/build-tokensquoc-testreact-native-slider-kfunblock-block-save-variables@infinitebrahmanuniverse/nolb-repe@saaspe/componentsplginexpand-react-bridge@everything-registry/sub-chunk-2651ondfenglin-uploaderfahad-redux-axios-midlewarefastlion-picture-viewerfhir2fishzerofn-lib-examplefmslflowable-bpmn-modelerfreemambafrdrk-js-semaphoreforminput-ui-libfork-react-ffmpeghot-zone-vueiex-sdkjamuskalimgriffin-ui-librarygrids-over-polygongrid-component-react-ex-1google-remakegenerator-liuhuijun-vuegzup-react-image-file-resizerh5-templetehexyun.helpershendo-clihendo-cli-luozheaoguruwayguruway.jsgenerator-bootstrap-boilerplate-templategenz-native-elementsgix-npm-servergaurav-react-native-loophcm-jshelp-widgetjrennsoh88-react-native-scroll-indicatorjeuxuijesusdemoka-flow.jskafirchain-tetrisjs-utils-jll2l2forlernakhaled-salem-custom-components3.0.0@simstudio/htmldiff@brucearmstrong/sass-librarylayui-customouteoutils-ren
1.1.4

3 years ago

1.1.3

6 years ago

1.1.2

9 years ago

1.1.1

9 years ago

1.1.0

9 years ago

1.0.0

9 years ago