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

astyle

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

astyle

Artistic Style (AStyle) built with Web Assembly

latest
Source
npmnpm
Version
2.0.0
Version published
Maintainers
1
Created
Source

astyle-wasm

Artistic Style (AStyle) compiled for Web Assembly

Build Status

Installation

To install the package, run the following command:

npm install --save astyle

For yarn users:

yarn add astyle

Usage example

const { format } = require('astyle');

format('void foo(){\nbar();}').then(result => {
  console.log(result);
});

// Output:
// void foo() {
//     bar();
// }

You can also pass AStyle options as a second argument for format(). For instance, you can change the indentation to tabs by specifying 'indent=tab'. The full list of options can be found in the AStyle docs.

Note: The package is currently supported only on Node.js. A web version may be available in the future.

Building the project and running the tests

You will need docker installed. To build:

npm run build:image
npm run build:copy

Then run the tests by executing:

npm test

Keywords

web assembly

FAQs

Package last updated on 29 Dec 2019

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