DEV Community

Cover image for Derpify.js – a tool for these trying times…
Christian Heilmann
Christian Heilmann

Posted on • Originally published at christianheilmann.com

Derpify.js – a tool for these trying times…

DerpifyJS

As the times we live in demand it, I released Derpify.js. It is an npm package (3 line method) that turns strings into strings that are randomly mixed upper and lower case.

console.log(derpify('All he wanted to say was I love you all.'))
Enter fullscreen mode Exit fullscreen mode

gives you:

ALL hE WANTed to SAY WAS I lOVe YoU AlL.

Get it:

Top comments (1)

Collapse
 
dannyengelman profile image
Danny Engelman

AI says:

const derpify = (s, r = 0.3) => s.split('').map(c => Math.random() < r ? c : c.toUpperCase()).join('');