Research
Security News
Malicious npm Package Targets Solana Developers and Hijacks Funds
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
@d3vtool/utils
Advanced tools
A collection of utility functions designed to simplify common tasks in your application.
A collection of utility functions designed to simplify common tasks in your application
To install, you can use npm or yarn:
npm install @d3vtool/utils
or
yarn add @d3vtool/utils
import { Validator, type VInfer } from "@d3vtool/utils";
const usernameSchema = Validator.string().min(5);
type Username = VInfer<typeof usernameSchema>;
const username: Username = "popHero83";
const errors = usernameSchema.validateSafely(username)
console.log(errors);
import { Validator, type VInfer } from "@d3vtool/utils";
const phoneSchema = Validator.number().min(1).max(10);
type Phone = VInfer<typeof phoneSchema>;
const phone: Phone = 1234567890;
const errors = phoneSchema.validateSafely(phone)
console.log(errors);
import { Validator, type VInfer } from "@d3vtool/utils";
const schema = Validator.object({
name: Validator.string().min(5),
email: Validator.string().email(),
});
type schema = VInfer<typeof schema>;
const schemaObj: schema = {
name: "Sudhanshu",
email: "email@email.abc"
}
const errors = schema.validateSafely(schemaObj);
console.log(errors);
FAQs
A collection of utility functions designed to simplify common tasks in your application.
We found that @d3vtool/utils demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.
Research
Security News
A malicious npm package targets Solana developers, rerouting funds in 2% of transactions to a hardcoded address.
Security News
Research
Socket researchers have discovered malicious npm packages targeting crypto developers, stealing credentials and wallet data using spyware delivered through typosquats of popular cryptographic libraries.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.