Comparing version 2.0.3 to 2.1.0
# Changelog | ||
## Version 2.1.0 | ||
* package: add TypeScript definition file | ||
## Version 2.0.3 | ||
@@ -5,0 +9,0 @@ |
{ | ||
"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 |
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
8622
9
83
90