print-value

1.0.0 • Public • Published

print-value Build Status

Generate a printable representation of a JS value

Install

$ npm install --save print-value

Usage

var print = require('print-value')
 
print('string')
//=> string
 
print({foo: 'bar'})
//=> {"foo":"bar"}

API

print(value) -> string

value

Required
Type: any

Any value to return in printable form. Objects and arrays are stringified using JSON.stringify, while other values are coerced to strings.

License

MIT © Ben Drucker

Package Sidebar

Install

npm i print-value

Weekly Downloads

271

Version

1.0.0

License

MIT

Last publish

Collaborators

  • bendrucker