@rdfx/builder 0.0.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4 @@
1
+ import type { NamespaceBuilder } from "@rdfjs/namespace";
2
+ import type { NamedNode } from "@rdfjs/types";
3
+ export declare function toIri<NamespaceT extends NamespaceBuilder>(iri: keyof NamespaceT | NamedNode, namespace: NamespaceT): NamedNode;
4
+ //# sourceMappingURL=toIri.d.ts.map
package/dist/toIri.js ADDED
@@ -0,0 +1,11 @@
1
+ export function toIri(iri, namespace) {
2
+ switch (typeof iri) {
3
+ case "object":
4
+ return iri;
5
+ case "string":
6
+ return namespace(iri);
7
+ default:
8
+ throw new RangeError(typeof iri);
9
+ }
10
+ }
11
+ //# sourceMappingURL=toIri.js.map
package/package.json ADDED
@@ -0,0 +1,41 @@
1
+ {
2
+ "dependencies": {
3
+ "@rdfx/data-factory": "0.0.19",
4
+ "@rdfx/resource": "0.0.19",
5
+ "@rdfjs/namespace": "~2.0.1",
6
+ "@rdfjs/types": "~2.0.1",
7
+ "@types/rdfjs__namespace": "~2.0.10",
8
+ "purify-ts": "~2.1.4",
9
+ "ts-invariant": "~0.10.3"
10
+ },
11
+ "devDependencies": {
12
+ "@rdfx/fs": "0.0.19",
13
+ "@shaclmate/compiler": "4.0.52",
14
+ "@tpluscode/rdf-ns-builders": "~4.3.0",
15
+ "ts-log": "~3.0.2"
16
+ },
17
+ "files": [
18
+ "LICENSE",
19
+ "dist/*.d.ts",
20
+ "dist/*.js"
21
+ ],
22
+ "license": "Apache-2.0",
23
+ "main": "./dist/index.js",
24
+ "name": "@rdfx/builder",
25
+ "packageManager": "npm@11.11.0",
26
+ "repository": {
27
+ "type": "git",
28
+ "url": "git+https://github.com/minorg/rdfx.git"
29
+ },
30
+ "scripts": {
31
+ "build": "tsc -b",
32
+ "clean": "rimraf dist",
33
+ "depcheck": "depcheck .",
34
+ "dev": "tsc -w --preserveWatchOutput",
35
+ "dev:tests": "tsc -p __tests__ -w --preserveWatchOutput",
36
+ "test": "cd ../.. && vitest run /Users/minor/projects/rdfx/packages/builder/__tests__"
37
+ },
38
+ "type": "module",
39
+ "types": "./dist/index.d.ts",
40
+ "version": "0.0.19"
41
+ }