uphold / koa-pagination Goto Github PK
View Code? Open in Web Editor NEWA middleware to handle Range Pagination Headers using Range & Content-Range entity-headers.
Home Page: https://npmjs.com/koa-pagination
License: MIT License
A middleware to handle Range Pagination Headers using Range & Content-Range entity-headers.
Home Page: https://npmjs.com/koa-pagination
License: MIT License
In order to avoid dependees having to require('koa-pagination/dist/src/errors/foo-bar-error')
, we should simply expose the errors in the main index file.
From the HTTP/1.1 Status Code Definitions:
206 Partial Content: The request MUST have included a Range header field (section 14.35) indicating the desired range, and MAY have included an If-Range header field (section 14.27) to make the request conditional.
Hi, there ware new commits in the past. Please publish a new version to npm. So that anyone can use it.
Is it possible to support multiple units? The example that comes to mind is if I wanted to paginate a list of items either numerically (items=0-4), or by created date (time=1440015632699-1440015642699).
Maybe I'm trying to shove too much functionality into this though...
What do you think about making this compatible with koa v2.0.0 and release as v3.0.0?
This project changes the response HTTP status code by force. it'd better if we could disallow this middleware from changing the status code based on heuristics.
What do you think?
PS: Is the project unmaintained?
Is it possible to rename this generic middleware
function into something more meaningful like paginate
? This middleware
function could overlap with other objects.
What do you think?
From RFC2616.txt:
A cache MUST NOT combine a 206 response with other previously cached content if the ETag or Last-Modified headers do not match exactly.
A cache that does not support the Range and Content-Range headers MUST NOT cache 206 (Partial) responses.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.