rdf-canonize
Advanced tools
Changelog
4.0.0 - 2023-11-15
inputFormat
option. Use "application/n-quads" for a N-Quads string that
will be parsed. Omit option for a JSON dataset. This can simplify a common
case of using the internal parser to generate a dataset.
inputFormat
option was previously ignored and is now used.
Any calling code that was passing in an incorrect value needs to be fixed.signal
option to allow use of an AbortSignal
for complexity control.
Enables the algorithm to abort after a timeout, manual abort, or other
condition.maxWorkFactor
to calculate a deep iteration limit based on the number
of non-unique blank nodes. This defaults to 1
for roughly O(n) behavior and
will handle common graphs. It must be adjusted to higher values if there is a
need to process graphs with complex blank nodes or other "poison" graphs. It
is recommended to use this parameter instead of maxDeepIterations
directly.
If maxDeepIterations
is provided, then maxWorkFactor
will be ignored.format
parameter. Must be omitted, falsy, or
"application/n-quads".EARL_OFFICIAL
env flag to setup official test report mode."react-native"
section to package.json
(same as "browser"
), and
instructions for how to use this library with React Native.rejectURDNA2015
is available to disable
"URDNA2015" support. A global RDF_CANONIZE_TRACE_URDNA2015
is available to
developers to trace calls that use "URDNA2015". See the README for important
compatibility notes and API details.ECHAR
or UCHAR
instead of using
a native representation.
\u000A
(\n
), \u000D
(\r
), \u0022
("
), and \u005C
(\
) as ECHARs
:
\n
, \r
, \"
, and \\
, All other characters were represented as native
Unicode.\u0008
(\b
), \u0009
(\t
), \u000C
(\f
) as ECHARs
\b
, \t
, and \f
, and encodes the "control"
characters in the range of \u0000-\u001F
and \u007F
as UCHARs
\u00xx
. All other characters are represented as native Unicode.globalThis
to access crypto
in browsers. Use a polyfill
if your environment doesn't support globalThis
.BlankNodes
to match the RDF/JS:
Data model specification. The _:
prefix is no longer used in the BlankNode
value
field. This should
improve compatibility with other RDF/JS tooling but may cause compatibility
issues with existing code. The previous behavior is historical and may
predate the RDF/JS spec.MessageDigest-browser.js
to MessageDigest-webcrypto.js
so it can
also be optionally used with Node.js.platform.js
and platform-browser.js
.Buffer
conversion can be ~5-12% faster overall.BlankNode
predicate during N-Quads serialization.benchmark/benchmark.js
tool in favor of combined test system and
benchmarking control via environment vars.Changelog
3.4.0 - 2023-05-19
canonicalIdMap
to be passed to canonize
which will be populated by
the canonical identifier issuer with the bnode identifier mapping generated
by the canonicalization algorithm. This feature is particularly useful when
the resulting bnode labels need to be changed for use cases such as selective
disclosure.Changelog
3.3.0 - 2022-09-17
createMessageDigest
factory function for generating a
MessageDigest
interface. This allows different hash implementations or even
different hash algorithms, including HMACs to be used with URDNA2015. Note
that using a different hash algorithm from SHA-256 will change the output.Changelog
3.1.0 - 2022-08-30
1
, which will cause, at most, each blank node to have the N-degree algorithm
executed on it just once.Changelog
3.0.0 - 2021-04-07
node6
output.Changelog
2.0.1 - 2021-01-21
setimmediate
package for setImmediate
polyfill. The previous custom
polyfill was removed. This should allow current projects using this package
to stay the same and allow an easy future transition to webpack v5.Changelog
2.0.0 - 2021-01-20
canonizeSync
. It is still available
for testing purposes but does not run in the browser.forge
which means that this library
will only run in browsers that have support for the WebCrypto API (or
an external polyfill for it).existing
on IdentifierIssuer
. The old
IDs can be retrieved in order via getOldIds
.getOldIds
function to IdentifierIssuer
.