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

bzz

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bzz

Template strings formatter for avoiding indentation side effect

  • 0.2.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

bzz

Template strings formatter for avoiding indentation side effect. Format string according minimum found identation and passed gitter.

npm version Build Status XO code style

bzz output

Installation

npm install --save bzz

API

bzz(templateString, [defaultGitter]);

defaultGitter set a minimum identation for passed string. Default: 0

Usage examples


const bzz = require('bzz');

// the fist string's line will be removed
const str = bzz(`
    Hello
      world
`);  // <-- the last line will be removed too

console.log(str);

Output:

Hello
  world


const bzz = require('bzz');

const str = bzz(` this line will be removed so not affect anything
      Meow
        Moo
      Arf-arf
`, 2);

console.log(str);

Output:

  Meow
    Moo
  Arf-arf
Author

Dmitry Pavlovsky

FAQs

Package last updated on 26 Dec 2016

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc