# gen-randint-array

> A helper function that returns an array filled with random integers.

Latest version **3.0.0** (published 2022-05-08) · Apache-2.0 license · 0 weekly downloads

## Install

```sh
npm install gen-randint-array
pnpm add gen-randint-array
yarn add gen-randint-array
bun add gen-randint-array
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 3.0.0 |
| Published | 2022-05-08 |
| First published | 2022-03-25 |
| Weekly downloads | 0 |
| License | Apache-2.0 |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 15.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Emmanuel Agbavwe |
| Maintainers | aro1914 |
| Keywords | Random, Array, Generator, Integer, Helper-Functions, Function |

## Links

- npm: https://www.npmjs.com/package/gen-randint-array
- Repository: https://github.com/Aro1914/Gen-RandInt-Array
- Homepage: https://github.com/Aro1914/Gen-RandInt-Array#readme
- Issues: https://github.com/Aro1914/Gen-RandInt-Array/issues
- npm.io page: https://npm.io/package/gen-randint-array

## Alternatives

- [lodash.assign](https://npm.io/package/lodash.assign.md) — 2.3M weekly downloads
- [lodash.chunk](https://npm.io/package/lodash.chunk.md) — 1.8M weekly downloads
- [react-native-ios-utilities](https://npm.io/package/react-native-ios-utilities.md) — 138.5K weekly downloads
- [@technically/lodash](https://npm.io/package/@technically/lodash.md) — 50.9K weekly downloads
- [@fluid-topics/ft-icon](https://npm.io/package/@fluid-topics/ft-icon.md) — 20.6K weekly downloads

## Recent versions

- 3.0.0 (latest) — 2022-05-08
- 2.0.0 — 2022-03-25
- 1.0.1 — 2022-03-25
- 1.0.0 — 2022-03-25

## README

# Gen-RandInt-Array (For Client Side)

## Contents

- [Gen-RandInt-Array (For Client Side)](#gen-randint-array-for-client-side)
  - [Contents](#contents)
  - [Description](#description)
  - [Usage](#usage)
    - [Client-side Only](#client-side-only)
  - [Requirements](#requirements)
  - [Contributing](#contributing)
  - [License](#license)

## Description

Gen-RandInt-Array is a helper function to help you generate an array with a length of your choice and given the min and max range as ±negPos

Compatible with both client-side and server-side environments.

## Usage

### Client-side Only

Install the **Gen-RandInt-Array** package with [NPM](https://www.npmjs.org/):

```sh
npm install gen-randint-array
```

In your package.json, set "type" to "module" to enable you import an ES Module.

```json
"type" : "module"
```

Or you can rename the javascript file the module is to be used to have the .mjs extension:

That is from `index.js` to `index.mjs`

Now when that is done, in your application code, import the `genRandIntArray()` method and assign the return value to a variable:

```js
import genRandIntArray from 'gen-randint-array';

const array = genRandIntArray(10, 10); // Returns an array of 10 random values ranging from -10 to 10
```

## Requirements

The Gen-RandInt-Array helper function has zero dependencies.

## Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

## License

The Gen-RandInt-Array Project is released under the [Apache License](http://www.apache.org/licenses/).

---
_Source: https://npm.io/package/gen-randint-array · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
