UNPKG

pragmatic-fp-ts

Version:

Opinionated functional programming library with easy use in mind

13 lines (12 loc) 380 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.prop = void 0; const main_1 = require("./main"); function prop(path, input) { if (arguments.length === 1) { return (i) => prop(path, i); } const i = input || {}; return path instanceof Array ? (0, main_1.getIn)(path, i) : (0, main_1.get)(path, i); } exports.prop = prop;