Normally Palatable Mango

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

    2.2.2 • 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

    127

    Version

    2.2.2

    License

    MIT

    Unpacked Size

    392 kB

    Total Files

    155

    Last publish

    Collaborators

    • tpluscode