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 1.0.0 to 1.1.0

4

build/__tests__/index.js

@@ -8,2 +8,6 @@ 'use strict'

describe('getStringFullWidthOfTerminal()', () => {
test('Argument omission. (default: "-")', () => {
expect(getStringFullWidthOfTerminal()).toBe('-----')
})
test('When the argument is one character', () => {

@@ -10,0 +14,0 @@ expect(getStringFullWidthOfTerminal('=')).toBe('=====')

2

build/index.js

@@ -7,5 +7,5 @@ //

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

@@ -8,2 +8,3 @@ "main": "build/index.js",

"keywords": [
"console",
"terminal",

@@ -19,7 +20,7 @@ "width",

"devDependencies": {
"babel-eslint": "^8.2.2",
"eslint-plugin-flowtype": "^2.46.1",
"flow-bin": "^0.69.0",
"babel-eslint": "^8.2.6",
"eslint-plugin-flowtype": "^2.50.0",
"flow-bin": "^0.79.1",
"flow-remove-types": "^1.2.3",
"jest": "^22.4.3",
"jest": "^23.5.0",
"standard": "^11.0.1"

@@ -26,0 +27,0 @@ },

@@ -8,2 +8,6 @@ 'use strict'

describe('getStringFullWidthOfTerminal()', () => {
test('Argument omission. (default: "-")', () => {
expect(getStringFullWidthOfTerminal()).toBe('-----')
})
test('When the argument is one character', () => {

@@ -10,0 +14,0 @@ expect(getStringFullWidthOfTerminal('=')).toBe('=====')

@@ -7,5 +7,5 @@ // @flow

exports.getStringFullWidthOfTerminal = (str: string): string => {
exports.getStringFullWidthOfTerminal = (str: string = '-'): string => {
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

Sorry, the diff of this file is not supported yet

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