
Security News
/Research
Wallet-Draining npm Package Impersonates Nodemailer to Hijack Crypto Transactions
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
validate-kaike-js
Advanced tools
A modern and lightweight library for validating emails, identity cards (ID), IBANs, passports, and phone numbers. ✅
Install the library using your favorite package manager:
# Using npm
npm install validate-kaike-js
# Using yarn
yarn add validate-kaike-js
# Using pnpm
pnpm add validate-kaike-js
The validate
function must always be used for both single and multiple validations, ensuring consistency and simplicity in implementation.
import {
validate,
validateEmail,
validateIdentityCard,
validateIban,
validatePassport,
validatePhoneCountryCode,
} from "validate-kaike-js";
validate([{ fn: validateEmail, input: "test@email.com", provider: "GMAIL" }])
.then(console.log)
.catch(console.error);
validate([{ fn: validateIdentityCard, input: "123456789LA001", country: "AO" }])
.then(console.log)
.catch(console.error);
If the input is invalid, an error will be thrown:
validate([{ fn: validateEmail, input: "invalid_email", provider: "GMAIL" }]).catch(console.error);
Output:
[{ message: "Invalid email", value: "invalid_email" }];
Validate multiple inputs simultaneously with validate()
:
validate([
{ fn: validateEmail, input: "test@email.com", provider: "GMAIL" },
{ fn: validateIdentityCard, input: "123456789LA001", country: "AO" },
{ fn: validateIban, input: "AO06123456789012345678901", country: "AO" },
{ fn: validatePassport, input: "A1234567", country: "US" },
{ fn: validatePhoneCountryCode, input: "+244923456789", phoneCountryCode: "+244" },
])
.then(console.log)
.catch(console.error);
✅ If all validations pass, the return will be an array with the results:
[
{ message: "Valid email", value: "test@email.com" },
{ message: "Valid identity card", value: "123456789LA001" },
{ message: "Valid IBAN", value: "AO06123456789012345678901" },
{ message: "Valid Passport", value: "A1234567" },
{ message: "Valid phone country code", value: "+244923456789" },
];
❌ If any validation fails, validate
rejects the promise with an array of errors:
validate([{ fn: validateEmail, input: "invalid_email", provider: "GMAIL" }]).catch(console.error);
Output:
[{ message: "Invalid email", value: "invalid_email" }];
Method | Validates | Valid Example | Invalid Example | Additional Argument |
---|---|---|---|---|
validateEmail | test@email.com | invalid_email | provider (only for this method) | |
validateIdentityCard | Identity card | 123456789LA001 | 12345ABC | country (only for this method) |
validateIban | IBAN | AO06123456789012345678901 | 123456 | country (only for this method) |
validatePassport | Passport | A1234567 | XYZ12 | country (only for this method) |
validatePhoneCountryCode | Phone country code | +244923456789 | +000000000000 | phoneCountryCode (only for this method) |
MIT © 2025 - Kaike Bartolomeu
FAQs
A small validation library
The npm package validate-kaike-js receives a total of 0 weekly downloads. As such, validate-kaike-js popularity was classified as not popular.
We found that validate-kaike-js 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.
Security News
/Research
Malicious npm package impersonates Nodemailer and drains wallets by hijacking crypto transactions across multiple blockchains.
Security News
This episode explores the hard problem of reachability analysis, from static analysis limits to handling dynamic languages and massive dependency trees.
Security News
/Research
Malicious Nx npm versions stole secrets and wallet info using AI CLI tools; Socket’s AI scanner detected the supply chain attack and flagged the malware.