def stripped_newlines(converter):
    """Make converter that returns a string stripped of newlines or ``None``.

    ``converter`` is called to further convert non-``None`` values.
    """

    def single_line_converter(value):
        if value is None:
            return None
        return converter(value.replace('\r', '').replace('\n', ''))

    return single_line_converter