namespace.js
function getParts(str) {
  return str.replace(/\\\./g, '\uffff').split('.').map(function(s) {
    return s.replace(/\uffff/g, '.');
  });
}
function getParts(str) {
  return str.replace(/\\\./g, '\uffff').split('.').map(function(s) {
    return s.replace(/\uffff/g, '.');
  });
}
function getParts ( str ) { return str . replace ( / \\\. / g , '\uffff' ) . split ( '.' ) . map ( function ( s ) { return s . replace ( / \uffff / g , '.' ) ; } ) ; }
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.
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 .