isdatavalid

1.0.0 • Public • Published

isDataValid

Overview

isDataValid is a lightweight JavaScript library for data validation. It provides simple functions to validate strings, numbers, emails, and dates.

Installation

You can install isdatavalid via npm:

npm install isdatavalid

Usage

const isDataValid = require('isdatavalid');

console.log(isDataValid.isString('Hello')); // true
console.log(isDataValid.isNumber(123)); // true
console.log(isDataValid.isEmail('example@email.com')); // true
console.log(isDataValid.isDate('2024-03-04')); // true

API

isString(value)

  • value: The value to be validated.

Returns true if the value is a string, false otherwise.

isNumber(value)

  • value: The value to be validated.

Returns true if the value is a number, false otherwise.

isEmail(value)

  • value: The value to be validated.

Returns true if the value is a valid email address, false otherwise.

isDate(value)

  • value: The value to be validated.

Returns true if the value is a valid date string, false otherwise.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Readme

Keywords

Package Sidebar

Install

npm i isdatavalid

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

2.22 kB

Total Files

3

Last publish

Collaborators

  • smetaninalena