Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
@rdf-esm/namespace
Advanced tools
Named Node builder.
This package is an ES Modules fork of @rdfjs/namespace
The original, commonjs version is used node environment.
The package exports a factory to create builders for Named Nodes.
The baseIRI
given to the factory will be used together with the parameter given to the builder to create Named Nodes.
The factory must be called with the baseIRI
as a string:
const builder = namespace('http://example.org/base-iri#')
An optional factory can be defined:
const builder = namespace('http://example.org/base-iri#', { factory: customFactory })
By default @rdf-esm/data-model
is used.
The builder can be called in three different ways:
builder('property')
)builder`property`
)builder.property
)Calling the builder using the propery requires Proxy support. At the moment IE11 is the only major platform which doesn't support Proxy.
This example shows how to create a builder and create Named Nodes using the three different ways. The properties of the Named Nodes are written to the console.
import namespace from '@rdf-esm/namespace'
const schema = namespace('http://schema.org/')
const hasPart = schema('hasPart')
console.log(hasPart.termType) // NamedNode
console.log(hasPart.value) // http://schema.org/hasPart
const person = schema`Person`
console.log(person.termType) // NamedNode
console.log(person.value) // http://schema.org/Person
const comment = schema.Comment
console.log(comment.termType) // NamedNode
console.log(comment.value) // http://schema.org/Comment
FAQs
Named Node builder
We found that @rdf-esm/namespace 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
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.