Socket
Socket
Sign inDemoInstall

joi-creditcard-extension

Package Overview
Dependencies
8
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    joi-creditcard-extension

Validate credit cards with Joi


Version published
Maintainers
1
Install size
1.40 MB
Created

Readme

Source

joi-creditcard-extension

Joi extension for credit card validation

CircleCI npm version Known Vulnerabilities

Lead Maintainer: Phillipe Lopes

Usage

Usage is a two steps process. First, a schema is constructed using the provided types and constraints:

const BaseJoi = require('joi');
const Extension = require('joi-creditcard-extension');
const Joi = BaseJoi.extend(Extension);

const schema = Joi.creditcard().number();
Joi.validate('5217 8503 2851 5461', Joi.creditcard().number()) // Output 5217850328515461

API

Take a look at the tests

FAQs

Last updated on 21 Aug 2017

Did you know?

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc