Skip to content

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

License

Notifications You must be signed in to change notification settings

sindresorhus/to-single-quotes

Repository files navigation

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'"

Related

About

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

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Packages

No packages published