Skip to content
#

flavortown

Here are 4 public repositories matching this topic...

Language: All
Filter by language
tools
MichaReiser
MichaReiser commented Apr 14, 2022

Prettier detects the ideal quote to use for a string so that the least amount of escaped quotes are necessary:

function getPreferredQuote(rawContent, preferredQuote) {
  /** @type {{ quote: '"', regex: RegExp, escaped: """ }} */
  const double = { quote: '"', regex: /"/g, escaped: """ };
  /** @type {{ quote: "'", regex: RegExp, escaped: "'" }} */
  const single = { quo
good first issue formatter

Improve this page

Add a description, image, and links to the flavortown topic page so that developers can more easily learn about it.

Curate this topic

Add this topic to your repo

To associate your repository with the flavortown topic, visit your repo's landing page and select "manage topics."

Learn more