Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cityssm/node-cpa-codes
Lookups, validations, and utility functions for Canadian Payments Association (CPA) Standard 007 transaction and return codes.
https://github.com/cityssm/node-cpa-codes
aft banking canada canadian-payments-association cpa eft standard-007
Last synced: about 1 month ago
JSON representation
Lookups, validations, and utility functions for Canadian Payments Association (CPA) Standard 007 transaction and return codes.
- Host: GitHub
- URL: https://github.com/cityssm/node-cpa-codes
- Owner: cityssm
- License: mit
- Created: 2024-05-17T14:56:29.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-08-19T14:02:22.000Z (5 months ago)
- Last Synced: 2024-10-01T06:54:20.501Z (4 months ago)
- Topics: aft, banking, canada, canadian-payments-association, cpa, eft, standard-007
- Language: JavaScript
- Homepage: https://www.npmjs.com/package/@cityssm/cpa-codes
- Size: 206 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
- Security: SECURITY.md
Awesome Lists containing this project
README
# CPA Codes for Node
[![NPM Version](https://img.shields.io/npm/v/%40cityssm%2Fcpa-codes)](https://www.npmjs.com/package/@cityssm/cpa-codes)
[![DeepSource](https://app.deepsource.com/gh/cityssm/node-cpa-codes.svg/?label=active+issues&show_trend=true&token=-WoOE34nRUKoJN8e7lTQRQ1w)](https://app.deepsource.com/gh/cityssm/node-cpa-codes/)
[![Maintainability](https://api.codeclimate.com/v1/badges/f58ba7b1bc5af08b789c/maintainability)](https://codeclimate.com/github/cityssm/node-cpa-codes/maintainability)
[![codecov](https://codecov.io/gh/cityssm/node-cpa-codes/graph/badge.svg?token=TRMF4FQSBG)](https://codecov.io/gh/cityssm/node-cpa-codes)
[![Coverage Testing](https://github.com/cityssm/node-cpa-codes/actions/workflows/coverage.yml/badge.svg)](https://github.com/cityssm/node-cpa-codes/actions/workflows/coverage.yml)Lookups, validations, and utility functions for
[Canadian Payments Association (CPA) Standard 007](https://www.payments.ca/sites/default/files/standard007eng.pdf)
transaction and return codes.## Installation
```sh
npm install @cityssm/cpa-codes
```## Usage
```javascript
import * as CPA from '@cityssm/cpa-codes'console.log(CPA.isCPACode('200'))
// -> trueconsole.log(CPA.isCPACode('abc'))
// -> falseconsole.log(CPA.getCPACode('230'))
/*
{
cpaCodeFullName: 'Pension',
cpaCodeAbbreviationEnglish: 'PEN',
cpaCodeAbbreviationFrench: 'PEN'
}
*/console.log(CPA.getCodeCategoryByCode('300'))
/*
{
cpaCodeMin: '300',
cpaCodeMax: '329',
cpaCodeCategory: 'Federal Government Transactions'
}
*/
```