Socket
Socket
Sign inDemoInstall

white-spacer

Package Overview
Dependencies
0
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    white-spacer

Add white space to begining or end of string.


Version published
Maintainers
1
Install size
2.53 kB
Created

Readme

Source

white-spacer

Just apply white space before or after String or just get n white spaces. So simple your mum can use it :)

NPM Version NPM Downloads

var spacer = require('white-spacer');

console.log(spacer('GET'), '/user');
console.log(spacer('DELETE'), '/user');

Will output

GET     /user
DELETE  /user

Installation

$ npm install white-spacer --save

Options

Pass arguments of String/Integer [ Count(Integer) , Before(Boolean) ]

var spacer = require('white-spacer');

spacer(6)                   // outputs: "     /user"
spacer('GET')               // outputs: "GET     /user"
spacer('DELETE')            // outputs: "DELETE  /user"
spacer('DELETE',10)         // outputs: "DELETE    /user"
spacer('DELETE',10, true)   // outputs: "    DELETE/user"

Keywords

FAQs

Last updated on 09 Feb 2015

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

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