toString

Type:Function
Status:stable
Since:1.0.0
Platform:jsnode
@blackbyte.sugar.shared.string

Convert passed value to a string

Params

  1. value*-Mixed

    The value to convert to string

  2. settings{}Object

    An object of settings to configure your toString process:

Return

  1. -String

    The resulting string

Example

import { toString } from '@blackbyte/sugar/string'
toString({
	id:'hello'
}) // '{"id":"hello"}'

Settings

  1. beautifytrueBoolean

    Specify if you want to beautify the output like objects, arrays, etc…

  2. verbosetrueBoolean

    Specify if you want to output verbose information like stack trace, etc…

Todo

  • testsnormal