Skip to content

open-source-uc/validate-uc-number-js

Repository files navigation

UC number validator

Build Status lint

Universal Javascript module to validate UC alumni identifier numbers.

Compatible with Node.js, React-Native and browser environments.

Getting started

Install this module with:

# with yarn:
yarn add @open-source-uc/validate-uc-number

# with npm:
npm install --save @open-source-uc/validate-uc-number

Node.js and browser (with webpack) usage:

'use strict';

const validate = require('@open-source-uc/validate-uc-number');

// With strings
if (validate('1263476J')) {
  // ...
}

// With numbers
if (validate(13546212)) {
  // ...
}