Skip to content

Commit

Permalink
refactor: rename asRegisterItems to be specific
Browse files Browse the repository at this point in the history
  • Loading branch information
strogonoff committed Dec 14, 2023
1 parent 18dde21 commit b5332ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion packages/common/src/glossary.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ export interface GlossaryRegisterConfig extends RegisterConfiguration<{
* Converts a stream of ID & localized concept tuples
* to a stream of objects with register item keyed by class ID.
*/
export async function * asRegisterItems(
export async function * asRegisterItemsWithInferredUniversal(
concepts: AsyncGenerator<LocalizedConceptData, void, undefined>,
opts?: RegisterItemConversionOpts,
): AsyncGenerator<RegisterItemsByClassID<GlossaryRegisterConfig>, void, undefined> {
Expand Down
6 changes: 3 additions & 3 deletions packages/x3duom/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import {
type GlossaryRegisterConfig,
type LinkParser,
processLinks,
asRegisterItems,
asRegisterItemsWithInferredUniversal,
} from '../../common/src/glossary.js';


Expand Down Expand Up @@ -106,13 +106,13 @@ const generateRegisterItems: X3DUOMConvertor["generateRegisterItems"] =
async function * generateGlossaryRegisterItems(itemGenerator, opts) {
console.info("LINKS?", opts?.urnNamespace);
const stream = opts?.urnNamespace
? processLinks(parseLinks, asRegisterItems(itemGenerator, opts), {
? processLinks(parseLinks, asRegisterItemsWithInferredUniversal(itemGenerator, opts), {
linkURNPrefix: opts.urnNamespace,
onProgress: opts.onProgress
? function (msg) { opts!.onProgress!(`Process links: ${msg}`); }
: undefined,
})
: asRegisterItems(itemGenerator, opts);
: asRegisterItemsWithInferredUniversal(itemGenerator, opts);
yield * stream;

//if (opts?.urnNamespace) {
Expand Down

0 comments on commit b5332ee

Please sign in to comment.