
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
cookie-storage
Advanced tools
cookie-storage: A Web Storage interface for Cookie.
$ npm install cookie-storage
import { CookieStorage } from 'cookie-storage';
const cookieStorage = new CookieStorage();
cookieStorage.length === 0;
cookieStorage.getItem('key') === null;
cookieStorage.setItem('key', 'value');
cookieStorage.length === 1;
cookieStorage.key(0) === 'key';
cookieStorage.getItem('key') === 'value';
cookieStorage.removeItem('key');
cookieStorage.length === 0;
cookieStorage.setItem('k1', 'v1');
cookieStorage.setItem('k2', 'v2');
cookieStorage.length === 2;
cookieStorage.clear();
cookieStorage.length === 0;
// Cookie options
cookieStorage.setItem('key', 'value', {
path: '/',
domain: 'example.com',
expires: new Date(),
secure: true,
sameSite: 'Strict' // Can be 'Strict' or 'Lax'.
});
// Use default cookie options
const storage = new CookieStorage({
path: '/',
domain: 'example.com',
expires: new Date(),
secure: true,
sameSite: 'Strict' // Can be 'Strict' or 'Lax'.
});
storage.setItem('key', 'value'); // ;path=/;domain=example.com;...
$ npm install
$ npm run watch
FAQs
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
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.