ruff_fmt 0.0.1
Install from the command line:
Learn more about npm packages
$ npm install @wasm-fmt/ruff_fmt@0.0.1
Install via package.json:
"@wasm-fmt/ruff_fmt": "0.0.1"
About this version
npm install @wasm-fmt/ruff_fmt
import init, { format } from "@wasm-fmt/ruff_fmt";
await init();
const input = `x = { 'a':37,'b':42,
'c':927}
y = 'hello ''world'
z = 'hello '+'world'
a = 'hello {}'.format('world')
class foo ( object ):
def f (self ):
return 37*-+2
def g(self, x,y=42):
return y
def f ( a ) :
return 37+-+a[42-x : y**3]`;
const formatted = format(input);
console.log(formatted);
For Vite users:
import init, { format } from "@wasm-fmt/ruff_fmt/vite";
// ...