UNPKG

@buka/nestjs-config

Version:
12 lines (11 loc) 279 B
export function parseValue(value, jsonParse) { if ((jsonParse === undefined || jsonParse === true) && typeof value === 'string') { try { return JSON.parse(value); } catch (e) { return value; } } return value; }