@rafaelrinaldi/curlyq
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

curlyq Actions Status

Convert straight quotes to smart quotes

Install

npm i @rafaelrinaldi/curlyq

Usage

CLI

$ 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

Node.js

const { curlyq } = require('@rafaelrinaldi/curlyq')
curlyq(`"That's a 'magic shoe."`) //=> “That’s a ‘magic’ shoe.”

React Component

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>
)

License

MIT © Rafael Rinaldi

Package Sidebar

Install

npm i @rafaelrinaldi/curlyq

Weekly Downloads

0

Version

0.3.0

License

MIT

Unpacked Size

49.7 kB

Total Files

13

Last publish

Collaborators

  • rafaelrinaldi