UNPKG

dnd-core

Version:

Drag and drop sans the GUI

25 lines 835 B
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); var intersection_1 = __importDefault(require("lodash/intersection")); exports.NONE = []; exports.ALL = []; /** * Determines if the given handler IDs are dirty or not. * * @param dirtyIds The set of dirty handler ids * @param handlerIds The set of handler ids to check */ function areDirty(dirtyIds, handlerIds) { if (dirtyIds === exports.NONE) { return false; } if (dirtyIds === exports.ALL || typeof handlerIds === 'undefined') { return true; } return intersection_1.default(handlerIds, dirtyIds).length > 0; } exports.areDirty = areDirty; //# sourceMappingURL=dirtiness.js.map