Security News
Research
Supply Chain Attack on Rspack npm Packages Injects Cryptojacking Malware
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
apple-card-csv
Advanced tools
Parses an Apple Card statement.
For older Apple devices supporting Apple Wallet (e.g., iPhone 6, iPhone 5, etc), but no longer supporting OS updates (iOS < 13), users are unable to export their Apple Card statements as CSV.
To support these older devices, this package reads and parses exported statement PDFs for subsequent CSV generation.
var parse = require( 'apple-card-csv' );
Parses one or more statements.
var resolve = require( 'path' ).resolve;
var cwd = require( '@stdlib/process/cwd' );
var readFileSync = require( '@stdlib/fs/read-file' ).sync;
var fpath = resolve( cwd(), 'path', 'to', 'statement.pdf' );
var src = readFileSync( fpath );
parse( src, done );
function done( error, data ) {
if ( error ) {
return console.error( error.message );
}
console.log( data );
}
To parse more than one statement, provide an Array
of statements, where each element is a Uint8Array
containing statement binary data.
Returned data has the following format:
MM/DD/YYYY
.'Transactions'
, 'Payments'
, 'Interest Charged'
.[
{
'Date': '10/03/2019',
'Type': 'Transactions',
'Description': 'FOO BAR',
'Daily Cash (%)': '2%',
'Daily Cash ($)': '$1.29',
'Amount': '$64.31'
},
{
'Date': '10/04/2019',
'Type': 'Transactions',
'Description': 'BEEP BOOP',
'Daily Cash (%)': '2%',
'Daily Cash ($)': '$0.68',
'Amount': '$33.98'
},
...
]
var join = require( 'path' ).join;
var readFileSync = require( '@stdlib/fs/read-file' ).sync;
var parse = require( 'apple-card-csv' );
var fpath = join( __dirname, 'examples', 'fixtures', 'statement.pdf' );
var src = readFileSync( fpath );
parse( src, done );
function done( error, data ) {
if ( error ) {
return console.error( error.message );
}
console.log( data );
}
Usage: apple-card-csv [options] [<file1> <file2> ...]
Options:
-h, --help Print this message.
-V, --version Print the package version.
$ apple-card-csv ./path/to/statement.pdf
Date,Type,Description,Daily Cash (%),Daily Cash ($),Amount
"10/03/2019","Transactions","FOO BAR","2%","$1.29","$64.31"
"10/04/2019","Transactions","BEEP BOOP","2%","$0.68","$33.98"
...
To use as a standard stream,
$ cat ./path/to/statement.pdf | apple-card-csv
"10/03/2019","Transactions","FOO BAR","2%","$1.29","$64.31"
"10/04/2019","Transactions","BEEP BOOP","2%","$0.68","$33.98"
...
FAQs
Parse an Apple Card statement.
The npm package apple-card-csv receives a total of 1 weekly downloads. As such, apple-card-csv popularity was classified as not popular.
We found that apple-card-csv 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.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.
Security News
Sonar’s acquisition of Tidelift highlights a growing industry shift toward sustainable open source funding, addressing maintainer burnout and critical software dependencies.