index.js
function escapeValue(value) {
        switch (options.type) {
        case 'js':
            return value.replace(/'/g, '\\\'');
        case 'json':
            return value.replace(/"/g, '\\"');
        default:
            return value;
        }
    }
function escapeValue(value) {
        switch (options.type) {
        case 'js':
            return value.replace(/'/g, '\\\'');
        case 'json':
            return value.replace(/"/g, '\\"');
        default:
            return value;
        }
    }
function escapeValue ( value ) { switch ( options . type ) { case 'js' : return value . replace ( / ' / g , '\\\'' ) ; case 'json' : return value . replace ( / " / g , '\\"' ) ; default : return value ; } }
Escape values depends on type.

For JS escape single quote, for json double quotes.
For everything else return origin value.

@param value {string}
@returns {string}
Escape values depends on type .