Convert straight quotes to smart quotes
npm i @rafaelrinaldi/curlyq
$ curlyq
Usage: curlyq [-] [STRING] [FILE]
Convert straight quotes to smart quotes
Example:
$ curlyq \""That's a 'magic' shoe.\""
“That’s a ‘magic’ shoe.”
Via stdin:
$ echo \""That's a 'magic' shoe.\"" | curlyq
“That’s a ‘magic’ shoe.”
Via file:
$ echo \""That's a 'magic' shoe.\"" > file.txt
$ curlyq file.txt
“That’s a ‘magic’ shoe.”
Options:
-v --version Display current program version
-h --help Display help and usage details
const { curlyq } = require('@rafaelrinaldi/curlyq')
curlyq(`"That's a 'magic shoe."`) //=> “That’s a ‘magic’ shoe.”
You must include React as a dependency first:
npm i react -S
import React, { FunctionComponent } from 'react'
import { CurlyQ } from '@rafaelrinaldi/curlyq'
export const App: FunctionComponent = () => (
<CurlyQ>
"That's a 'magic' shoe."
<div>
also
<div>
works
<div>
with
<div style={{ background: 'gold' }}>
"deeply" nested nodes
</div>
</div>
</div>
</div>
</CurlyQ>
)
MIT © Rafael Rinaldi