UNPKG

type-plus

Version:
14 lines 402 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.JSONTypes = void 0; exports.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