Files
NapCatQQ/.pnpm-store/v3/files/bc/0fa258152e94c976121d8509e50376f6c86280bebea04bfc12e7d074419125013fef627ee64cb00d387affc12cb4ac2abe5ab074e0d5f06c5927c844845a76
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

13 lines
591 B
Plaintext

import { IndexFromPropertyKeys } from '../indexed/indexed.mjs';
import { KeyOfPropertyKeys } from './keyof-property-keys.mjs';
/**
* `[Utility]` Resolves an array of keys and schemas from the given schema. This method is faster
* than obtaining the keys and resolving each individually via indexing. This method was written
* accellerate Intersect and Union encoding.
*/
export function KeyOfPropertyEntries(schema) {
const keys = KeyOfPropertyKeys(schema);
const schemas = IndexFromPropertyKeys(schema, keys);
return keys.map((_, index) => [keys[index], schemas[index]]);
}