contentful-resource-transform
Apply transforms to Contentful resources or collections thereof.
Synopsis
Create a transform function by passing the function you want to apply to each resource to createTransform
.
var assert = ;var createTransform = ; var collapseToId = ;
collapseToId
will accept any "Entry", "Asset", and "ContentType" resources it finds with the provided function:
;
(note that we're only providing the bare minimum for our transform to work, resources returned by the Contentful API's have many more properties)
Transforming Arrays
If a resource is an "Array" collapseToId
will traverse it's items
and includes
properties:
;
License
MIT