@@ -119,6 +119,7 @@ const _resolvedContextCache = new LRU({max: RESOLVED_CONTEXT_CACHE_MAX_SIZE});
119119 * unmappable values (or to throw an error when they are detected);
120120 * if this function returns `undefined` then the default behavior
121121 * will be used.
122+ * [handleEvent] handler for events such as warnings.
122123 * [contextResolver] internal use only.
123124 *
124125 * @return a Promise that resolves to the compacted output.
@@ -257,6 +258,7 @@ jsonld.compact = async function(input, ctx, options) {
257258 * unmappable values (or to throw an error when they are detected);
258259 * if this function returns `undefined` then the default behavior
259260 * will be used.
261+ * [handleEvent] handler for events such as warnings.
260262 * [contextResolver] internal use only.
261263 *
262264 * @return a Promise that resolves to the expanded output.
@@ -354,6 +356,7 @@ jsonld.expand = async function(input, options) {
354356 * [base] the base IRI to use.
355357 * [expandContext] a context to expand with.
356358 * [documentLoader(url, options)] the document loader.
359+ * [handleEvent] handler for events such as warnings.
357360 * [contextResolver] internal use only.
358361 *
359362 * @return a Promise that resolves to the flattened output.
@@ -409,6 +412,7 @@ jsonld.flatten = async function(input, ctx, options) {
409412 * [requireAll] default @requireAll flag (default: true).
410413 * [omitDefault] default @omitDefault flag (default: false).
411414 * [documentLoader(url, options)] the document loader.
415+ * [handleEvent] handler for events such as warnings.
412416 * [contextResolver] internal use only.
413417 *
414418 * @return a Promise that resolves to the framed output.
@@ -507,6 +511,7 @@ jsonld.frame = async function(input, frame, options) {
507511 * [base] the base IRI to use.
508512 * [expandContext] a context to expand with.
509513 * [documentLoader(url, options)] the document loader.
514+ * [handleEvent] handler for events such as warnings.
510515 * [contextResolver] internal use only.
511516 *
512517 * @return a Promise that resolves to the linked output.
@@ -542,6 +547,7 @@ jsonld.link = async function(input, ctx, options) {
542547 * 'application/n-quads' for N-Quads.
543548 * [documentLoader(url, options)] the document loader.
544549 * [useNative] true to use a native canonize algorithm
550+ * [handleEvent] handler for events such as warnings.
545551 * [contextResolver] internal use only.
546552 *
547553 * @return a Promise that resolves to the normalized output.
@@ -596,6 +602,7 @@ jsonld.normalize = jsonld.canonize = async function(input, options) {
596602 * (default: false).
597603 * [useNativeTypes] true to convert XSD types into native types
598604 * (boolean, integer, double), false not to (default: false).
605+ * [handleEvent] handler for events such as warnings.
599606 *
600607 * @return a Promise that resolves to the JSON-LD document.
601608 */
@@ -645,6 +652,7 @@ jsonld.fromRDF = async function(dataset, options) {
645652 * [produceGeneralizedRdf] true to output generalized RDF, false
646653 * to produce only standard RDF (default: false).
647654 * [documentLoader(url, options)] the document loader.
655+ * [handleEvent] handler for events such as warnings.
648656 * [contextResolver] internal use only.
649657 *
650658 * @return a Promise that resolves to the RDF dataset.
@@ -698,6 +706,7 @@ jsonld.toRDF = async function(input, options) {
698706 * [expandContext] a context to expand with.
699707 * [issuer] a jsonld.IdentifierIssuer to use to label blank nodes.
700708 * [documentLoader(url, options)] the document loader.
709+ * [handleEvent] handler for events such as warnings.
701710 * [contextResolver] internal use only.
702711 *
703712 * @return a Promise that resolves to the merged node map.
@@ -737,6 +746,7 @@ jsonld.createNodeMap = async function(input, options) {
737746 * new properties where a node is in the `object` position
738747 * (default: true).
739748 * [documentLoader(url, options)] the document loader.
749+ * [handleEvent] handler for events such as warnings.
740750 * [contextResolver] internal use only.
741751 *
742752 * @return a Promise that resolves to the merged output.
@@ -899,6 +909,7 @@ jsonld.get = async function(url, options) {
899909 * @param localCtx the local context to process.
900910 * @param [options] the options to use:
901911 * [documentLoader(url, options)] the document loader.
912+ * [handleEvent] handler for events such as warnings.
902913 * [contextResolver] internal use only.
903914 *
904915 * @return a Promise that resolves to the new active context.
0 commit comments