Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@oclif/table

Package Overview
Dependencies
Maintainers
0
Versions
39
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@oclif/table - npm Package Compare versions

Comparing version 0.1.6 to 0.1.7

6

lib/table.js

@@ -62,3 +62,3 @@ /* eslint-disable react/prop-types */

}
function doStuffWithText({ horizontalAlignment, overflow, padding, value, width, }) {
function formatTextWithMargins({ horizontalAlignment, overflow, padding, value, width, }) {
function calculateMargins(spaces) {

@@ -95,3 +95,3 @@ let marginLeft;

const wrappedText = wrapAnsi(valueWithNoZeroWidthChars, spaceForText, { hard: true, trim: true, wordWrap: true });
const { marginLeft, marginRight } = calculateMargins(width - determineWidthOfWrappedText(wrappedText));
const { marginLeft, marginRight } = calculateMargins(width - determineWidthOfWrappedText(stripAnsi(wrappedText)));
const text = wrappedText.replaceAll('\n', `${' '.repeat(marginRight)}\n${' '.repeat(marginLeft)}`);

@@ -220,3 +220,3 @@ return {

const key = `${props.key}-cell-${column.key}`;
const { marginLeft, marginRight, text } = doStuffWithText({
const { marginLeft, marginRight, text } = formatTextWithMargins({
horizontalAlignment,

@@ -223,0 +223,0 @@ overflow,

{
"name": "@oclif/table",
"description": "Display table in terminal",
"version": "0.1.6",
"version": "0.1.7",
"author": "Salesforce",

@@ -6,0 +6,0 @@ "bugs": "https://github.com/oclif/multi-stage-output/issues",

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