/**
 * Mix characters in a string
 *
 * @param {string} string string
 * @return {string} string
 *
 * @example
 * ar snu = require('s-node-utils');
 *
 * snu.string.shuffle("text");
 * //=> xtet
 */
module.exports = function(string) {
  return string
    .split('')
    .sort(function(a, b) {
      return Math.random() < 0.5 ? 1 : -1;
    })
    .join('');
};
