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 2.0.3 to 2.1.0

lib/index.d.ts

4

CHANGELOG.md
# Changelog
## Version 2.1.0
* package: add TypeScript definition file
## Version 2.0.3

@@ -5,0 +9,0 @@

5

package.json
{
"name": "pad",
"description": "Left and right string padding",
"version": "2.0.3",
"version": "2.1.0",
"author": "David Worms <david@adaltas.com>",

@@ -44,3 +44,4 @@ "contributors": [

"wcwidth": "^1.0.1"
}
},
"types": "lib/index.d.ts"
}

@@ -10,2 +10,4 @@

The API is quite simple:
```javascript

@@ -18,2 +20,5 @@ pad('pad', 5) // "pad "

For TypeScript users, the type definition file is located in "./lib/index.d.ts"
and declared inside the "package.json" file.
## Options

@@ -25,9 +30,9 @@

* `char` (string)
The character used to fill the gap.
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.
`require 'pad/lib/colors'` to avoid passing this option.
* `strip` (boolean)
Remove characters from text if length smaller than text length, default to
"false".
"false".
* `fixed_width` (boolean)

@@ -38,3 +43,3 @@ An optimization option to disable the usage of the wcwdith package to handle

* `wcwidth_options` (object)
Options passed to the wcwidth package used to calculate the display width of
Options passed to the wcwidth package used to calculate the display width of
characters using more than one column.

@@ -49,3 +54,3 @@

var pad = require('pad');
pad(5, 'pad', '-').should.eql('-pad');
pad(5, 'pad', '-').should.eql('--pad');
```

@@ -65,3 +70,4 @@

Starting with version 1.1.0, Node pad rely on Node.js 4.0.0 or more recent. Stick to version 1.0.x if using an older version of Node.js.
Starting with version 1.1.0, Node pad rely on Node.js 4.0.0 or more recent.
Stick to version 1.0.x if using an older version of Node.js.

@@ -74,3 +80,4 @@ Via [npm](http://github.com/isaacs/npm):

Via git (or downloaded tarball), copy or link the project from a discoverable Node directory:
Via git (or downloaded tarball), copy or link the project from a discoverable
Node.js directory:

@@ -77,0 +84,0 @@ ```bash

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