New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

caffe-validate

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

caffe-validate

The official validation library for Caffe.

  • 1.0.0-alpha
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

Caffe Validation

The official validation library for building opinionated, Caffe applications. This library is built on top of the joi. It offers validation support for both query string parameters and the request body (input). This library does not yet offer support for file-based validation.

Getting Started

Install via npm:

npm install --save caffe-validate

Example Usage

Create a NodeJS server using the contents below, then launch the application and go to https://localhost:5000 in your browser. Feel free to add the name key as a query string value to print your name instead of the default "World".

Example: https://localhost:5000?name=JohnSmith

var caffe     = require("caffe");
var validate  = require("caffe-validate");

var app = caffe.brew([
  validate.query(is => {
    name: is.string().default("World"),
  }),
  caffe.text(200, (ctx) => `Hello, ${ctx.query.name}`),
]);

caffe.serve(app, 5000);

Documentation

Coming soon.

Keywords

FAQs

Package last updated on 27 Sep 2017

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