lib/rules/shebang.js
function getShebangInfo(sourceCode) {
    const m = SHEBANG_PATTERN.exec(sourceCode.text)

    return {
        bom: sourceCode.hasBOM,
        cr: Boolean(m && m[2]),
        length: (m && m[0].length) || 0,
        shebang: (m && m[1] && `${m[1]}\n`) || "",
    }
}
function getShebangInfo(sourceCode) {
    const m = SHEBANG_PATTERN.exec(sourceCode.text)

    return {
        bom: sourceCode.hasBOM,
        cr: Boolean(m && m[2]),
        length: (m && m[0].length) || 0,
        shebang: (m && m[1] && `${m[1]}\n`) || "",
    }
}
function getShebangInfo ( sourceCode ) { const m = SHEBANG_PATTERN . exec ( sourceCode . text ) return { bom : sourceCode . hasBOM , cr : Boolean ( m && m [ 2 ] ) , length : ( m && m [ 0 ] . length ) || 0 , shebang : ( m && m [ 1 ] && ` ${ m [ 1 ] } \n ` ) || "" , } }
Gets the shebang line (includes a line ending) from a given code.

@param {SourceCode} sourceCode - A source code object to check.
@returns {{length: number, bom: boolean, shebang: string, cr: boolean}}
shebang's information.
`retv.shebang` is an empty string if shebang doesn't exist.
Gets the shebang line ( includes a line ending ) from a given code .