
Security News
Attackers Are Hunting High-Impact Node.js Maintainers in a Coordinated Social Engineering Campaign
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.
typesafe-storage
Advanced tools
npm install typesafe-storage
# or
yarn add typesafe-storage
import { createStorage } from "typesafe-storage";
const storage = createStorage<{
string: string;
number: number;
object: {
string: string;
number: number;
};
array: (string | number)[];
}>(localStorage);
storage.setItem("string", "value");
storage.setItem("number", 1);
storage.setItem("number", "error"); // ❌: Argument of type '"error"' is not assignable to parameter of type 'number'.
storage.setItem("object", {
string: "value",
number: 1
});
storage.setItem("array", ["value", 1]);
storage.setItem("notExistKey", "value"); // ❌: Argument of type '"notExistKey"' is not assignable to parameter of type '"string" | "number" | "object" | "array"'.
storage.getItem("string");
storage.getItem("number");
storage.getItem("object");
storage.getItem("array");
storage.getItem("notExistKey"); // ❌: Argument of type '"notExistKey"' is not assignable to parameter of type '"string" | "number" | "object" | "array"'.
storage.removeItem("string");
storage.removeItem("number");
storage.removeItem("object");
storage.removeItem("array");
storage.removeItem("notExistKey"); // ❌: Argument of type '"notExistKey"' is not assignable to parameter of type '"string" | "number" | "object" | "array"'.
storage.clear();
Contributions are always welcome! Please read the contributing first.
Thanks goes to these wonderful people (emoji key):
Kotaro Sugawara 💻 📖 🤔 🚇 ⚠️ |
This project follows the all-contributors specification. Contributions of any kind welcome!
FAQs
Typesafe Web Storage API wrapper to support objects and arrays
The npm package typesafe-storage receives a total of 153 weekly downloads. As such, typesafe-storage popularity was classified as not popular.
We found that typesafe-storage 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
Multiple high-impact npm maintainers confirm they have been targeted in the same social engineering campaign that compromised Axios.

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.