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

fiction-word

v1.1.1

Published

A random word generator.

Downloads

10

Readme

Description

Fiction Word is a simple js word generator. It is a simple tool to create random English-like words. A friend of mine, who is a linguist and a novelest told me that the most tedious part of making up a language is creating the vocabulary—while some of the words are derived from combinations and derivations of other words, both the roots of those derivative words and many other unique words must simply be made up. He asked, if he gave me the rules of what constitutes a word, if I could make a script to generate random words. “Fiction Word” is a prototype of that idea.

Documentation

Installation & Usage

Install with npm: npm install fiction-word

Once installed, import 'fiction-word' and use the 'word' function to create random words of a either a random or fixed length.

import fiction from 'fiction-word';

console.log('Random word: ' + fiction.word());
// Random word: Vanued
console.log('Random 5-letter word: ' + fiction.word(5));
// Random 5-letter word: Mofiv

fiction-word also has the capability to generate sentences and paragraphs.

console.log(fiction.sentence());
// Latyh bluce brof gos stral geblight goureey bliom whurio diablu drusor fodi yac strem swuceeb.  

console.log(fiction.paragraph());
// Bicafex gyfier thar xugo clouhoos va easwy eq kusik niowuny scoubic gheel doobli cay  
// thycrique wiswier puq adiy himy.Oclu daies quen peato meaw sod shedea obros wichan udrum  
// maje birou ruw iyt bioceta ges. Mead thanygh ade iz picroock ublywo rition xoduque blahe  
// mad zut crught jaed pand neabeek seag. Tecli offeafea in motaies ushov noc bo vouta guvemy  
// hio deame yep bakouteci umoswi trooh driobee pa swaght ro. Foti uque scin te choubee biok  
// strough abruer suz lee ogequcif zef meatea de crelabre okublosea ruhip piva.

Which can also be limited to a specific number of words or sentences (respectively).

console.log(fiction.sentence(5));
// Daw stridrea fib drod predol.  

console.log(fiction.paragraph(5));
// Nea whucrio rou ghought foclijad quefio vio preyn preha blef divea querat toogav xouw  
// magea giblou laseauck shov.Chota si geehi xou shoumo ya fe diaxee koh cug banyed lob iovi  
// brier wetreff. Wheetok uhad stree deeg giv byshooc deahyp rond we bleab wav pretraies thekam  
// whitoo whelo xiowik. Bovo owa hecrese irobly so see kagee ranoond ec fi acofiv daed footion  
// blioc gyswu ludiwove hakabeck atrea trow ock. Dowee diacot whirux to egoond fithude vies  
// dianiv chisha rioswea sweing swicapuw tref neato noov aff ebim kuing yo.