New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

vbspretty

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vbspretty

A VBScript parser and beautifier

latest
Source
npmnpm
Version
0.0.3
Version published
Weekly downloads
1
-80%
Maintainers
1
Weekly downloads
 
Created
Source

vbspretty GitHub license npm version

A sophisticated VBScript parser and beautifier powered by nodejs.

Usage

npm i vbspretty

As command-line (See command line options at CLI)

npx vbspretty ./MyApp.vbs

Nodejs usage

const fs = require('fs');
const vbspretty = require('vbspretty');

const source = fs.readFileSync('./MyApp.vbs').toString();

var sourcePretty = vbspretty({
  level: 0,
  indentChar: '\t',
  breakLineChar: '\r\n',
  breakOnSeperator: false,
  removeComments: false,
  source: source,
});

fs.writeFileSync('./MyAppPretty.vbs', sourcePretty);

CLI usage

Cli accepts all options from the api plus an --output option to provide a different file to output formatted version, if --output is omitted, the input file will be overwritten.

First param should always be the input file and it's mandatory, other params are optionals to configure vbspretty options. See full example bellow.

vbspretty MyApp.vbs --level 0 --indentChar "\t" --breakLineChar "\r\n" --breakOnSeperator --removeComments --output ./MyAppPretty.vbs

API

OptionsTypeDefaultDescription
levelnumber0Indent level to start off
indentCharString"spacespace"Indent character (e.g., \t, spacespace)
breakLineCharString"\n"Break line character (e.g., \n, \r\n)
breakOnSeperatorbooleanfalseWhether it breaks the line on occurrences of the ":" statement separator.
removeCommentsbooleanfalseWhether it removes comments from the input.

Keywords

vbs

FAQs

Package last updated on 13 Jul 2021

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