JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 223
  • Score
    100M100P100Q83854F
  • License MIT

Credit Card validation using luhn algorithm

Package Exports

  • cc-validate

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (cc-validate) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

cc-validate

A typescript mod

Installation

npm install cc-validate --save
yarn add cc-validate
bower install cc-validate --save

Usage

Javascript

var isValid = require('cc-validate');
var valid = isValid('4111111111111111');
Output should be true as '4111111111111111' is a valid credit card number

TypeScript

import { isValid } from 'cc-validate';
let valid = isValid('4111111111111111');
Output should be true

Test

npm run test