-
Convert from template literal format.
Find:
chalk`(.*)\{([a-z]+) (.+)\}
Replace:$1${chalk.$2(`$3`)}
sed syntax:s/chalk`(.*)\{([a-z]+) (.+)\}/$1${chalk.$2(`$3`)}/g
-
Convert
chalk.foo(`${bar}`)
tochalk.foo(bar)
.Find:
\(`\$\{([^`{}]+)\}`\)
Replace:($1)
sed syntax:s/\(`\$\{([^`{}]+)\}`\)/($1)/g
Created
February 22, 2024 13:11
-
-
Save Hans5958/5e373f85183252ce5713b5151327eebd to your computer and use it in GitHub Desktop.
Converting from chalk-template to chalk with replace-all feature.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment