imagerot
Version:
A lightweight, cross-environment image library for applying unique effects via raw image buffers.
17 lines (16 loc) • 426 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getPixelOps = void 0;
const hasPixelOp = (item) => {
return item.pixelOp !== undefined;
};
const getPixelOps = (effects) => {
return Object.entries(effects)
.reduce((acc, [k, v]) => {
if (hasPixelOp(v)) {
acc[k] = v.pixelOp;
}
return acc;
}, {});
};
exports.getPixelOps = getPixelOps;