UNPKG

handsontable

Version:

Handsontable is a JavaScript Data Grid available for React, Angular and Vue.

17 lines (16 loc) 708 B
import "core-js/modules/esnext.iterator.constructor.js"; import "core-js/modules/esnext.iterator.every.js"; import * as C from "../../../i18n/constants.mjs"; import { registerOperation } from "../logicalOperationRegisterer.mjs"; export const OPERATION_ID = 'conjunction'; export const SHORT_NAME_FOR_COMPONENT = C.FILTERS_LABELS_CONJUNCTION; // p AND q AND w AND x AND... === TRUE? /** * @param {Array} conditions An array with values to check. * @param {*} value The comparable value. * @returns {boolean} */ export function operationResult(conditions, value) { return conditions.every(condition => condition.func(value)); } registerOperation(OPERATION_ID, SHORT_NAME_FOR_COMPONENT, operationResult);