From a3d66c3ccdd0e9dbb75483817e0da167d27ea6cb Mon Sep 17 00:00:00 2001 From: Matheus Fernandes Date: Tue, 14 Feb 2017 15:12:28 -0300 Subject: [PATCH] Hide the credit card number once it's submitted --- bin/now-billing-add.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bin/now-billing-add.js b/bin/now-billing-add.js index ac8508e..ea8c256 100644 --- a/bin/now-billing-add.js +++ b/bin/now-billing-add.js @@ -136,8 +136,9 @@ module.exports = function (creditCards) { state.ccv.placeholder = '#'.repeat(3) } brand = chalk.cyan(`[${brand}]`) + const masked = chalk.gray('#### '.repeat(3)) + result.split(' ')[3] process.stdout.write( - `${chalk.cyan('✓')} ${piece.label}${result} ${brand}\n` + `${chalk.cyan('✓')} ${piece.label}${masked} ${brand}\n` ) } else if (key === 'ccv') { process.stdout.write(