Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@rdfjs/io

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@rdfjs/io

I/O operations for RDF/JS streams and datasets

  • 1.2.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

@rdfjs/io

build status npm version

This package provides I/O operations for RDF/JS streams and datasets.

Usage

Depending on which kind of objects should be used for the I/O operations, there are three different options to import this package:

To import both, streams and datasets operations, use the main entrypoint:

import * as io from '@rdfjs/io'

If only dataset operations are required:

import * as datasetIo from '@rdfjs/io/dataset.js'

And, if only stream operations are required:

import * as streamIo from '@rdfjs/io/stream.js'

Factory Argument

All operations require a factory argument. The factory must be an Environment that bundles multiple other factories. FetchFactory and FormatsFactory are required for the stream operations. Additionally, the DatasetFactory is required for dataset operations.

Examples

The following example loads a dataset from the given URL:

import * as io from '@rdfjs/io'
import factory from './factory.js'

const url = 'https://housemd.rdf-ext.org/person/gregory-house'
const dataset = await io.dataset.fromURL(url, { factory })

The following example loads the quads of the given URL as a stream of quads:

import * as io from '@rdfjs/io'
import factory from './factory.js'

const url = 'https://housemd.rdf-ext.org/person/gregory-house'
const stream = io.stream.fromURL(url, { factory })

Keywords

FAQs

Package last updated on 12 Oct 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc