2.0.0 • Published 3 years ago

@xpcoffee/bank-schema v2.0.0

Weekly downloads
2
License
MIT
Repository
github
Last release
3 years ago

bank schema

This is intended to be a standard for representing bank data. It is ZAR-centric.

The schemas are defined using json-schema.

Usage

Use the provided validators if you don't need any extra functionality:

import {validateStatement, validateTransaction} from "bank-schema";

const statement = { /* ... */ };
const statementValidationResult = validateStatement(statement);
console.log(statementValidationResult);

const transaction = { /* ... */ };
const transactionValidationResult = validateTransaction(transaction);
console.log(transactionValidationResult);

Pull in the schema(s) directly if you need to build a custom schema validator:

import {transactionSchema} from "bank-schema";
/* use transactionSchema in your own validator */

Development

Run tests using

npm t