lib/collection/header.js
function (header) {
        if (!_.isString(header)) { return { key: E, value: E }; }

        var index = header.indexOf(HEADER_KV_SEPARATOR),
            key,
            value;

        (index < 0) && (index = header.length);

        key = header.substr(0, index);
        value = header.substr(index + 1);

        return {
            key: _.trim(key),
            value: _.trim(value)
        };
    }
function (header) {
        if (!_.isString(header)) { return { key: E, value: E }; }

        var index = header.indexOf(HEADER_KV_SEPARATOR),
            key,
            value;

        (index < 0) && (index = header.length);

        key = header.substr(0, index);
        value = header.substr(index + 1);

        return {
            key: _.trim(key),
            value: _.trim(value)
        };
    }
function ( header ) { if ( ! _ . isString ( header ) ) { return { key : E , value : E } ; } var index = header . indexOf ( HEADER_KV_SEPARATOR ) , key , value ; ( index < 0 ) && ( index = header . length ) ; key = header . substr ( 0 , index ) ; value = header . substr ( index + 1 ) ; return { key : _ . trim ( key ) , value : _ . trim ( value ) } ; }
Parses a single Header.

@param {String} header
@returns {{key: string, value: string}}
Parses a single Header .