Giter Club home page Giter Club logo

wordplex's Introduction

WordPlex

build status version downloads MIT License

Installation

Install for global use

npm i -g wordplex

Install for use in project

npm i --save wordplex

CLI

wordplex --help
wordplex <pattern> [options]

Generate words according to pattern CVC (generates: bab ...) or word google
(generates baabba ...)

Options:
  --help         Show help                                             [boolean]
  --version      Show version number                                   [boolean]
  --verbose, -v  Run with verbose logging                              [boolean]
  --similar, -s  Provide similar word instead of pattern. Will generate similar
                 words.                                                [boolean]
  --prefix       Set text to be added to the beggining of all generated texts
                                                                        [string]
  --suffix       Set text to be added to the end of all generated texts [string]
  --pattern                                                     [default: "CVC"]

Generate all 3 letter .com domains in CVC format

wordplex CVC --suffix=.com

Generate all 4 letter .net domains in CVCV format

wordplex CVCV --suffix=.net

Generate words in format CVC (consonant vowel consonant)

$ wordplex CVC
bbb
bbc
bbd
bbf
bbg
bbh
bbj
bbk
bbl
bbm
...
$ wordplex look

Will generate words similar to look in CVVC format

baab
baac
baad
baaf
baag
baah
baaj
baak
baal
baam
...

Example script

const wordplex = require('wordplex');
wordplex.generate('CVC', function(word) {
    console.log(word)
});

Result

[ 'bab',
  'bac',
  'bad',
  'baf',
  'bag',
  'bah',
  'baj',
  'bak',
  'bal',
  'bam',
  'ban',
  'bap',
  'baq',
  ...

Generating words

var words = wordplex.generate('VC');
console.log(words)

Result

[ 'ab',
  'ac',
  'ad',
  'af',
  'ag',
  'ah',
  'aj',
  'ak',
  'al',
  'am',
  'an',
  ...

Generating similar format words

var words = wordplex.similar('google');
console.log(words)

Result generate words in CVVCCV format

[ 'baabba',
  'baabbe',
  'baabbi',
  'baabbo',
  'baabbu',
  'baabca',
  'baabce',
  'baabci',
  'baabco',
  'baabcu',
  'baabda',
  'baabde',
  ...

Generating words with numbers

var words = wordplex.generate('VC#');
console.log(words)

Result

[ 'ab1',
  'ab2',
  'ab3',
  'ab4',
  'ab5',
  'ab6',
  'ab7',
  'ab8',
  'ab9',
  'ab0',
  'ac1',
  'ac2',
  'ac3',
  ...

Generating words with prefix

var words = wordplex.setPrefix('my-').similar("dog");
console.log(words)

Result

[ 'my-bab',
  'my-bac',
  'my-bad',
  'my-baf',
  'my-bag',
  'my-bah',
  'my-baj',
  'my-bak',
  'my-bal',
  'my-bam',
  'my-ban',
  'my-bap',
  ...

Generating words with suffix

var words = wordplex.setSuffix('.com').generate('CVC');
console.log(words)

Result

[ 'bab.com',
  'bac.com',
  'bad.com',
  'baf.com',
  'bag.com',
  'bah.com',
  'baj.com',
  'bak.com',
  'bal.com',
  'bam.com',
  'ban.com',
  'bap.com',
  ...

Reset generator to default values

var words = wordplex.reset().generate();
console.log(words)

Result

[ 'ab',
  'ac',
  'ad',
  'af',
  'ag',
  'ah',
  'aj',
  'ak',
  ...

Development

npm i --dev
npm test

wordplex's People

Contributors

dependabot[bot] avatar fordnox avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

renowncoder

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.