Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@anyhowstep/data-validation

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

@anyhowstep/data-validation

+ Type checks with enumerated error codes + String format type checks + Array type checks + Type guards (x is Type) + Type assertions (assert x is Type and return; otherwise, throw) + Customizable error messages (`ErrorMessageService.Map = /*Custom error

  • 1.15.0
  • latest
  • npm
  • Socket score

Version published
Weekly downloads
5
decreased by-70.59%
Maintainers
1
Weekly downloads
 
Created
Source

Goals

  • Type checks with enumerated error codes
  • String format type checks
  • Array type checks
  • Type guards (x is Type)
  • Type assertions (assert x is Type and return; otherwise, throw)
  • Customizable error messages (ErrorMessageService.Map = /*Custom error code to error message format*/;)
  • Promise-based API available

Non-Goals

  • Performance is not a goal; we are stressing safety, and usability over performance.

Promise-based API

While all type guards, and domain checks are synchronous, a promise-based API may be desirable when wanting to validate a large number of conditions, and using a final catch() to handle errors.

FAQs

Package last updated on 03 Jan 2018

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc