isJson

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

Check if the passed value is a valid json

Params

  1. value*-Mixed

    The value to check

Return

  1. -Boolean

    true if it’s a valid json, false if not

Example

import { isJson } from '@blackbyte/sugar/is'
if (isJson('[{id:10}]')) {
  // do something
}

Todo

  • testsnormal