@rafaelrinaldi/curlyq
Convert straight quotes to smart quotes
Last updated a month ago by rafaelrinaldi .
MIT · Repository · Bugs · Original npm · Tarball · package.json
$ cnpm install @rafaelrinaldi/curlyq 
SYNC missed versions from official npm registry.

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

Current Tags

  • 0.3.0                                ...           latest (a month ago)

3 Versions

  • 0.3.0                                ...           a month ago
  • 0.2.0                                ...           a month ago
  • 0.1.0                                ...           a month ago
Maintainers (1)
Downloads
Today 0
This Week 0
This Month 0
Last Day 0
Last Week 0
Last Month 31
Dependencies (3)
Dependents (0)
None

Copyright 2014 - 2017 © taobao.org |