# factory-util

> A package to help you with your projects.

Latest version **1.0.44** (published 2023-12-25) · ISC license · 0 weekly downloads

## Install

```sh
npm install factory-util
pnpm add factory-util
yarn add factory-util
bun add factory-util
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.44 |
| Published | 2023-12-25 |
| First published | 2023-10-18 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 11.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | macxyz |
| Maintainers | macxyz |
| Keywords | Util, Factory, Discord Bots, Discord |

## Links

- npm: https://www.npmjs.com/package/factory-util
- npm.io page: https://npm.io/package/factory-util

## 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

- 1.0.44 (latest) — 2023-12-25
- 1.0.43 — 2023-12-23
- 1.0.41 — 2023-12-04
- 1.0.40 — 2023-12-01
- 1.0.39 — 2023-12-01
- 1.0.38 — 2023-10-18
- 1.0.37 — 2023-10-18
- 1.0.36 — 2023-10-18
- 1.0.35 — 2023-10-18
- 1.0.34 — 2023-10-18
- 1.0.33 — 2023-10-18
- 1.0.3 — 2023-10-18
- 1.0.2 — 2023-10-18
- 1.0.1 — 2023-10-18

## README

A library to help you while building your Discord Bot.

## Instalation:
```javascript
npm install factory-util
yarn add factory-util
pnpm add factory-util
```

## Main Functions:
```javascript
randomNumber(max, min) //Número aleatório entre max e min
randomText(text) //String aleatório entre uma Array
bestMatch(mainString, Matches) //Decide qual string de uma array é mais parecida com mainString
isLink(link) //Retorna true se uma string for um link, false se não.
rowBuilder(component) //Cria um ActionRow do Discord de forma simples
BuildEmbed(title, description, color, footer) //Cria uma Embed do Discord de forma simples
```

## Usage
```javascript
const factoryUtil = require("factory-util");

factoryUtil.randomNumber(10, 1) //Return a random number beetween 1 and 10
factoryUtil.randomText(["Mac", "Cam", "Acm"]) //Return a random string from the elements of the array.
factoryUtil.isLink("https://google.com") //true
factoryUtil.isLink("macxyz") //false

factoryUtil.isImage("https://media.discordapp.net/attachments/1154206069397131344/1163935758319628399/15_Sem_Titulo_20231017172249.png?ex=654162a5&is=652eeda5&hm=907ffed12fb2774bd723b41b8c3e871117825b6e8d5405e84752b7b29cc63208&"); //true
factoryUtil.isImage("macxyz"); //false

factory.bestMatch("Pizza", [ "Azzip", "Pizzq", "Lipza" ]) // { ratings: number, bestMatch: string, bestMatchIndex: number }
```

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