This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Parse the first track of an emv smartcard | |
* @param {String} data - The first track of the card | |
*/ | |
async function parseStripe(data) { | |
let split = data.split("^"); | |
let cardNumber = split[0].substring(2); | |
let name = split[1]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Display a progress bar in the console | |
* @description The progress bar self update without clearing the console (using ANSI escape codes) | |
* @author Quentin Lamamy <contact@quentin-lamamy.fr> | |
* @param {Number} current - Current value | |
* @param {Number} total - Total value | |
* @param {String} title - Title of the progress bar | |
* @param {String} message - Message to display | |
* @returns {void} | |
*/ |