UNPKG

pragmatic-fp-ts

Version:

Opinionated functional programming library with easy use in mind

12 lines (11 loc) 381 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.has = void 0; const main_1 = require("./main"); function has(propName, dict) { if (arguments.length === 1) return (theDict) => has(propName, theDict); else return Object.keys((0, main_1.getValueOr)({}, dict)).includes((0, main_1.getValue)(propName)); } exports.has = has;