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

joi-fp

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

joi-fp - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

2

package.json
{
"name": "joi-fp",
"version": "1.0.1",
"version": "1.0.2",
"description": "Provides a few wrappers around Joi's validate(), attempt() and assert() functions with their arguments re-ordered for easier currying / partial application",

@@ -5,0 +5,0 @@ "main": "./lib/index.js",

@@ -8,5 +8,8 @@ #joi-fp

[![standard][standard-image]][standard-url]
[![npm][npm-image]][npm-url]
[travis-image]: https://travis-ci.org/maxnachlinger/joi-fp.svg?branch=master
[travis-url]: https://travis-ci.org/maxnachlinger/joi-fp
[npm-image]: https://img.shields.io/npm/v/joi-fp.svg?style=flat
[npm-url]: https://npmjs.org/package/joi-fp
[standard-image]: https://img.shields.io/badge/code%20style-standard-brightgreen.svg

@@ -20,2 +23,5 @@ [standard-url]: http://standardjs.com/

### What problem does this solve?
When using functions like ``joi.validate()``, you will almost always have values for ``schema`` and/or ``options`` before you have the ``value`` being validated. This little library re-orders the arguments of ``joi.validate()``, ``joi.attempt()`` and ``joi.assert()`` allowing you to pass the data you have initially, well, initially :) This library also has a few versions of these functions with fixed arities to make currying and partial application easier.
### Quick Example

@@ -31,3 +37,4 @@ ```javascript

validateInput({name: 'Max', color: 'blue'}) // { error: null, value: { name: 'Max', color: 'blue' } }
validateInput({name: 'Max', color: 'blue'})
// { error: null, value: { name: 'Max', color: 'blue' } }

@@ -34,0 +41,0 @@ // example with partial application

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