mpesa-contacts

1.0.1 • Public • Published

#MpesaStatement object (with getAllContacts method)

This is an npm module created by Victor Karanja to automate phone-number extraction from an unsecured mpesa statement pdf.

The module can be used in any project as follows:

$ npm install mpesa-contacts


let MpesaStatement = require("mpesa-contacts");
let decStatement = new MpesaStatement("path-to-statement/statement.pdf");

//returns a promise for all contacts
let decContacts = decStatement.getAllContacts();

//handle the promise
decContacts.then((contacts, err)=>{
    if(err){
        console.log(err);
    }
    console.log(contacts);
});


//makes a csv file, contacts.csv in your parent directory
decStatement.makeCsvContacts();

Package Sidebar

Install

npm i mpesa-contacts

Weekly Downloads

2

Version

1.0.1

License

ISC

Unpacked Size

2.15 MB

Total Files

6

Last publish

Collaborators

  • karanja1victor