Security News
pnpm 10.0.0 Blocks Lifecycle Scripts by Default
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Parse and format Link header according to RFC 5988.
$ npm install li
Also works with bower, component.js, browserify, amd, etc.
Parse a Link header:
var li = require('li');
var someLinksHeader = '</api/users?page=0&per_page=2>; rel="first", ' +
'</api/users?page=1&per_page=2>; rel="next", ' +
'</api/users?page=3&per_page=2>; rel="last"';
console.log(li.parse(someLinksHeader));
// This will print:
// {
// first: '/api/users?page=0&per_page=2',
// next: '/api/users?page=1&per_page=2',
// last: '/api/users?page=3&per_page=2'
// }
Generate a Link header as follow with stringify:
var linksObject = {
first : '/api/users?page=0&per_page=2',
next : '/api/users?page=1&per_page=2',
last : '/api/users?page=3&per_page=2',
};
console.log(li.stringify(linksObject);
// This will print the string:
// </api/users?page=0&per_page=2>; rel="first",
// </api/users?page=1&per_page=2>; rel="next",
// </api/users?page=3&per_page=2>; rel="last"
$ npm test
MIT 2014 - JOSE F. ROMANIELLO
FAQs
Parse the Links header format and return a javascript object.
The npm package li receives a total of 336,706 weekly downloads. As such, li popularity was classified as popular.
We found that li 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
pnpm 10 blocks lifecycle scripts by default to improve security, addressing supply chain attack risks but sparking debate over compatibility and workflow changes.
Product
Socket now supports uv.lock files to ensure consistent, secure dependency resolution for Python projects and enhance supply chain security.
Research
Security News
Socket researchers have discovered multiple malicious npm packages targeting Solana private keys, abusing Gmail to exfiltrate the data and drain Solana wallets.