
Product
Secure Your AI-Generated Code with Socket MCP
Socket MCP brings real-time security checks to AI-generated code, helping developers catch risky dependencies before they enter the codebase.
bai2-parser
Advanced tools
BAI2 Parser is for parsing the bai(Bank Administration Institute) files and convert into the CSV or JSON file. Check out our documentation below to learn how to get started
bai2-parser
:npm install bai2-parser
yarn add bai2-parser
Here is a basic example of how to use bai2 parser. By using this, you can read the input directly from file or pass the string.
Example with pass the string
import fs from 'fs'
import { BAI2 } from 'bai2-parser'
const fileString = fs.readFileSync(`./sample.bai`).toString()
// You can get the parsed answer from file string using below prop.
const parsefromString = BAI2.fromString(fileString, { output:'JSON' })
console.log('parsefromString', parsefromString)
Example with pass the file directly
import { BAI2 } from 'bai2-parser'
// You can get the parsed answer from file using below prop.
const parsefromFile = BAI2.fromFile(`./sample.bai`, { output:'CSV' })
console.log('parsefromFile', parsefromFile)
BAI2.fromString(fileString, options)
=> string
| object
| Error
Returns the JSON or CSV string
or rejects with an Error
if there was an issue.
fileString
- An fileString of BAI2 file to be converted to JSON or CSV.options
- (Optional) A BAI2 file specifying any of the following key value pairs:BAI2.fromFile(filePath, options)
=> string
| object
| Error
Returns the JSON or CSV string
or rejects with an Error
if there was an issue.
filePath
- An filePath of BAI2 file to be converted to JSON or CSV.options
- (Optional) A BAI2 file specifying any of the following key value pairs:Key | Default | Description |
---|---|---|
output | 'JSON' | 'CSV' | You can use this option to customize the output. |
MIT
FAQs
Parse the bai2 statement file as CSV or JSON file
The npm package bai2-parser receives a total of 1 weekly downloads. As such, bai2-parser popularity was classified as not popular.
We found that bai2-parser demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket MCP brings real-time security checks to AI-generated code, helping developers catch risky dependencies before they enter the codebase.
Security News
As vulnerability data bottlenecks grow, the federal government is formally investigating NIST’s handling of the National Vulnerability Database.
Research
Security News
Socket’s Threat Research Team has uncovered 60 npm packages using post-install scripts to silently exfiltrate hostnames, IP addresses, DNS servers, and user directories to a Discord-controlled endpoint.