UNPKG

vue-styleguidist

Version:
21 lines (20 loc) 469 B
import "core-js/modules/es.regexp.exec.js"; import "core-js/modules/es.string.replace.js"; /** * Remove quotes around given string. * * @param {string} string * @returns {string} */ export function unquote(string) { return string.replace(/^['"]|['"]$/g, ''); } /** * Show starting and ending whitespace around given string. * * @param {string} string * @returns {string} */ export function showSpaces(string) { return string.replace(/^\s|\s$/g, '␣'); }