Skip to content

Scrabbleify words (mix letters within words and output the result)

License

Notifications You must be signed in to change notification settings

relativityboy/scrabbleify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

scrabbleify

Scrabbleify words (mix letters within words and output the result)

Version history

0.1.1

Supports mixing characters within words. Respects the position of inviolates like basic punctuation and numbers. (customizable) 1234567890, ,'".;: and \~!@#$%^&*()_+{}[]|

By default separator is a ' ' but can use one or more custom separators.

Simple case:

const {scrabbleify} = require('@hyggedyne/scrabbleify')

const loremIpsum = `Lorem Ipsum is simply ....  of Lorem Ipsum.`

const output = scrabbleify(loremIpsum)

//output is like 'oeLmr Ispum si mipsly ... fo omLre psuIm'

Keep 'I' and 'L' in the same position:

scrabbleify(loremIpsum, [' ', 'L','I'])

//output is like 'Lmoer Ipusm si psmliy ydmmu'

Exports the following

  • scrabbleify(inputString, [separator, [inviolates]] separator can be a char or array of chars. inviolates can be a boolean or an array of chars.
  • numbers
  • punctuation
  • symbols

About

Scrabbleify words (mix letters within words and output the result)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published