Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

to-single-quotes

sindresorhus290.5kMIT4.0.0

Convert matching double-quotes to single-quotes: I "love" unicornsI 'love' unicorns

normalize, quotes, quote, single, singlequotes, single-quotes, text, convert, string, code, matching, replace

readme

to-single-quotes

Convert matching double-quotes to single-quotes: I "love" unicornsI 'love' unicorns

Install

$ npm install to-single-quotes

Usage

import toSingleQuotes from 'to-single-quotes';

toSingleQuotes('I love "unicorns" \'and\' "ponies"');
//=> "I love 'unicorns' 'and' 'ponies'"