All Projects → jonschlinkert → repeat-element

jonschlinkert / repeat-element

Licence: MIT license
Create an array by repeating the given string n times.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to repeat-element

longest
Get the length of the longest item in an array.
Stars: ✭ 31 (+63.16%)
Mutual labels:  array, element, value
array-last
Return the last element in an array. Faster than `.slice`
Stars: ✭ 34 (+78.95%)
Mutual labels:  array, element
FUPRAL
Fortran OO implementation of a generic container using an unlimited polymorphic class. Implementation of a resizable container array and a double linked list.
Stars: ✭ 18 (-5.26%)
Mutual labels:  array
HashMapC
A tiny library for using easily HashMap, arraylist in the C.
Stars: ✭ 21 (+10.53%)
Mutual labels:  array
CuVec
Unifying Python/C++/CUDA memory: Python buffered array ↔️ `std::vector` ↔️ CUDA managed memory
Stars: ✭ 73 (+284.21%)
Mutual labels:  array
go-streams
Stream Collections for Go. Inspired in Java 8 Streams and .NET Linq
Stars: ✭ 127 (+568.42%)
Mutual labels:  array
Data-Structures-Algorithms-Handbook
A series of important questions with solutions to crack the coding interview and ace it!
Stars: ✭ 30 (+57.89%)
Mutual labels:  array
Public-Method-CardGame-NiuNiu
纸牌游戏牛牛的最优算法及Method
Stars: ✭ 21 (+10.53%)
Mutual labels:  array
arr
数组增强组件主要是对数组等数据进行处理,如无限级分类操作、商品规格的迪卡尔乘积运算等。
Stars: ✭ 62 (+226.32%)
Mutual labels:  array
pasvl
Array Validator (regular expressions for arrays, sort of)
Stars: ✭ 40 (+110.53%)
Mutual labels:  array
vue-music
using Vue to Develop Mobile Project to Simulate “Baidu Music”(高仿百度音乐)
Stars: ✭ 27 (+42.11%)
Mutual labels:  element
linqjs
Perform queries on collections in the manner of C#s System.Linq in JavaScript
Stars: ✭ 14 (-26.32%)
Mutual labels:  array
zero-vue-admin
基于Go-Zero + vue-element-admin的前后端分离微服务管理系统的前端模块
Stars: ✭ 43 (+126.32%)
Mutual labels:  element
rerunner-jupiter
Extension for Junit 5. Re-run failed JUnit tests immediately.
Stars: ✭ 107 (+463.16%)
Mutual labels:  repeat
arrayfire-haskell
Haskell bindings to ArrayFire
Stars: ✭ 52 (+173.68%)
Mutual labels:  array
vue-ele-import
超简单、好用的 element-ui Excel 导入组件
Stars: ✭ 50 (+163.16%)
Mutual labels:  element
TNSlider
A custom iOS slider that show current value on the thumb
Stars: ✭ 14 (-26.32%)
Mutual labels:  value
BitLens
🔎 Have your bits and eat them too! A C++17 bit lens container for vector types.
Stars: ✭ 20 (+5.26%)
Mutual labels:  array
react-smart-key
Pass anything as key without re-renders
Stars: ✭ 17 (-10.53%)
Mutual labels:  array
el-cascader-multi
基于element-ui的级联多选选择器,友好显示下拉箭头,样式与element一致,支持多选与级联选择器的大部分功能。
Stars: ✭ 137 (+621.05%)
Mutual labels:  element

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 ❤️ 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

Commits Contributor
17 jonschlinkert
3 LinusU
1 architectcodes

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].