ZhuangER
9/12/2018 - 8:31 PM

isJSON

isJSON

const _ = require('lodash');

const isJSON = str => !_.isError(_.attempt(JSON.parse, str));