Skip to content

Commit 5385544

Browse files
author
Fletcher91
committed
Export factory helpers
1 parent 6eaeb45 commit 5385544

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/factoryHelpers.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import rdfFactory, { Feature, Quad, Term } from "@ontologies/core";
22

3+
/** @internal */
34
export const equals = rdfFactory.supports[Feature.identity]
45
? (a: any, b: any): boolean => a === b
56
: rdfFactory.supports[Feature.idStamp]
@@ -10,6 +11,7 @@ const noIdError = (obj: any): void => {
1011
throw new TypeError(`Factory has idStamp feature, but the property wasn't present on ${obj}`);
1112
};
1213

14+
/** @internal */
1315
export const id = rdfFactory.supports[Feature.idStamp]
1416
? (obj?: Term | Quad | any): number => (obj as any)?.id || noIdError(obj)
1517
: (obj?: Term | Quad | any): number => rdfFactory.id(obj);

src/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import { LinkedRenderStore } from "./LinkedRenderStore";
22

33
export { createStore } from "./createStore";
4+
/** @internal */
5+
export * from "./factoryHelpers";
46
export { linkMiddleware } from "./linkMiddleware";
57
export { DataProcessor } from "./processor/DataProcessor";
68
export { RequestInitGenerator } from "./processor/RequestInitGenerator";

0 commit comments

Comments
 (0)