lib/instrument/findInsertionPoints.js
/**
 * @returns {Array.<insertionPoint>} - List of points within the source code to insert tracing methods
 */
@returns {Array.} - List of points within the source code to insert tracing methods
@returns { Array . } - List of points within the source code to insert tracing methods
function findInsertionPoints( content ) {
	const m = content.match( /^#\!.*?\n/ );
	if ( m ) {
		content = content.slice( m[0].length );
	}
	const ast = espree.parse( content, {
		sourceType: 'module',
		ecmaVersion: 10,
		ecmaFeatures: {
			impliedStrict: true
		}
	} );
	return walkAst( ast );
}
function findInsertionPoints ( content ) { const m = content . match ( / ^#\!.*?\n / ) ; if ( m ) { content = content . slice ( m [ 0 ] . length ) ; } const ast = espree . parse ( content , { sourceType : 'module' , ecmaVersion : 10 , ecmaFeatures : { impliedStrict : true } } ) ; return walkAst ( ast ) ; }
@returns {Array.<insertionPoint>} - List of points within the source code to insert tracing methods
@returns { Array . <insertionPoint > } - List of points within the source code to insert tracing methods