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

@digital-taco/ipsum-generator

v0.2.0

Published

A NodeJS generalized lorem-ipsum generator that can use any word set.

Downloads

2

Readme

Ipsum Generator

Bask in the hunnit-p dank dopeness of this heckin woke generator. So yolo. So lit.

CLI

Install globally to use the ipsum-generator CLI.

> npm install -g @digital-taco/ipsum-generator

The following will echo out ipsum as paragraphs or sentences

> ipsum-generator [paragraph|sentence] [<number of paragraphs or sentences>] [<number of words/sentences in sentence/paragraph>] [--wordsets [...any wordsets ipsum-generator provides]]

API

import { paragraph } from '@digital-taco/ipsum-generator'
// OR if in Node
// const { paragraph } = require('@digital-taco/ipsum-generator')

import { slang, starWars } from '@digital-taco/ipsum-generator'
import yourOwnWordSet from 'somewhere'

// With just default lorem ipsum
const loremSentence = sentence(5 /* number of words in the sentence (optional - default will randomize between 5-15) */)

// With specific word sets
const mixedSentence = sentence(5, [slang, starWars, yourOwnWordSet])

// API is the same for paragraphs
const loremParagraph = paragraph(5 /* number of sentences in the paragraph (optional - default will randomize between 3-10) */)
const mixedParagraph = paragraph(5, [slang, starWars, yourOwnWordSet])
const 

Bound Generator Functions

You can also use ipsumGenerators to get back a sentence and paragraph function that work the same, but are bound to the provided word sets.

import { ipsumGenerators } from '@digital-taco/ipsum-generator'

// These two functions work the same as the ones provided from ipsum-generator, but will use the slang and starWars word sets by default.
const { sentence, paragraph } = ipsumGenerators([slang, starWars]) 

Available Word Sets

Any of these can be imported from ipsum-generator and used. You can use your own custom word sets alongside it.

  • lorem - Classic lorem ipsum
  • slang2010s - Slang words from 2010-2020
  • starWars - Characters, planets, phrases, and more from the Star Wars universe

Using a Custom Word Set

Using a custom word set is easy. It just needs to be an array of strings.

const fruits = [
  'apple',
  'tomato',
  'banana',
  'peach',
  'mango',
  'guava'
]

const fruitIpsum = paragraph(5, [fruits])

TODO:

  • Minify the output
  • Publish it as package
  • Create showcase site (based off old one)
  • Add more word sets (marvel? star trek? meats? colors? binary?)