Strips a flag of all tokens.

@example --user.name >> user.name
@example --no-force >> force (removes negation also)

@param val the value containing flag tokens to be stripped.
@param negate the negation char defined in options.
function stripFlag(val, negate) {
    negate = escape(negate || constants_1.NEGATE_CHAR);
    return (val || '').replace(new RegExp('^--?(' + negate + ')?'), '');
}