Socket
Book a DemoInstallSign in
Socket

deepvalid

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

deepvalid

Deep input validation for node.js api

latest
Source
npmnpm
Version
1.1.9
Version published
Maintainers
1
Created
Source

deepvalid

deepvalid is a simple node.js library for validation API input params

Description

deep-validation helps you build API input params validation

Installation

npm i deepvalid

Documentation

https://webigorkiev.github.io/deepvalid/

Features

  • Zero Dependencies
  • Supports deep input object
  • Very simple small library
  • Focus on usability and performance
  • Testing coverage
Run tests with Mocha

$ npm run test

Usage

import {validator, ValidationError, required} from "deepvalid";

try {
    const request = {test: "test value"};
    const valid = validator();
    valid.setModel({"test": {required}});
    valid.validate(request);
    
    return true;
} catch(err) {
    const e: ValidationError = err;
    console.log(e.getMessage())
}

Keywords

validation

FAQs

Package last updated on 19 Apr 2024

Did you know?

Socket

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.