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

node-fzf

Package Overview
Dependencies
Maintainers
1
Versions
30
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

node-fzf - npm Package Compare versions

Comparing version 0.0.4 to 0.0.5

3

package.json
{
"name": "node-fzf",
"version": "0.0.4",
"version": "0.0.5",
"description": "fzf ( junegunn/fzf ) inspired cli utility for node",

@@ -40,2 +40,3 @@ "main": "src/index.js",

"redstar": "0.0.2",
"string-width": "~2.1.1",
"ttys": "0.0.3"

@@ -42,0 +43,0 @@ },

@@ -8,2 +8,4 @@ const keypress = require( 'keypress' )

const stringWidth = require( 'string-width' )
const clc = require( 'cli-color' )

@@ -232,3 +234,3 @@

const len = t.length
let len = stringWidth( t ) // use string-width to keep length in check
const maxLen = getMaxWidth() // terminal width

@@ -242,3 +244,3 @@

// limit too much unnecessary empty margin
if ( matchMarginRight > ( t.length + 8 ) ) matchMarginRight = ( t.length + 8 )
if ( matchMarginRight > ( len + 8 ) ) matchMarginRight = ( len + 8 )

@@ -248,3 +250,3 @@ const shiftRight = ( maxLen - matchMarginRight )

let startIndex = 0
let endIndex = t.length
let endIndex = len

@@ -259,3 +261,4 @@ if ( shiftRight < 0 ) {

if ( t.length > maxLen ) {
len = stringWidth( t )
if ( len > maxLen ) {
t = t.slice( 0, maxLen ) + '...'

@@ -262,0 +265,0 @@ endIndex = maxLen

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