export function canBeConstructed ( fn ) { try { new fn ( ) ; return true ; } catch { return false ; } } export function isFunction ( obj ) { return typeof obj === 'function' ; } export function isJson ( obj ) { try { return JSON . parse ( obj ) ; } catch { return false ; } }