diff --git a/README.md b/README.md index 6630aab..1913e9c 100644 --- a/README.md +++ b/README.md @@ -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') +) +```