parse

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

Parse a string and convert it into his native data type like date, number, boolean, etc… This function take care of the following types:

  • boolean
  • number
  • null
  • undefined
  • json

Params

  1. value*-String

    The value to convert

Return

  1. -Mixed

    The converted value

Example

import { parse } from '@blackbyte/sugar/string';
 parse('10'); // => 10

Todo

  • testsnormal