
Product
Rust Support in Socket Is Now Generally Available
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.
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
The npm package halster receives a total of 0 weekly downloads. As such, halster popularity was classified as not popular.
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.

Product
Socket’s Rust and Cargo support is now generally available, providing dependency analysis and supply chain visibility for Rust projects.

Security News
Chrome 144 introduces the Temporal API, a modern approach to date and time handling designed to fix long-standing issues with JavaScript’s Date object.

Research
Five coordinated Chrome extensions enable session hijacking and block security controls across enterprise HR and ERP platforms.