index.js
function _getMongoDbName(str) {
        if (!/[/\. "*<>:|?@]/.test(str)) {
          return str;
        }
        
        str = str.replace(/\//g, exports.constants.slash);
        str = str.replace(/\\/g, exports.constants.backslash);
        str = str.replace(/\./g, exports.constants.dot);
        str = str.replace(/ /g, exports.constants.space);
        str = str.replace(/"/g, exports.constants.doubleQuotes);
        str = str.replace(/\*/g, exports.constants.star);
        str = str.replace(/</g, exports.constants.lessThan);
        str = str.replace(/>/g, exports.constants.greaterThan);
        str = str.replace(/:/g, exports.constants.colon);
        str = str.replace(/\|/g, exports.constants.pipe);
        str = str.replace(/\?/g, exports.constants.questionMark);
        str = str.replace(/@/g, exports.constants.at);
    
        return str;
      }
function _getMongoDbName(str) {
        if (!/[/\. "*<>:|?@]/.test(str)) {
          return str;
        }
        
        str = str.replace(/\//g, exports.constants.slash);
        str = str.replace(/\\/g, exports.constants.backslash);
        str = str.replace(/\./g, exports.constants.dot);
        str = str.replace(/ /g, exports.constants.space);
        str = str.replace(/"/g, exports.constants.doubleQuotes);
        str = str.replace(/\*/g, exports.constants.star);
        str = str.replace(/</g, exports.constants.lessThan);
        str = str.replace(/>/g, exports.constants.greaterThan);
        str = str.replace(/:/g, exports.constants.colon);
        str = str.replace(/\|/g, exports.constants.pipe);
        str = str.replace(/\?/g, exports.constants.questionMark);
        str = str.replace(/@/g, exports.constants.at);
    
        return str;
      }
function _getMongoDbName ( str ) { if ( ! / [/\. "*<>:|?@] / . test ( str ) ) { return str ; } str = str . replace ( / \/ / g , exports . constants . slash ) ; str = str . replace ( / \\ / g , exports . constants . backslash ) ; str = str . replace ( / \. / g , exports . constants . dot ) ; str = str . replace ( / / g , exports . constants . space ) ; str = str . replace ( / " / g , exports . constants . doubleQuotes ) ; str = str . replace ( / \* / g , exports . constants . star ) ; str = str . replace ( / < / g , exports . constants . lessThan ) ; str = str . replace ( / > / g , exports . constants . greaterThan ) ; str = str . replace ( / : / g , exports . constants . colon ) ; str = str . replace ( / \| / g , exports . constants . pipe ) ; str = str . replace ( / \? / g , exports . constants . questionMark ) ; str = str . replace ( / @ / g , exports . constants . at ) ; return str ; }
Make the gebo user's email address suitable for naming
a database... and more!

Mongo does not allow these characters: /\. "*<>:|?
(http://docs.mongodb.org/manual/reference/limits/)

This function sanitizes @s as well, though it is not
required by Mongo.

@param string

@return string
Make the gebo user s email address suitable for naming a database ... and more!