Socket
Socket
Sign inDemoInstall

@inquirer/core

Package Overview
Dependencies
Maintainers
3
Versions
82
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@inquirer/core - npm Package Compare versions

Comparing version 0.0.18-alpha.0 to 0.0.19-alpha.0

15

lib/utils.js

@@ -0,1 +1,3 @@

const wrapAnsi = require('wrap-ansi');
/**

@@ -8,13 +10,6 @@ * Force line returns at specific width. This function is ANSI code friendly and it'll

*/
exports.breakLines = (content, width) => {
const regex = new RegExp('(?:(?:\\033[[0-9;]*m)*.?){1,' + width + '}', 'g');
return content
exports.breakLines = (content, width) =>
content
.split('\n')
.flatMap((line) => {
const chunk = line.match(regex);
// Remove the last match as it's always empty
chunk.pop();
return chunk || '';
})
.map((line) => wrapAnsi(line, width, { trim: false, hard: true }))
.join('\n');
};
{
"name": "@inquirer/core",
"version": "0.0.18-alpha.0",
"version": "0.0.19-alpha.0",
"description": "Core Inquirer prompt API",

@@ -24,3 +24,4 @@ "main": "index.js",

"string-width": "^4.1.0",
"strip-ansi": "^6.0.0"
"strip-ansi": "^6.0.0",
"wrap-ansi": "^7.0.0"
},

@@ -30,3 +31,3 @@ "publishConfig": {

},
"gitHead": "e71313db1a6e26f501b58d75a9d3acf53dab5da7"
"gitHead": "9baee326b04b4e8565e815b1fa577c36e0b93727"
}

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc