Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including quotation with all npm packages installed. Try it out:

var quotation = require("quotation")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

quotation v1.1.2

Quote a value

quotation

Build Coverage Downloads Size

Quote a value.

Installation

npm:

npm install quotation

Usage

var quotation = require('quotation')

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

API

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

Quote a value.

Parameters
  • value (string or Array.<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

Metadata

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free