aboutsummaryrefslogtreecommitdiff
path: root/node_modules/lodash/_getWrapDetails.js
blob: 3bcc6e48a37451046d4c271c94ffdc3bcbc9dff9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
/** Used to match wrap detail comments. */
var reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
    reSplitDetails = /,? & /;

/**
 * Extracts wrapper details from the `source` body comment.
 *
 * @private
 * @param {string} source The source to inspect.
 * @returns {Array} Returns the wrapper details.
 */
function getWrapDetails(source) {
  var match = source.match(reWrapDetails);
  return match ? match[1].split(reSplitDetails) : [];
}

module.exports = getWrapDetails;