Build NapCat Artifacts / Windows Loader Test (push) Canceled after 0s
Build NapCat Artifacts / Type Check & Test (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Framework (push) Canceled after 0s
Build NapCat Artifacts / Build NapCat.Shell (push) Canceled after 0s
20 lines
773 B
Plaintext
20 lines
773 B
Plaintext
import { MappedResult } from '../mapped/index.mjs';
|
|
import { Pick } from './pick.mjs';
|
|
import { Clone } from '../clone/value.mjs';
|
|
// prettier-ignore
|
|
function FromProperties(properties, propertyKeys, options) {
|
|
const result = {};
|
|
for (const K2 of globalThis.Object.getOwnPropertyNames(properties))
|
|
result[K2] = Pick(properties[K2], propertyKeys, Clone(options));
|
|
return result;
|
|
}
|
|
// prettier-ignore
|
|
function FromMappedResult(mappedResult, propertyKeys, options) {
|
|
return FromProperties(mappedResult.properties, propertyKeys, options);
|
|
}
|
|
// prettier-ignore
|
|
export function PickFromMappedResult(mappedResult, propertyKeys, options) {
|
|
const properties = FromMappedResult(mappedResult, propertyKeys, options);
|
|
return MappedResult(properties);
|
|
}
|