From 4081c2036a5af21519095da1b8b99c507b0fba93 Mon Sep 17 00:00:00 2001 From: Minteck Date: Sun, 17 Apr 2022 17:37:10 +0200 Subject: Deprecation --- node_modules/prompts/lib/util/lines.js | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 node_modules/prompts/lib/util/lines.js (limited to 'node_modules/prompts/lib/util/lines.js') diff --git a/node_modules/prompts/lib/util/lines.js b/node_modules/prompts/lib/util/lines.js deleted file mode 100644 index de30419..0000000 --- a/node_modules/prompts/lib/util/lines.js +++ /dev/null @@ -1,15 +0,0 @@ -'use strict'; - -const strip = require('./strip'); - -/** - * @param {string} msg - * @param {number} perLine - */ -module.exports = function (msg, perLine) { - let lines = String(strip(msg) || '').split(/\r?\n/); - - if (!perLine) return lines.length; - return lines.map(l => Math.ceil(l.length / perLine)) - .reduce((a, b) => a + b); -}; -- cgit