New Programs Makers

    @jota-one/hateoas-parser

    1.2.0 • Public • Published

    hateoas-parser

    Javascript HATEOAS parser

    API

    This library exposes 4 methods.

    getEndpoint(index, rel, params, version)

    Pick the "rel" endpoint from the "index" dictionary and resolve it with the provided "params" and "version".

    parseLinks(result)

    Simple function to convert a raw HATEOAS index result to a more usable key-value Hash

    parseUrl(url, params)

    Does the same as getEndpoint() but with a URL without solving the index-rel-version puzzle before. parseUrl() is internally called by getEndpoint().

    getCleanEndpoint(index, rel)

    Format an endpoint by simply removing all optional or required paramaters in the querystring

    Keywords

    none

    Install

    npm i @jota-one/hateoas-parser

    DownloadsWeekly Downloads

    1

    Version

    1.2.0

    License

    MIT

    Unpacked Size

    24.5 kB

    Total Files

    10

    Last publish

    Collaborators

    • jorinho
    • tadai