Have ideas to improve npm?Join in the discussion! »

alcaeusTypeScript icon, indicating that this package has built-in type declarations

1.1.1 • Public • Published

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 -S alcaeus

Requirements

Environment Version Notes
node.js 12+ v12 requires --experimental-modules flag
TypeScript 3.8+

Usage

import { Hydra } from 'alcaeus/web' // (or 'alcaeus/node')

const { response, representation } = await 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.

More examples (outdated)

License

MIT

Install

npm i alcaeus

DownloadsWeekly Downloads

1,359

Version

1.1.1

License

MIT

Unpacked Size

392 kB

Total Files

147

Last publish

Collaborators

  • avatar