1.0.4 • Published 4 years ago

ameno-ipsum v1.0.4

Weekly downloads
8
License
MIT
Repository
github
Last release
4 years ago

ameno-ipsum

Lorem Ipsum generator based on Era's music Ameno

Instalation

npm i ameno-ipsum

or

yarn add ameno-ipsum

How to use

Object creation

To use it in your project you need to import the class AmenoIpsum and create the object for the generation of the words, sentences or paragraphs.

In the object constructor you have the following properties:

PropertyDescriptionValues
textFormatIn order to choose the format of the output'plain'(default), 'html'
minWordsPerSentenceMinimum quantity of words that a generated setence should havenumber(default:3)
maxWordsPerSentenceMaximum quantity of words that a generated setence should havenumber(default:10)
minSentencesPerParagraphMinimum quantity of setences that a generated paragraph should havenumber(default:3)
maxSentencesPerParagraphMaximum quantity of setences that a generated paragraph should havenumber(default:7)

Methods

MethodParameters
generateWordsquantity: number
generateSentencesquantity: number
generateParagraphsquantity: number

Example of use

const AmenoIpsum = require('ameno-ipsum').AmenoIpsum;
// import { AmenoIpsum } from 'ameno-ipsum';

const amenoObject = new AmenoIpsum();
console.log(amenoObject.generateWords(3));
console.log(amenoObject.generateSentences(5));
console.log(amenoObject.generateParagraphs(4));