UNPKG

pragmatic-fp-ts

Version:

Opinionated functional programming library with easy use in mind

11 lines (10 loc) 403 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.whereEq = void 0; const main_1 = require("./main"); function whereEq(pattern, dict) { if (arguments.length === 1) return (_dict) => whereEq(pattern, _dict); return Object.keys(pattern).reduce((success, key) => success && (0, main_1.equals)(pattern[key], dict[key]), true); } exports.whereEq = whereEq;