Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/arsamsarabi/fallguys-names
A node package that returns random Fall Guys names
https://github.com/arsamsarabi/fallguys-names
Last synced: 3 days ago
JSON representation
A node package that returns random Fall Guys names
- Host: GitHub
- URL: https://github.com/arsamsarabi/fallguys-names
- Owner: arsamsarabi
- Created: 2021-07-09T15:03:00.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2022-03-02T13:40:13.000Z (over 2 years ago)
- Last Synced: 2024-11-04T07:02:20.300Z (13 days ago)
- Language: TypeScript
- Size: 104 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Fall Guys names
> Fully customizable what-three-words generator with a default set of fallguys names.
```typescript
export type WordModifiers = {
firsts?: string[]
seconds?: string[]
thirds?: string[]
}export type FGConfig = {
quantity?: number
mix?: WordModifiers
replace?: WordModifiers
separator?: string
}function fallguys(args: FGConfig): string | string[]
```## How to
```bash
# Install the package as a dependency
$ yarn add fallguys-names
``````javascript
// In your project, import from 'fallguys-names'
import fallguys, { FGConfig } from 'fallguys-names'// fallguys-names exports a default function that generates a random what-three-words style string
const myAwesomeNewFallGuysName: string = fallguys() // e.g. "Clever Streaming Knight"const config: FGConfig = {
quantity: 2,
}const myArrayOfNames: string[] = fallguys(config) // e.g. ["Steady Yeeted Climber", "Bonkers Bumbling Monster"]
```## Configuration options
Optionally you can pass an object as an argument, with any of the following fields:
| field | type | required | default |
| :-------- | :----- | :------- | :------------- |
| quantity | number | false | 1 |
| mix | Object | false | undefined |
| replace | Object | false | undefined |
| separator | string | false | a single space |### quantity
The quantity or strings that the function will return. **Important!** by increasing the quantity to more than one, the function will return an array of names
### mix
You may supply your own choice of words to mix with the original words in the library.
### replace
You may supply your own choice of words to replace the original words in the library.
### separator
The separator character to be used between the words. Defaults to a single space.
![fallguys](https://media.giphy.com/media/gpYbcdBSl8ALjgmQ2G/giphy.gif)