A simple library to initialize your array in any format you want
String | Characters | Special Characters | Anything and Everything
A javascript based library
This is a fully flexible array initializer based on Node
Table of Contents
- Features
- 🤲 Want to Motivate?
- Many Thanks to all the
Stargazers
who has supported this project with stars(⭐) - When do you need it
- Usage
- Highlight 🔥
- Methods
- Arguments
- Items in queue
- Contribution 🍰
- License
- Node based
- Simple Javascript methods
Who doesn't need motivation? Please give the project a star(⭐) and/or share it in your dev circle.
- You want to initialize your array?
- Initialize with complex values?
npm install array-initializer
or
yarn add array-initializer
import {numberRange, specialChars} from 'array-initializer'
const your_int_array = range(50,100);
const your_spl_char_array = specialChars();
It was frustrating for me when I was looking for some easy library to initialize various types of array throughout in my application.
Type | Method | Arguments | Description |
---|---|---|---|
Number | range0to100 | exceptions: array |
Initialize for 0 to 100 |
Number | range0to1000 | exceptions: array |
Initialize for 0 to 1000 |
Number | rangeNegative100to100 | exceptions: array |
Initialize for -100 to 100 |
Number | numberRange | start: number ,end: number , exceptions: array , |
A custom range to initialize for |
Char | smallChars | exceptions: array |
Initialize for a to z |
Char | capitalChars | exceptions: array |
Initialize for A to Z |
Char | specialChars | exceptions: array |
Initialize for special characters |
Char | printableChars | exceptions: array |
Initialize for printable characters |
Char | randomString | count: number exceptions: array |
Initialize for random string |
Name | Type | Default | Description |
---|---|---|---|
exceptions | array | empty | If you wish to avoid certain entries |
start | source type | undefined | When you wish to define a start point for a range |
end | source type | undefined | When you wish to define a end point for a range |
count | number | max possible size | When you wish to restrict a length |
- Logically endless combinations
If you understand the importance please feel free to create issue and make pull request
Refer code of conduct
Refer contributing
MIT © Koustov