Join our webinar on Wednesday, June 26, at 1pm EDTHow Chia Mitigates Risk in the Crypto Industry.Register
Socket
Socket
Sign inDemoInstall

pad

Package Overview
Dependencies
0
Maintainers
1
Versions
31
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 1.0.2

2

lib/colors.js

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

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

@@ -3,0 +3,0 @@

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

// Generated by CoffeeScript 1.9.3
// Generated by CoffeeScript 1.11.1
module.exports = function(text, length, options) {

@@ -3,0 +3,0 @@ var escapecolor, i, invert, j, pad, padlength, ref, ref1;

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

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

"devDependencies": {
"coffee-script": "^1.10.0",
"mocha": "^3.0.2",
"should": "^11.1.0"
"coffee-script": "^1.11.1",
"mocha": "^3.1.2",
"should": "^11.1.1"
},

@@ -18,0 +18,0 @@ "engines": {

[![Build Status](https://secure.travis-ci.org/wdavidw/node-pad.png)](http://travis-ci.org/wdavidw/node-pad)
<pre style="font-family:courier">
_ _ _ _____ _
| \ | | | | | __ \ | |
| \| | ___ __| | ___ | |__) |_ _ __| |
| . ` |/ _ \ / _` |/ _ \ | ___/ _` |/ _` |
| |\ | (_) | (_| | __/ | | | (_| | (_| |
|_| \_|\___/ \__,_|\___| |_| \__,_|\__,_| New BSD License
</pre>
Node Pad is a simple function to pad strings in both left and right directions.
Node Pad is a simple function to pad strings in the left and right directions.
## Exemples
## `pad(length, text, [options])`: Left padding
```javascript
pad('pad', 5) # "pad "
pad(5, 'pad') # " pad"
pad('pad', 5, '+') # "pad++"
pad(5, 'pad', '+') # "++pad"
```
Node Pad does left padding when the first argument is a number and the second
## Left padding: `pad(length, text, [options])`
Left padding occurs when the first argument is a number and the second
argument is a string.

@@ -21,8 +21,8 @@

var pad = require('pad');
pad(5, 'pad', '--').should.eql('--pad');
pad(5, 'pad', '-').should.eql('-pad');
```
## `pad(text, length, [options])`: Right padding
## Right padding: `pad(text, length, [options])`
Node Pad does right padding when the first argument is a string and the second
Right padding occurs when the first argument is a string and the second
argument is a number.

@@ -29,0 +29,0 @@

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc