code: function getParts(str) {
    return str.replace(/\\\./g, '\uffff').split('.').map(function(s) {
      return s.replace(/\uffff/g, '.');
    });
  }
docs: Split strings on dot, but only if dot isn't preceded by a backslash. Since JavaScript doesn't support lookbehinds, use a placeholder for "\.", split on dot, then replace the placeholder character with a dot.