Skip to content

huntshark/validator

Repository files navigation

validator

NPM version Build Status Coverage Status License NPM bundle size (minified) NPM bundle size (minified + gzip)

中文 | English

This is a modern JavaScript verification toolkit library, running on Node.js and in the modern browser, provide feature-rich verification function, making verification simple and fun.

Installation

In a browser:

  <script src="validator.min.js"></script>

Using npm:

  npm i --save jxm-validator

Get Started

In Node.js:

  // reference
  const jxmValidator = require('jxm-validator');

  // Check negative number
  jxmValidator.isNegativeNumber(-2); // => true
  jxmValidator.isNegativeNumber(-2.3); // => true
  jxmValidator.isNegativeNumber(2.3); // => false

  // Check postive integer
  jxmValidator.isPositiveInteger(2); // => true
  jxmValidator.isPositiveInteger(2.3); // => false
  jxmValidator.isPositiveInteger(-2); // => false

Documentation

API Docs, please open here.

Community

If you have any question, please open an issue here.

Changelog

If you see all changes, please open here.

License

MIT License