-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
22 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,26 @@ | ||
# @rdfjs/data-model | ||
[![build status](https://img.shields.io/github/workflow/status/rdfjs-base/data-model/Test)](https://github.com/rdfjs-base/data-model/actions/workflows/test.yaml) | ||
[![npm version](https://img.shields.io/npm/v/@rdfjs/data-model.svg)](https://www.npmjs.com/package/@rdfjs/data-model) | ||
|
||
[![Build Status](https://img.shields.io/github/workflow/status/rdfjs-base/data-model/CI)](https://github.com/rdfjs-base/data-model/actions/workflows/ci.yaml) | ||
A basic implementation of the [RDF/JS Data Model](http://rdf.js.org/data-model-spec/). | ||
|
||
[![npm version](https://img.shields.io/npm/v/@rdfjs/data-model.svg)](https://www.npmjs.com/package/@rdfjs/data-model) | ||
## Usage | ||
|
||
Use the following command to add the package as a dependency to your project: | ||
|
||
```bash | ||
npm install @rdfjs/data-model --save | ||
``` | ||
|
||
The main entry point of the package exports an [RDF/JS DataFactory](http://rdf.js.org/data-model-spec/#datafactory-interface) instance. | ||
See the following lines on how to import and use the library: | ||
|
||
``` | ||
import dataFactory from '@rdfjs/data-model' | ||
A basic implementation of the [RDF/JS Data Model](http://rdf.js.org/). | ||
See [the specification](http://rdf.js.org/) for further details. | ||
const quad = dataFactory.quad( | ||
dataFactory.blankNode(), | ||
dataFactory.namedNode('http://schema.org/name'), | ||
dataFactory.literal('RDF/JS Data model') | ||
) | ||
``` |