Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dummy-text-generator

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dummy-text-generator

Simple random lorem ipsum generator

  • 1.0.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Dummy Text Generator

Installation

Using npm:

npm install --save dummy-text-generator

Using yarn:

yarn add dummy-text-generator

Using

In Nodejs

const loremGenerator = require('dummy-text-generator');
// const { generateWord, generateSentence, generateParagraph } = require('dummy-text-generator');
// const generateWord = require('dummy-text-generator').generateWord;

loremGenerator.generateWord();
// Output: Lorem
loremGenerator.generateSentence(10);
// Output: Excepteur laboris ea labore quis sunt laborum reprehenderit ea duis.
loremGenerator.generateParagraph(5, 10);
// Output: Excepteur minim amet lorem velit in mollit laborum magna cillum. Qui aliquip duis excepteur id est dolore eiusmod ea adipisicing. Laboris aute sint culpa aliquip laboris enim aliqua exercitation ut. Ea enim deserunt reprehenderit culpa pariatur nostrud laboris anim eiusmod. Ullamco nisi duis cillum elit id officia veniam excepteur velit.

In Browser

CDN:

<script src="https://cdn.jsdelivr.net/npm/dummy-text-generator@<tags_version>/dist/lorem-generator.min.js"></script>

Using loremGenerator object

In ES modules

import loremGenerator from 'dummy-text-generator';
import { generateWord, generateSentence, generateParagraph } from 'dummy-text-generator';

API

generateWord() - Return random 1 word

generateSentence(maxWord) - Return random 1 sentence

  • maxWord (require): The total number of words in a sentence. Must be a positive integer (eg: 10)

generateParagraph(maxSentence, maxWord) - Return random 1 paragraph

  • maxSentence (require): The total number of sentences in a paragraph. Must be a positive integer (eg: 5)
  • maxWord (require): The total number of words in a sentence. Must be a positive integer (eg: 10)

Keywords

FAQs

Package last updated on 19 Dec 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc