Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

mpesa-contacts

karanja1victor34ISC1.0.1

Extract customer contacts from an unsecured mpesa statement.

mpesa-statement, 12-digit-contacts, phone-numbers

readme

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