@xpcoffee/bank-schema
TypeScript icon, indicating that this package has built-in type declarations

2.0.0 • Public • Published

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

/@xpcoffee/bank-schema/

    Package Sidebar

    Install

    npm i @xpcoffee/bank-schema

    Weekly Downloads

    3

    Version

    2.0.0

    License

    MIT

    Unpacked Size

    10.7 kB

    Total Files

    18

    Last publish

    Collaborators

    • xpcoffee