Pourty is a simple JavaScript library for generating random poetry. It provides a straightforward way to create poems with randomized lines using nouns, adjectives, and verbs.
You can install Pourty via npm:
npm install pourty
const Poet = require('pourty');
const poet = new Poet();
console.log(poet.generatePoem(4));
A sample poem generated by Pourty might look like this:
Beautiful moon whispers.
Glorious sun sparkles.
Mysterious heart shines.
Bright star dances.
Creates a new instance of the Poet
class.
Generates a poem with the specified number of lines.
-
lines
: The number of lines in the poem.
Returns the generated poem as a string.
Contributions are welcome! If you'd like to contribute to Pourty, please open an issue or submit a pull request on GitHub.
Pourty is licensed under the MIT License.