An open API service indexing awesome lists of open source software.

https://github.com/localvoid/hoistr

TypeScript transformer for hoisting expressions to the module scope
https://github.com/localvoid/hoistr

Last synced: about 1 year ago
JSON representation

TypeScript transformer for hoisting expressions to the module scope

Awesome Lists containing this project

README

          

TypeScript transformer for hoisting expressions to the module scope.

```sh
$ npm i --save-dev hoistr ts-hoistr
```

Input:

```ts
import { hoist } from "hoistr";

function A() {
return hoist({ value: 123 });
}
```

Output:

```js
const ___hoisted_1 = { value: 123 };

function A() {
return ___hoisted_1;
}
```