Skip to content
Fake English word generator for JavaScript/TypeScript
Branch: develop
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
example [change/docs] Change default value of maxSeqN and the example and upd… Sep 9, 2018
lib [change] Update word probability May 29, 2019
test [change] Rename functions to be simpler Sep 9, 2018
.gitignore [add] Implement fake word generator Sep 7, 2018
.npmignore
.travis.yml [change] Update Node versions in Travis CI Jun 5, 2019
LICENSE [add] Implement fake word generator Sep 7, 2018
README.md [docs] Add "For Go language and CLI" section May 29, 2019
package.json [bump] Bump up version to 0.3.0 May 28, 2019
tsconfig.json [refactor] Use strict option Jun 5, 2019

README.md

fakelish

npm Build Status

Fake English word generator

Try on Web Browser

https://fakelish.netlify.com
(repo: https://github.com/nwtgck/fakelish-web)

Install

npm i -S fakelish

Usage

Here is an usage in JavaScript.

// Import fakelish
const fakelish = require("fakelish");

// Min and max Lengths of fake words
const minLen = 7;
const maxLen = 11;

(async ()=>{
  // Generate 20 fake words
  for(let i = 0; i < 20; i++) {
    // Generate a fake word
    const fakeWord = await fakelish.generateFakeWord(minLen, maxLen);
    // Print the capitalized fake word
    console.log(capitalize(fakeWord));
  }
})();

// Capitalize string
function capitalize(str) {
  return str.charAt(0).toUpperCase() + str.substring(1);
}

(example/src/example1.js)

The output should be like the following.

Schyperant
Imposillack
Tioughters
Schgruids
Viestios
Mundrial
Unkalphast
Mireock
Babrilly
Formalated
Gimbrawer
Trident
Compler
Ligical
Deprene
Ocoarriete
Raxalluffic
Pecties
Daeorhons
Herbalve

For Go language and CLI

GitHub Repository: https://github.com/nwtgck/go-fakelish

You can’t perform that action at this time.