Halpert is a library for representing and interfacing with hypermedia formats. It provides a way for converting to and from these formats, along with methods for filtering and parsing through them in a general way.
Use npm to install halpert.
npm install halpert
- HAL+JSON - Currently only parses HAL objects
Initializing and Registering Formats
To initialize a Halpert object and register the formats, require the halpert package along with any formats desired. The example below includes the HAL+JSON format.
var Halpert =halJson = ;halpert = ;halpert;
Once you have a Halpert object like above, you can then start representing documents.
var doc =_links: self: href: "/customer/4"full_name: "John Doe"email: "email@example.com"represnter = halpert;
- Please make sure all contributions are covered by tests
gulp buildonce all changes are complete