full-width-of-terminal
Advanced tools
Comparing version 1.0.0 to 1.1.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 @@ // | ||
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
174862
14