npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ipsumlorem

v1.0.2

Published

A package for generating lorem ipsum text

Downloads

3

Readme

Ipsum Lorem

Build Status

Ipsum Lorem is a light-weight, quick sample text generator for node.js or any Front End that uses JavaScript with ZERO dependency.

  • Generate Words
  • Generate Paragraphs on the Go!
  • Auto Punctuation inbuilt.
  • Light Weight (10 kB measured properly).
  • Experience the Magic.

Installation

Ipsum Lorem requires Node.js v6+ or A browser Support ES5 alteast to run.

Go to directory, install and start the server.

$ cd text_generator
$ npm install ipsumlorem

Github Repo:

| Repo | README | | ------ | ------ | | Github | [https://github.com/amandeeptherockstar/ipsumlorem] |

Load Module in Project

Want to contribute? Great!

Load the Module:

const LoremIpsum = require('ipsumlorem');

Create an Instance of LoremIpsum (uses Default Dictionary):

const loremIpsum = new LoremIpsum();

You can also pass the custom LoremIpsum dictionary as an array to constructor:

const dictionary = ['The','crazy','fox','jump','over','the','dog',...........];
const loremIpsum = new LoremIpsum(dictionary);

Methods

Module gives us two methods to use:

#1. getWords(count, startWithLoremIpsum);

** count: int = total words a lorem ipsum will contain. Type of count is int ** startWithLoremIpsum: boolean = do the lorem ipsum starts with actually lorem ipsum? Type of startWithLoremIpsum is boolean, by default its value is true.

#2. getParagraphs(count, min, max, startWithLoremIpsum);

** count: int = total amount of paragraphs a lorem ipsum will contain. Type of count is int. Default value is 3. ** min: int = minimum amount of words each paragraphs will contains atleast. Type of min is int. Default value is 35. ** max: int = maximum amount of words each paragraphs will contains atmost. Type of min is int. Default value is 200. ** startWithLoremIpsum: boolean = do the lorem ipsum text starts with actually lorem ipsum? Type of startWithLoremIpsum is boolean, Default value is true.

Examples

// getWords() const text = loremIpsum.getWords(10, true); Lorem ipsum dolor sit amet erat iaculis posuere, ullamcorper nunc.

const text = loremIpsum.getWords(10, false); Commodo bibendum quam vestibulum, et vehicula semper mi vulputate fermentum.

// getParagraphs() const text = loremIpsum.getParagraphs(2, 10, 20, false);

Dictumst dictumst a sit natoque malesuada praesent, platea eu amet pharetra eiusmod nam tortor risus urna do duis penatibus. Congue lobortis aliquet nibh rutrum dictumst, neque sit incididunt cursus aenean, euismod rhoncus eros habitant senectus praesent vestibulum dolore.

const text = loremIpsum.getParagraphs(2, 10, 20, true);

Lorem ipsum dolor sit amet cum non ultricies, neque tristique venenatis risus. Pretium scelerisque ultricies a rutrum, quam amet iaculis phasellus duis, vestibulum habitant scelerisque dictumst lorem augue fermentum.

License

MIT

Free Package, Hell Yeah!