This package provides a function to generate a random cow ID. The length of the entire string is equal to 2x the length parameter. The first half of the string is a sequence of "M" & "o" and "O" characters (length - 1), and the second half is a random ID (length - 1), after a dash.
You can install this package using npm:
npm install random-cow-generator
Here's how you can use the randomCowGenerator function:
import { randomCowGenerator } from "random-cow-generator";
const cowID = randomCowGenerator({ length: 10 });
console.log(cowID); // Outputs something like "MoooOOOoOO-fWF7tFYZt"
In this example, length is the length of the cow ID. The actual length of the returned string is 2x this value.