strangecase

formats a given strings casing probabilistic by a given weight

Usage no npm install needed!

<script type="module">
  import strangecase from 'https://cdn.skypack.dev/strangecase';
</script>

README

sTraNGECaSe Build Status

Formats a given string's casing probabilistic by a given weight:

var sc = require('strangecase')

console.log(sc('strangecase')) //yields 'sTraNGECaSe'
console.log(sc('strangecase', 0.3)) //yields 'sTraNGECaSe'
console.log(sc('strangecase', 0.7)) //yields 'stranGeCase'