♓️🌟 An ECMAScript library for walking RDF graphs.
Al·rishāʼ is a JavaScript (handcoded ECMAScript 2020) library for walking RDF graphs. Do not use if phrases like currently a very slow operation in every browser and JavaScript engine scare you. This library is designed for flexibility, not performance.
The ASCII name for this library is Alrescha, the International Astronomical Union–approved name for α Piscium, the binary star which links together the Pisces constellation. It derives from the Arabic الرشآء, which is used internally. The preferred romanization is Al·rishāʼ in contexts where Unicode is supported; that’s
A | l | · | r | i | s | h | ā | ʼ | |
---|---|---|---|---|---|---|---|---|---|
U+⁓ | 0041 | 006C | 00B7 | 0072 | 0069 | 0073 | 0068 | 0101 | 02BC |
which, yes, is a valid ECMAScript identifier.
import Al·rishāʼ from "./index.mjs" // call it whatever you want
See DOCUMENTATION for more.
-
Passes all RDF 1.1 Test Cases for RDF 1.1 N‐Triples and RDF 1.1 Turtle.
-
Resource‐based design ideal for programs which do not need complicated RDF graph analysis.
-
Convenient properties for accessing resource information and generating descriptive HTML nodes.
-
Partially implements RDF Interfaces and RDF/JS data models. Note that RDF Interfaces and RDF/JS definitions might conflict somewhat—for example, the RDF Interfaces definition of
RDFNode.toString()
overrides the RDF/JS definition ofTerm.toString()
, with differing results in the case ofBlankNode
. -
Single source file; no imports or dependencies. Does not require DOM to run, only ECMAScript 2020. Designed to interface well with ECMAScript 2020 code.
-
Supports Turtle and N‐Triples I/O.
-
Public domain.
-
Does not validate datatypes. Operations on literals with invalid datatypes (e.g.,
"1.2"^^xsd:integer
) may be somewhat unpredictable. -
HTML output is not sanitized and may include HTML
<SCRIPT>
elements or other unsafe things. -
Not optimized for complex reasoning (e.g., OWL) or operations on huge numbers of triples. Not suitable for Big Data.
-
Not a full implementation of RDF Interfaces or RDF/JS. Objects and methods should communicate perfectly well with other implementations, but no
RDFEnvironment
orDataFactory
is provided. RDF/JS methods assume triples, not quads. -
No support for named graphs, N‐Quads, etc.
-
Not linted, minified, or transpiled.
-
Esoteric source code.
✨ fuck around and find out ✨
(The current default branch provides the latest recommended version for usage. Notable points in development may be “tagged” but there will be no named patch releases.)