npm.io
0.20.0 • Published 2 months ago

@chialab/estransform

Licence
MIT
Version
0.20.0
Deps
5
Size
16 kB
Vulns
0
Weekly
0
Stars
183

Estransform

Execute multiple transformations on JavaScript sources with full sourcemaps support.

NPM

Install

npm i @chialab/estransform -D
yarn add @chialab/estransform -D
pnpm add @chialab/estransform -D

Usage

import { parse } from '@chialab/estransform';

const { ast, helpers } = await transform('require("tslib"); module.exports = function() {}', {
    sourceContents: true,
});

helpers.overwrite(0, contents.length, 'Hello!');

License

Estransform is released under the MIT license.

Keywords