character-shuffling
Install
NPM
npm install character-shuffling --save
Basic Usage
var CS = ; var element = document;var text = element /* options */; // shuffle its current character datatext; // shuffle to a new string specified by the `text` optiontext;
Default Options
You can extend this options during instantiation (second param) or when calling the shuffle
method.
/* The characters to use when selecting characters randomly. * [String] */ chars : "abcdefghijklmnopqrstuvwxyz" + "ABCDEFGHIJKLMNOPQRSTUVWXYZ" + "0123456789" + ",.?/\\(^)![]{}*&^%$#'\"" /* How many times should the letters be changed. * [Number] */ times : 10 /* String to shuffle to * [String] */ text : thiselementtextContent /* Function to be call once the shuffling is complete. * [Function] */ callback : null
License
MIT © Noel Delgado