Security News
Combatting Alert Fatigue by Prioritizing Malicious Intent
In 2023, data breaches surged 78% from zero-day and supply chain attacks, but developers are still buried under alerts that are unable to prevent these threats.
A Nationwide transactions table parser.
npm install nationwide
Documentation and more detailed examples are hosted on Github Pages.
Copy the Nationwide statement table from the browser:
nationwide.html
<table>
<tbody>
<tr>
<td>
01 May 2023
<div style="display: none">- 1</div>
</td>
<td>Visa purchase</td>
<td>UBER *TRIP HELP.UBER.COM GB</td>
<td class="currency">£5.00</td>
<td class="currency"></td>
<td class="amountCell currency">£55.00</td>
</tr>
<tr>
<td>
02 May 2023
<div style="display: none">- 2</div>
</td>
<td>Visa purchase</td>
<td>UBER *TRIP HELP.UBER.COM GB</td>
<td class="currency">£5.00</td>
<td class="currency"></td>
<td class="amountCell currency">£50.00</td>
</tr>
<tr>
<td>
03 May 2023
<div style="display: none">- 3</div>
</td>
<td>Visa purchase</td>
<td>UBER *TRIP HELP.UBER.COM FR</td>
<td class="currency">£20.00</td>
<td class="currency"></td>
<td class="amountCell currency">£30.00</td>
</tr>
</tbody>
</table>
Parse the table:
import fs from "fs";
import path from "path";
import { Transaction } from "./Transaction";
const transactions = Transaction.table(
fs.readFileSync(path.join(__dirname, "nationwide.html"), "utf8"),
);
[
{
"date": "2023-01-01",
"type": "Visa purchase",
"account": "UBER *TRIP HELP.UBER.COM GB",
"change": -5,
"balance": 55
},
{
"date": "2023-01-02",
"type": "Visa purchase",
"account": "UBER *TRIP HELP.UBER.COM GB",
"change": -5,
"balance": 50
},
{
"date": "2023-01-03",
"type": "Visa purchase",
"account": "UBER *TRIP HELP.UBER.COM FR",
"change": -20,
"balance": 30
}
]
Collate the transactions:
Transaction.collate(transactions);
{
"UBER *TRIP HELP.UBER.COM FR": -20,
"UBER *TRIP HELP.UBER.COM GB": -10
}
To run tests:
npm run test
To generate the documentation locally:
npm run docs
To run linters:
npm run lint
To run formatters:
npm run format
Please read this repository's Code of Conduct which outlines our collaboration standards and the Changelog for details on breaking changes that have been made.
This repository adheres to semantic versioning standards. For more information on semantic versioning visit SemVer.
Bump2version is used to version and tag changes. For example:
bump2version patch
Lots of love to the open source community!
FAQs
A Nationwide transactions table parser.
The npm package nationwide receives a total of 0 weekly downloads. As such, nationwide popularity was classified as not popular.
We found that nationwide demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers 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.
Security News
In 2023, data breaches surged 78% from zero-day and supply chain attacks, but developers are still buried under alerts that are unable to prevent these threats.
Security News
Solo open source maintainers face burnout and security challenges, with 60% unpaid and 60% considering quitting.
Security News
License exceptions modify the terms of open source licenses, impacting how software can be used, modified, and distributed. Developers should be aware of the legal implications of these exceptions.