
Security News
Axios Maintainer Confirms Social Engineering Attack Behind npm Compromise
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.
Requirements:
Node.js
npm
npm install --save mod-cookie
ES6 import for typical API call signing use case :
import ModCookie from "../src"
var name = "mod";
var age = 18;
var hoppy = ['a','b','c'];
ModCookie.setItem("name",name);
ModCookie.setItem("age",age,1);
ModCookie.setItem("hoppy",hoppy);
setTimeout(function(){
console.log(ModCookie.getItem("age"));//undefined
console.log(ModCookie.getItem("name"));//mod
ModCookie.removeItem("name");
console.log(ModCookie.getItem("name"));//undefined
ModCookie.clear();
console.log(ModCookie.getItem("hoppy"));//undefined
},2000)
console.log(ModCookie.getItem("name"));//"mod"
console.log(ModCookie.getItem("age"));//18
console.log(ModCookie.getItem("hoppy"));//['a','b','c']
save the key value to cookie with expireTime,if do not set expireTime, The key value will never expired!
get the value from cookie by the key, if the value of key is not set yet or expired will return undefinded!
clear the value of cookie by key
clear all value of cookie
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
Axios compromise traced to social engineering, showing how attacks on maintainers can bypass controls and expose the broader software supply chain.

Security News
Node.js has paused its bug bounty program after funding ended, removing payouts for vulnerability reports but keeping its security process unchanged.

Security News
The Axios compromise shows how time-dependent dependency resolution makes exposure harder to detect and contain.