Gathering detailed insights and metrics for contentful-resolve-response
Gathering detailed insights and metrics for contentful-resolve-response
Gathering detailed insights and metrics for contentful-resolve-response
Gathering detailed insights and metrics for contentful-resolve-response
Resolve items & includes of a Contentful API response into a proper object graph
npm install contentful-resolve-response
Module System
Min. Node Version
Typescript Support
Node Version
NPM Version
54 Stars
410 Commits
15 Forks
32 Watching
4 Branches
211 Contributors
Updated on 27 Nov 2024
Minified
Minified + Gzipped
JavaScript (100%)
Cumulative downloads
Total Downloads
Last day
-12.3%
97,220
Compared to previous day
Last week
-1.7%
552,072
Compared to previous week
Last month
9.4%
2,650,516
Compared to previous month
Last year
17.3%
25,901,857
Compared to previous year
1
24
Suppose you have a Contentful query's response JSON. The links are nice, but what we really usually need is the response with a resolved object graph.
contentful-resolve-response
does just that:
1var resolveResponse = require('contentful-resolve-response'); 2 3var response = { 4 items: [ 5 { 6 someValue: 'wow', 7 someLink: { sys: { type: 'Link', linkType: 'Entry', id: 'suchId' } } 8 } 9 ], 10 includes: { 11 Entry: [ 12 { sys: { type: 'Entry', id: 'suchId' }, very: 'doge' } 13 ] 14 } 15}; 16 17var items = resolveResponse(response) 18// Responds with the resolved array of items. 19 20console.log(items); 21 22// produces: 23// re`solved` object [Array] of items. 24 [ 25 { 26 // Value stays the same 27 someValue: 'wow', 28 29 // Link gets replaced by the actual object from `includes.Entry` 30 someLink: {sys: {type: 'Entry', id: 'suchId'}, very: 'doge'} 31 } 32 ]
Note that:
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
no dangerous workflow patterns detected
Reason
license file detected
Details
Reason
security policy file detected
Details
Reason
detected GitHub workflow tokens with excessive permissions
Details
Reason
9 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 7
Reason
Found 4/7 approved changesets -- score normalized to 5
Reason
dependency not pinned by hash detected -- score normalized to 0
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
11 existing vulnerabilities detected
Details
Score
Last Scanned on 2024-11-25
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More