
Security News
n8n Tops 2025 JavaScript Rising Stars as Workflow Platforms Gain Momentum
n8n led JavaScript Rising Stars 2025 by a wide margin, with workflow platforms seeing the largest growth across categories.
Extract and store hal previous and next links.
npm install halster
var halster = require('halster');
var links = halster({
default: function() {
return 'http://mysite.com/api';
},
previous: function(val) {
return 'http://mysite.com/api?until=' + val;
},
next: function(val) {
return 'http://mysite.com/api?from=' + val;
},
normalize: function(val) {
return val.splice(13)[1];
}
});
links.set({
_links: {
previous: {
url: 'until=12345677'
},
next: {
url: 'from=12345677'
}
}
});
links.get({previous: true});
// => 'http://mysite.com/api?until=12345677'
Create a new halster instance. Takes an object of arguments. default is the
default link to use if no previous or next were given. If previous or
default are given the links are passed down to burl and handled
there. The normalize link functions the same as in burl, converting urls
into integers that can be compared to determine the newest / oldest link.
Optionally you can also set invert: true to flip next and previous.
var halster = require('halster');
var links = halster({
default: function() {
return 'http://mysite.com/api';
},
previous: function(val) {
return 'http://mysite.com/api?until=' + val;
},
next: function(val) {
return 'http://mysite.com/api?from=' + val;
},
normalize: function(val) {
return val.splice(13)[1];
}
});
Pass in an object with a links / _links property and save the correct link
within halster.
links.set({
_links: {
previous: {
url: 'until=12345677'
},
next: {
url: 'from=12345677'
}
}
});
Get an url. Can be passed an object with either next or previous set to true
for the corresponding link. If no argument is provided the default link will be
returned.
links.get({previous: true});
// => 'http://mysite.com/api?until=12345677'
links.get();
// => 'http://mysite.com/api'
FAQs
Extract and store `hal` `previous` and `next` links
We found that halster demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer 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
n8n led JavaScript Rising Stars 2025 by a wide margin, with workflow platforms seeing the largest growth across categories.

Security News
The U.S. government is rolling back software supply chain mandates, shifting from mandatory SBOMs and attestations to a risk-based approach.

Security News
crates.io adds a Security tab backed by RustSec advisories and narrows trusted publishing paths to reduce common CI publishing risks.