Security News
tea.xyz Spam Plagues npm and RubyGems Package Registries
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
rdf-sparql-builder
Advanced tools
Readme
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 136 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 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
Tea.xyz, a crypto project aimed at rewarding open source contributions, is once again facing backlash due to an influx of spam packages flooding public package registries.
Security News
As cyber threats become more autonomous, AI-powered defenses are crucial for businesses to stay ahead of attackers who can exploit software vulnerabilities at scale.
Security News
UnitedHealth Group disclosed that the ransomware attack on Change Healthcare compromised protected health information for millions in the U.S., with estimated costs to the company expected to reach $1 billion.