mirror of
https://github.com/nvms/prsm.git
synced 2025-12-16 00:00:52 +00:00
19 lines
388 B
TypeScript
19 lines
388 B
TypeScript
import { Collection } from "../..";
|
|
import { appendProps } from "../../append_props";
|
|
import { ensureArray } from "../../utils";
|
|
|
|
export function $merge<T>(
|
|
source: T[],
|
|
modifiers: any,
|
|
query: object,
|
|
collection: Collection<T>
|
|
): T[] {
|
|
const mods = ensureArray(modifiers);
|
|
|
|
mods.forEach((mod) => {
|
|
source = appendProps(source, query, mod, true);
|
|
});
|
|
|
|
return source;
|
|
}
|