/**
 * Vibrate when sorting started/stopped
 * @param {number} duration
 * @returns boolean
 */
export default function vibrate (duration = 50) {
  /* istanbul ignore next */
  if (navigator.vibrate) {
    navigator.vibrate(duration);
    return true;
  }
  /* istanbul ignore next */
  if (navigator.mozVibrate) {
    navigator.mozVibrate(duration);
    return true;
  }
  return false;
}
