README
array-initializer
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?
- When do you need it
- Usage
- Highlight 🔥
- Methods
- Arguments
- Items in queue
- Contribution 🍰
- License
Features
- Node based
- Simple Javascript methods
🤲 Want to Motivate?
Who doesn't need motivation? Please give the project a star(⭐) and/or share it in your dev circle.
When do you need it
- You want to initialize your array?
- Initialize with complex values?
Install 🐙
npm install array-initializer
or
yarn add array-initializer
Usage
import {numberRange, specialChars} from 'array-initializer'
const your_int_array = range(50,100);
const your_spl_char_array = specialChars();
Highlight 🔥
It was frustrating for me when I was looking for some easy library to initialize various types of array throughout in my application.
Methods
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 |
Arguments
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 |
Items in queue
- Logically endless combinations
Contribution 🍰
If you understand the importance please feel free to create issue and make pull request
Refer code of conduct
Refer contributing
License
MIT © Koustov