Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
@tpluscode/rdf-ns-builders
Advanced tools
@tpluscode/rdf-ns-builders
Common RDF vocabularies extracted from @zazuko/rdf-vocabularies
and wrapped
as @rdfjs/namespace
builder objects.
Also includes TypeScript declarations of the terms included in the known vocabularies as extracted from the actual RDF source file.
const schema = namespace(prefixes.schema)
every so often@rdfjs/namespace
-generated termnpm i -S @tpluscode/rdf-ns-builders
Simply import a namespace builder by its prefix defined in @zazuko/rdf-vocabularies
import { schema } from '@tpluscode/rdf-ns-builders'
import { NamedNode } from '@rdfjs/types'
const schemaPerson: NamedNode = schema.Person
The namespace builders exported from the main module allow arbitrary term, even if they do not exist in the vocabulary. Alternatively, strict builders can be imported which will report compiler errors if a term name is incorrect, such as to prevent typos.
import { schema } from '@tpluscode/rdf-ns-builders/strict'
import { NamedNode } from '@rdfjs/types'
// will show error
const schemaPerson: NamedNode = schema.Persona
Given a package with same exports as @zazuko/rdf-vocabularies
, it is possible to generate a set of namespace builders generated from your own vocabularies.
Install required peer dependencies:
npm i -D ts-node ts-morph clownface @zazuko/rdf-vocabularies
Run the following command to generate builders package by providing the source package name and output directory.
npm run rdf-ns-builders generate -p @my/vocabularies -o builders safe-identifier
This will create a directory source
, containing typescript modules for all vocabularies, similar to those from src.
FAQs
Generated RDF/JS namespace builders for common vocabularies
The npm package @tpluscode/rdf-ns-builders receives a total of 7,014 weekly downloads. As such, @tpluscode/rdf-ns-builders popularity was classified as popular.
We found that @tpluscode/rdf-ns-builders demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.