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-sparql-builder
Advanced tools
rdf-sparql-builder
helps building SPARQL queries in JavaScript code.
Instead of error-prone string concatenations, method chaining allows writing queries without switching the programming language.
The RDF/JS data model is used for terms like named nodes and variables.
The package exports an object with all the required functions. It can be imported in your code like this:
import * as sparql from 'rdf-sparql-builder'
The following example shows how to build a simple query.
The examples
folder contains more examples showing all kinds of features supported by the package.
import rdf from '@rdfjs/data-model'
import namespace from '@rdfjs/namespace'
import * as sparql from 'rdf-sparql-builder'
const ns = {
ex: namespace('http://example.org/'),
rdf: namespace('http://www.w3.org/1999/02/22-rdf-syntax-ns#type')
}
const observation = rdf.variable('observation')
const date = rdf.variable('date')
const temperature = rdf.variable('temperature')
const query = sparql.select([date, temperature])
.where([
[observation, ns.rdf.type, ns.ex.Observation],
[observation, ns.ex.date, date],
[observation, ns.ex.temperature, temperature]
])
console.log(query.toString())
FAQs
SPARQL query builder
The npm package rdf-sparql-builder receives a total of 172 weekly downloads. As such, rdf-sparql-builder popularity was classified as not popular.
We found that rdf-sparql-builder demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.