0.2.8 • Published 4 months ago

@wasm-fmt/clang-format v0.2.8

Weekly downloads
-
License
MIT
Repository
github
Last release
4 months ago

Test npm

Install

npm install @wasm-fmt/clang-format

Usage

import init, { format } from '@wasm-fmt/clang-format';

await init();

const source = `
#include <iostream>
using namespace std;
auto main() -> int{
std::cout << "Hello World!" << std::endl;
return 0;}
`;

const formatted = format(
    source,
    "main.cc",
    JSON.stringify({
        BasedOnStyle: "Chromium",
        IndentWidth: 4,
        ColumnLimit: 80,
    })
);

console.log(formatted);

Build from source

  1. Install LLVM and Clang (version 18 or later).
  2. Install CMake (version 3.27 or later).
  3. Install Ninja (version 1.11 or later).
  4. Clone this repository.
  5. Run scrips/build.sh.
0.2.8

4 months ago

0.2.7

8 months ago

0.2.6

8 months ago

0.2.5

8 months ago

0.2.4

8 months ago

0.2.3

8 months ago

0.2.2

8 months ago

0.2.1

8 months ago

0.2.0

9 months ago

0.1.2

9 months ago

0.1.1

9 months ago

0.1.0

9 months ago

0.0.2

9 months ago

0.0.1

9 months ago