Socket
Socket
Sign inDemoInstall

alcaeus

Package Overview
Dependencies
59
Maintainers
1
Versions
121
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    alcaeus

Hydra Core hypermedia-aware client library


Version published
Weekly downloads
164
decreased by-28.07%
Maintainers
1
Install size
10.0 MB
Created
Weekly downloads
 

Readme

Source

Alcaeus npm version Code coverage

Hydra Core library for JavaScript

Alcaeus (pronounced AL-SEE-UHS) is a Node.js/browser library for consuming Hydra APIs.

Alcaeus is the birth name of Heracles. The demigod who defeated Hydra.

Installation

Use npm or yarn:

npm i alcaeus

Requirements

Alcaues v3 is implemented only as ES Modules. It will work in recent versions on node and modern browsers.

Usage

Since v3 Alcaeus is configured using an RDF/JS Environment factory. This decouples the library from any specific RDF/JS implementation.

It is recommended to use the implementation provided by @zazuko/env which allows to easily reuse extend existing environments.

import create from 'alcaeus'
import Environment from '@zazuko/env/Environment.js'
import rdf from '@zazuko/env'

const env = new Environment(create(), { parent: rdf })

const { response, representation } = await env.hydra.loadResource('http://example.com/resource');
const rootResource = representation.root;

// contains supported classes, operations, etc.
const apiDocs = Hydra.apiDocumentations[0];
    
const id = rootResource.id; 

To learn more, head to http://alcaeus.hydra.how.

License

MIT

Keywords

FAQs

Last updated on 15 Feb 2024

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc