function quotemeta(str) {
  // From: http://phpjs.org/functions
  // +   original by: Paulo Freitas
  // *     example 1: quotemeta(". + * ? ^ ( $ )");
  // *     returns 1: '\. \+ \* \? \^ \( \$ \)'
  return (str + '').replace(/([\.\\\+\*\?\[\^\]\$\(\)])/g, '\\$1');
}

function quotemeta(str) {
  // From: http://phpjs.org/functions
  // +   original by: Paulo Freitas
  // *     example 1: quotemeta(". + * ? ^ ( $ )");
  // *     returns 1: '\\. \\+ \\* \\? \\^ \\( \\$ \\)'
  return (str + '').replace(/([\.\\\+\*\?\[\^\]\$\(\)])/g, '\\$1');
}

Fix example (to give proper response and as expected by Travis)
Fix example (to give proper response and as expected by Travis)
