
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
sparql-builder
Advanced tools
SPARQL query builder written in TypeScript. Can be used from both TypeScript and JavaScript, although type-safety is lost in JavaScript.
SPARQL query builder written in TypeScript. Can be used from both TypeScript and JavaScript, although type-safety is lost in JavaScript.
It exposes the following classes:
QueryBuilder - builder base class
SelectBuilder - SELECT query builderDescribeBuilder - DESCRIBE query builderThe builder is published as sparql-builder package on npm. Import it into your package.json:
"dependencies": {
"sparql-builder": "^1.0.6"
}
Code in test.ts:
import { SelectBuilder } from 'sparql-builder';
let query = "SELECT ?s { ?s ?p ?o }";
let builder = SelectBuilder.fromString(query).
limit(42).
offset(66).
orderBy(SelectBuilder.ordering(SelectBuilder.var("s"), true)).
orderBy(SelectBuilder.ordering(SelectBuilder.var("p")));
console.log(builder.toString());
Output of tsc && node test.js:
SELECT ?s WHERE { ?s ?p ?o. }
ORDER BY DESC (?s) (?p)
OFFSET 66
LIMIT 42
FAQs
SPARQL query builder written in TypeScript. Can be used from both TypeScript and JavaScript, although type-safety is lost in JavaScript.
We found that sparql-builder 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.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.