UNPKG

type-plus

Version:
11 lines 302 B
export const JSONTypes = { get }; function get(obj, ...props) { if (props.length === 0) return obj; if (typeof obj !== 'object' || obj === null) return undefined; const p = props.shift(); // @ts-ignore return get(obj[p], ...props); } //# sourceMappingURL=json.js.map