Napolean Paced Mischeviously
    Have ideas to improve npm?Join in the discussion! »

    quotation
    TypeScript icon, indicating that this package has built-in type declarations

    2.0.1 • Public • Published

    quotation

    Build Coverage Downloads Size

    Quote a value.

    Install

    This package is ESM only: Node 12+ is needed to use it and it must be imported instead of required.

    npm:

    npm install quotation

    Use

    import {quotation} from 'quotation'
    
    quotation('one') // => '"one"'
    quotation(['one', 'two']) // => ['"one"', '"two"']
    quotation('one', "'") // => '\'one\''
    quotation('one', '“', '”') // => '“one”'

    API

    This package exports the following identifiers: quotation. There is no default export.

    quotation(value[, open[, close]])

    Quote a value.

    Parameters
    • value (string or string[]) — Value to wrap in quotes
    • open (string, default: ") — Character to add at start of value
    • close (string, default: open or ") — Character to add at end of value

    License

    MIT © Titus Wormer

    Install

    npm i quotation

    DownloadsWeekly Downloads

    16,950

    Version

    2.0.1

    License

    MIT

    Unpacked Size

    5.89 kB

    Total Files

    5

    Last publish

    Collaborators

    • avatar