
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.
froncubator-validator-js
Advanced tools
A simple JavaScript library for validating data. https://github.com/froncubator/validator
Install the library with npm install froncubator-validator
const validator = require('froncubator-validator-js');
validator.isInt(123); //=> true
validator.isInt(10.5); //=> false
validator.isInt(undefined); //=> false
validator.isInt(123, 5, 10); //=> false
validator.isStr('Froncubator', 0, 100) //=> true
validator.isStr('Some String', null, 100) //=> true
validator.isStr('Next String', 100) //=> false
validator.isStr(undefined) //=> false
validator.isArr([1,2,3]) //=> true
validator.isArr([1,2,3], 1, 3) //=> true
validator.isArr([1,2,3], 5, 10) //=> false
validator.isArr(null) //=> false
validator.isEmail('some@email.com') //=> true
validator.isEmail('x@x.x') //=> true
validator.isEmail('some@email') //=> false
validator.isEmail('@.') //=> false
validator.isExist(false) //=> true
validator.isExist(undefined) //=> false
validator.isExist(null) //=> false
validator.isExist(NaN) //=> false
Validator | Description |
---|---|
isEmail(value) | Check is value is email and return true or false. |
isStr(value, min, max) | Check is value is string and return true or false. You can check count of characters in the string with min or max. (min, max) = not required. |
isInt(value, min, max) | Check is value is integer and return true or false. You can check number with min or max. (min, max) = not required. |
isArr(value, min, max) | Check is value is array and return true or false. You can check array length with min or max. (min, max) = not required. |
isExist(value) | Check is value exist (undefined, null, NaN). |
Froncubator Validator is freely distributable under the terms of the MIT license.
FAQs
Simple validator by Froncubator Pro
The npm package froncubator-validator-js receives a total of 2 weekly downloads. As such, froncubator-validator-js popularity was classified as not popular.
We found that froncubator-validator-js demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 3 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.