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

pad

Package Overview
Dependencies
Maintainers
1
Versions
32
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pad - npm Package Compare versions

Comparing version 1.1.0 to 1.2.0

CHANGELOG.md

7

lib/colors.js

@@ -1,2 +0,2 @@

// Generated by CoffeeScript 1.11.1
// Generated by CoffeeScript 2.0.1
var pad;

@@ -6,6 +6,3 @@

module.exports = function(string, size, options) {
if (options == null) {
options = {};
}
module.exports = function(string, size, options = {}) {
if (typeof options === 'string') {

@@ -12,0 +9,0 @@ options = {

@@ -1,10 +0,7 @@

// Generated by CoffeeScript 1.11.1
module.exports = function(text, length, options) {
var escapecolor, invert, pad, padlength, ref;
if (options == null) {
options = {};
}
// Generated by CoffeeScript 2.0.1
module.exports = function(text, length, options = {}) {
var escapecolor, invert, pad, padlength;
invert = typeof text === 'number';
if (invert) {
ref = [text, length], length = ref[0], text = ref[1];
[length, text] = [text, length];
}

@@ -11,0 +8,0 @@ if (typeof options === 'string') {

{
"name": "pad",
"description": "Left and right string padding",
"version": "1.1.0",
"version": "1.2.0",
"author": "David Worms <david@adaltas.com>",

@@ -13,5 +13,4 @@ "contributors": [

"devDependencies": {
"coffee-script": "^1.12.4",
"mocha": "^3.2.0",
"should": "^11.2.0"
"mocha": "^4.0.1",
"should": "^13.1.1"
},

@@ -35,4 +34,8 @@ "engines": {

"pretest": "coffee -b -o lib src",
"test": "mocha --compilers coffee:coffee-script/register --reporter dot"
"test": "mocha test/**/*.coffee"
},
"dependencies": {
"coffeescript": "^2.0.1",
"wcwidth": "^1.0.1"
}
}

@@ -22,10 +22,17 @@

* `char` (string)
The character used to fill the gap.
* `colors` (boolean)
Ajust to hidden terminal color characters, you may also use
`require 'pad/lib/colors'` to avoid passing this option.
* `strip` (boolean)
Remove characters from text if length smaller than text length, default to
"false".
* `char` (string)
The character used to fill the gap.
* `colors` (boolean)
Ajust to hidden terminal color characters, you may also use
`require 'pad/lib/colors'` to avoid passing this option.
* `strip` (boolean)
Remove characters from text if length smaller than text length, default to
"false".
* `fixed_width` (boolean)
An optimization option to disable the usage of the wcwdith package to handle
the discovery of characters using more than one column for display.
one column to display
* `wcwidth_options` (object)
Options passed to the wcwidth package used to calculate the display width of
characters using more than one column.

@@ -32,0 +39,0 @@ ## Left padding: `pad(length, text, [options])`

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