You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
479 B

4 years ago
  1. /** Used to match wrap detail comments. */
  2. var reWrapDetails = /\{\n\/\* \[wrapped with (.+)\] \*/,
  3. reSplitDetails = /,? & /;
  4. /**
  5. * Extracts wrapper details from the `source` body comment.
  6. *
  7. * @private
  8. * @param {string} source The source to inspect.
  9. * @returns {Array} Returns the wrapper details.
  10. */
  11. function getWrapDetails(source) {
  12. var match = source.match(reWrapDetails);
  13. return match ? match[1].split(reSplitDetails) : [];
  14. }
  15. module.exports = getWrapDetails;