Security News
require(esm) Backported to Node.js 20, Paving the Way for ESM-Only Packages
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
@caruuto/api-metadata
Advanced tools
Generates pagination metadata for API result sets.
{
"page": 2,
"limit": 20,
"offset": 0,
"totalCount": 200,
"totalPages": 10,
"nextPage": 3,
"prevPage": 1
}
$ npm i api-metadata
The metadata function accepts two arguments:
argument | description |
---|---|
options | the options that were used to generate the data set |
options.page | the page number requested |
options.limit | the number of records requested |
options.skip | the number of records skipped |
count | the total number of records in the original data set, before options were applied |
const apiMetadata = require('api-metadata')
const options = {
page: 2,
limit: 20
}
const metadata = apiMetadata(options, 200)
FAQs
Generates pagination metadata for API result sets
The npm package @caruuto/api-metadata receives a total of 3 weekly downloads. As such, @caruuto/api-metadata popularity was classified as not popular.
We found that @caruuto/api-metadata demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
require(esm) backported to Node.js 20, easing the transition to ESM-only packages and reducing complexity for developers as Node 18 nears end-of-life.
Security News
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.