Socket
Socket
Sign inDemoInstall

full-width-of-terminal

Package Overview
Dependencies
Maintainers
1
Versions
10
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

full-width-of-terminal - npm Package Compare versions

Comparing version 0.0.3 to 0.1.0

build/__mocks__/columns.js

2

build/__tests__/index.js

@@ -9,3 +9,3 @@ 'use strict'

test('When the argument is one character', () => {
expect(getStringFullWidthOfTerminal('=')).toBe('====')
expect(getStringFullWidthOfTerminal('=')).toBe('=====')
})

@@ -12,0 +12,0 @@

@@ -8,3 +8,4 @@ //

exports.getStringFullWidthOfTerminal = (str ) => {
return new Array(columns).join(str).substr(0, columns)
const size = Math.ceil(columns / str.length)
return new Array(size + 1).join(str).substr(0, columns)
}
{
"name": "full-width-of-terminal",
"version": "0.0.3",
"version": "0.1.0",
"description": "The string is displayed on the full width of the terminal.",

@@ -18,4 +18,4 @@ "main": "build/index.js",

"devDependencies": {
"babel-eslint": "^8.0.2",
"eslint-plugin-flowtype": "^2.39.1",
"babel-eslint": "^8.2.1",
"eslint-plugin-flowtype": "^2.42.0",
"flow-bin": "^0.59.0",

@@ -22,0 +22,0 @@ "flow-remove-types": "^1.2.3",

@@ -9,3 +9,3 @@ 'use strict'

test('When the argument is one character', () => {
expect(getStringFullWidthOfTerminal('=')).toBe('====')
expect(getStringFullWidthOfTerminal('=')).toBe('=====')
})

@@ -12,0 +12,0 @@

@@ -8,3 +8,4 @@ // @flow

exports.getStringFullWidthOfTerminal = (str: string): string => {
return new Array(columns).join(str).substr(0, columns)
const size = Math.ceil(columns / str.length)
return new Array(size + 1).join(str).substr(0, columns)
}

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