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: 4 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 (over 6 years ago)
- Default Branch: develop
- Last Pushed: 2023-03-06T11:03:19.000Z (almost 2 years ago)
- Last Synced: 2024-12-10T05:26:09.759Z (13 days ago)
- Topics: english, english-like, fake, generator, nodejs, npm, word
- Language: TypeScript
- Homepage:
- Size: 4.2 MB
- Stars: 97
- 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: