# speckle

> Create SPARQL rules and queries using a typed API

Latest version **0.2.1** (published 2015-10-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install speckle
pnpm add speckle
yarn add speckle
bun add speckle
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.2.1 |
| Published | 2015-10-26 |
| First published | 2015-07-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Christy Haragan |
| Maintainers | christyharagan |
| Keywords | sparql, builder, typescript |

## Links

- npm: https://www.npmjs.com/package/speckle
- Repository: https://github.com/christyharagan/speckle
- Homepage: https://github.com/christyharagan/speckle#readme
- Issues: https://github.com/christyharagan/speckle/issues
- npm.io page: https://npm.io/package/speckle

## Alternatives

- [@openai/codex-sdk](https://npm.io/package/@openai/codex-sdk.md) — 731.4K weekly downloads
- [babel-plugin-transform-react-jsx](https://npm.io/package/babel-plugin-transform-react-jsx.md) — 565.0K weekly downloads
- [babel-helper-remove-or-void](https://npm.io/package/babel-helper-remove-or-void.md) — 508.5K weekly downloads
- [@pnpm/store-controller-types](https://npm.io/package/@pnpm/store-controller-types.md) — 186.9K weekly downloads
- [react-native-signature-canvas](https://npm.io/package/react-native-signature-canvas.md) — 155.6K weekly downloads

## Recent versions

- 0.2.1 (latest) — 2015-10-26
- 0.2.0 — 2015-09-21
- 0.1.3 — 2015-09-06
- 0.1.2 — 2015-07-16
- 0.1.1 — 2015-07-14
- 0.1.0 — 2015-07-08

## README

Speckle Library
==

Overview
--

Create SPARQL rules and queries using a typed API

Usage
--

Install:
```
npm install speckle
```

Basic Usage:

```TypeScript
import * as s from 'speckle'

let ex = s.prefix('l', 'http://example/')

// Create a sparql rule set
let city = s.variable('city')
let country = s.variable('country')
let continent = s.variable('continent')

let rule = rule('cityInContinent')
  .when(city, ex.uri('isIn'), country)
  .and(country, ex.uri('isPartOf'), continent)
  .then(city, ex.uri('isIn'), continent)

// Serialise to SPARQL
let sparql = rule.toSparql()

// Create a sparql query
let query = s.select(continent).where(ex.uri('London'), logic.uri('isIn'), continent)

// Serialise to SPARQL
sparql = query.toSparql()
```

---
_Source: https://npm.io/package/speckle · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
