0.0.3 • Published 3 years ago

array-initializer v0.0.3

Weekly downloads
-
License
MIT
Repository
github
Last release
3 years ago

GitHub watchers GitHub watchers GitHub watchers GitHub watchers

This is a fully flexible array initializer based on Node

Table of Contents

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

TypeMethodArgumentsDescription
Numberrange0to100exceptions: arrayInitialize for 0 to 100
Numberrange0to1000exceptions: arrayInitialize for 0 to 1000
NumberrangeNegative100to100exceptions: arrayInitialize for -100 to 100
NumbernumberRangestart: number, end: number, exceptions: array,A custom range to initialize for
CharsmallCharsexceptions: arrayInitialize for a to z
CharcapitalCharsexceptions: arrayInitialize for A to Z
CharspecialCharsexceptions: arrayInitialize for special characters
CharprintableCharsexceptions: arrayInitialize for printable characters
CharrandomStringcount: number exceptions: arrayInitialize for random string

Arguments

NameTypeDefaultDescription
exceptionsarrayemptyIf you wish to avoid certain entries
startsource typeundefinedWhen you wish to define a start point for a range
endsource typeundefinedWhen you wish to define a end point for a range
countnumbermax possible sizeWhen 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