
Product
Introducing Socket Scanning for OpenVSX Extensions
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.
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
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.

Product
Socket now scans OpenVSX extensions, giving teams early detection of risky behaviors, hidden capabilities, and supply chain threats in developer tools.

Product
Bringing supply chain security to the next generation of JavaScript package managers

Product
A safer, faster way to eliminate vulnerabilities without updating dependencies