Security News
New Python Packaging Proposal Aims to Solve Phantom Dependency Problem with SBOMs
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
cookie-management-js
Advanced tools
Package with some methods to simplify cookies management in javascript. Contains methods to add, get, delete, and update your cookies
npm i cookie-management-js
import { getItem, removeItem, setItem } from "cookie-management-js";
// Will store a cookie at the key "testKey", with the value "testValue", that will expires in 3 days, at the path "/testPath"
setItem("testKey", "testValue", 3, "/testPath");
// >> "testValue"
console.log(getItem("testKey"));
// The cookie will be cleared, and expired
deleteItem("testKey", "/testPath");
// >> ""
console.log(getItem("testKey"));
import { setItem } from "cookie-management-js";
setItem("key1", "a string expiring in 3 days at the path /path", 3, "/path");
setItem("key2", {"name": "an object expiring in 7 days at the path /"});
setItem("key3", [1, 2, 3]);
void
// Use the values stored in the example of the setItem method
import { getItem } from "cookie-management-js";
// >> "a string expiring in 3 days at the path /path"
console.log("key1")
// >> {name: "an object expiring in 7 days at the path /"}
console.log("key2")
// >> [1, 2, 3]
console.log("key3")
// >> -1
console.log("key4")
The content of the cookie, JSON parsed if possible. If no content is found at this key, return -1
// Use the values stored in the example of the setItem method
import { removeItem, getItem } from "cookie-management-js";
// >> true
console.log(removeItem("key1"));
// After remove
// >> ""
console.log(getItem("key1"));
// >> false
console.log(removeItem("key4"))
If the cookie is deleted, returns true. If the key or path is wrong, returns false
FAQs
Package with some methods to simplify cookies management in javascript. Contains methods to add, get, delete, and update your cookies
The npm package cookie-management-js receives a total of 0 weekly downloads. As such, cookie-management-js popularity was classified as not popular.
We found that cookie-management-js 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
PEP 770 proposes adding SBOM support to Python packages to improve transparency and catch hidden non-Python dependencies that security tools often miss.
Security News
Socket CEO Feross Aboukhadijeh discusses open source security challenges, including zero-day attacks and supply chain risks, on the Cyber Security Council podcast.
Security News
Research
Socket researchers uncover how threat actors weaponize Out-of-Band Application Security Testing (OAST) techniques across the npm, PyPI, and RubyGems ecosystems to exfiltrate sensitive data.