I'm going through a Node tutorial and I'm at the point where I'm working with "express-validator."
According to the docs, "express-validator" is "...a set of express.js middlewares that wraps validator.js validator and sanitizer functions."
Easy enough, but I want to better understand that definition and it's bugging me that I've never installed the "validator.js" library.
Here's what I understand:
Middleware acts as a bridge between two applications. In the context of Node, Express is middleware specifically in the way it intercepts and interacts with the request and the response objects that are coming from the DOM (feel free to stop me at any time if I'm not accurate).
A "wrapper," according to https://www.w3schools.com/jquery/tryit.asp?filename=tryjquery_html_wrap_element
, is something that's going to "wrap" around a div...
So, going back to the original definition, it looks as though Express-Validator is wrapping around the "validator.js" library and making it more intuitive to use.
But where does "validator.js" come from? I've never installed it, so how did that become use-able?
And then when I look at the example of the Jquery "wrap" method (https://www.w3schools.com/jquery/html_wrap.asp
How does express-validator "wrap" around validator.js?