'use strict';

function camelToSnakeCase(camelStr) {
  return camelStr.split(/(?=[A-Z])/).map(s => s.toLowerCase()).join('-');
}

/** Handle formatting. Currently supports the following special characters:
 * - `&t;` - Adds tab (2 spaces)
 */
const docsSpecialReplace = (val) => {
  // Add any new mappings here and update function docstring
  const specialCharacters = {
    '&t;': '  '
  };
  if (val) {
    let result = val.slice();
    Object.keys(specialCharacters).forEach((char) => {
      const regex = new RegExp(char, 'g');
      result = result.replace(regex, specialCharacters[char]);
    });
    return result;
  }
};

exports.camelToSnakeCase = camelToSnakeCase;
exports.docsSpecialReplace = docsSpecialReplace;

//# sourceMappingURL=docs-playground-common-7fc01113.js.map