Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nwtgck/fakelish-npm
Fake English word generator for JavaScript/TypeScript
https://github.com/nwtgck/fakelish-npm
english english-like fake generator nodejs npm word
Last synced: 5 days ago
JSON representation
Fake English word generator for JavaScript/TypeScript
- Host: GitHub
- URL: https://github.com/nwtgck/fakelish-npm
- Owner: nwtgck
- License: mit
- Created: 2018-09-07T17:05:47.000Z (about 6 years ago)
- Default Branch: develop
- Last Pushed: 2023-03-06T11:03:19.000Z (over 1 year ago)
- Last Synced: 2024-10-23T08:54:04.221Z (14 days ago)
- Topics: english, english-like, fake, generator, nodejs, npm, word
- Language: TypeScript
- Homepage:
- Size: 4.2 MB
- Stars: 96
- Watchers: 3
- Forks: 6
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# fakelish
[![npm](https://img.shields.io/npm/v/fakelish.svg)](https://www.npmjs.com/package/fakelish)
[![Build Status](https://travis-ci.com/nwtgck/fakelish-npm.svg?token=TuxNpqznwwyy7hyJwBVm&branch=develop)](https://travis-ci.com/nwtgck/fakelish-npm)Fake English word generator
## Try on Web Browser
(repo: )## Install
```bash
npm i -S fakelish
```## Usage
Here is an usage in JavaScript.
```js
// 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](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: