Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "assert/is-json/docs/types/index.d"

Index

Functions

Functions

Export assignment isJSON

  • isJSON(value: any): boolean
  • Tests if a value is a parseable JSON string.

    Parameters

    • value: any

      value to test

    Returns boolean

    boolean indicating if a value is a parseable JSON string

    Example

    var v = isJSON( '{"a":5}' );
    // returns true

    Example

    var v = isJSON( '{a":5}' );
    // returns false