/** Used to match wrap detail comments. */varreWrapComment=/\{(?:\n\/\*\[wrapped with .+\]\*\/)?\n?/;/** * Inserts wrapper `details` in a comment at the top of the `source` body. * * @private * @param {string} source The source to modify. * @returns {Array} details The details to insert. * @returns {string} Returns the modified source. */functioninsertWrapDetails(source,details){varlength=details.length;if(!length){returnsource;}varlastIndex=length-1;details[lastIndex]=(length>1?'& ':'')+details[lastIndex];details=details.join(length>2?', ':' ');returnsource.replace(reWrapComment,'{\n/* [wrapped with '+details+'] */\n');}module.exports=insertWrapDetails;