onix-engine 0.1.0 → 0.1.1

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.
package/README.md CHANGED
@@ -59,6 +59,29 @@ official source supplies usage guidance. Use `getThemaEntries()` to retrieve the
59
59
  complete flat list, `getThemaEntry(code)` or `getThemaHeading(code)` for lookup,
60
60
  and `hasThemaCode(code)` for validation.
61
61
 
62
+ ## Application-supplied subject vocabularies
63
+
64
+ Applications can use their own licensed subject data without adding it to this
65
+ package. Supply a normalized document (or its JSON string) to
66
+ `createSubjectVocabulary()`. The ONIX scheme must be a valid List 27 code;
67
+ BISAC Subject Heading uses `"10"`.
68
+
69
+ ```ts
70
+ import { createSubjectVocabulary } from "onix-engine";
71
+
72
+ const bisac = createSubjectVocabulary(await response.text());
73
+
74
+ bisac.getEntry("your-code");
75
+ bisac.getChildren();
76
+ bisac.hasCode("your-code");
77
+ ```
78
+
79
+ The JSON object must contain `onixSchemeCode`, `name`, `version`, and a
80
+ non-empty `entries` array. Each entry requires `code` and `heading`, and may
81
+ contain explicit `parentCode` and `note` values. The calling application is
82
+ responsible for source acquisition, licensing, storage, and upgrades; this
83
+ package does not bundle, scrape, download, or persist external vocabularies.
84
+
62
85
  ## Browser demo
63
86
 
64
87
  After installing dependencies, start the local codelist browser with: