mirror of
https://github.com/filecoin-project/slate.git
synced 2024-11-29 16:54:09 +03:00
9 lines
289 B
JavaScript
9 lines
289 B
JavaScript
import { getFilterHandler } from "~/common/filter-utilities";
|
|
|
|
onmessage = function (e) {
|
|
const { objects = [], view, subview, type } = e.data;
|
|
const filterCallback = getFilterHandler({ view, subview, type });
|
|
const result = objects.filter(filterCallback);
|
|
postMessage(result);
|
|
};
|