/**
 * Copyright (c) 2015-present, Facebook, Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */ import { ScriptLine } from './stack-frame' ; param { number } line param { number } count param { string [ ] | string } lines function getLinesAround ( line , count , lines ) { if ( typeof lines === 'string' ) { lines = lines . split ( '\n' ) ; } const result = [ ] ; for ( let index = Math . max ( 0 , line - 1 - count ) ; index <= Math . min ( lines . length - 1 , line - 1 + count ) ; ++ index ) { result . push ( new ScriptLine ( index + 1 , lines [ index ] , index === line - 1 ) ) ; } return result ; } export { getLinesAround } ; export default getLinesAround ;