| Leo Repp | 58b9f11 | 2021-11-22 11:57:47 +0100 | [diff] [blame^] | 1 | /** Used to match wrap detail comments. */ |
| 2 | var reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/, |
| 3 | reSplitDetails = /,? & /; |
| 4 | |
| 5 | /** |
| 6 | * Extracts wrapper details from the `source` body comment. |
| 7 | * |
| 8 | * @private |
| 9 | * @param {string} source The source to inspect. |
| 10 | * @returns {Array} Returns the wrapper details. |
| 11 | */ |
| 12 | function getWrapDetails(source) { |
| 13 | var match = source.match(reWrapDetails); |
| 14 | return match ? match[1].split(reSplitDetails) : []; |
| 15 | } |
| 16 | |
| 17 | module.exports = getWrapDetails; |