lazorse-nesting

0.1.2 • Public • Published

Lazorse-nesting

horse in a nest

This module can be @includeed into a Lazorse application to enable client-driven inlining of named resources. By client-driven, we mean that the client specifies a list of related resources as part of the request, and this extension takes care of inlining those resources into the response data.

How it works

The client to specifies keys they would like to have inlined into their response using a query parameter (inline by default). When those keys are seen in the response data, and the value of those keys looks like a URL path (such as the ones generated by the builtin @link helper), the value will be replaced with the response data of an internally dispatched request against that path.

To see how this looks in practice, check out this test.

/lazorse-nesting/

    Package Sidebar

    Install

    npm i lazorse-nesting

    Weekly Downloads

    5

    Version

    0.1.2

    License

    none

    Last publish

    Collaborators

    • grncdr