1.0.1 • Published 4 years ago

mpesa-contacts v1.0.1

Weekly downloads
-
License
ISC
Repository
github
Last release
4 years ago

#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();