0.1.0 • Published 4 years ago

hoistr v0.1.0

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

TypeScript transformer for hoisting expressions to the module scope.

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

Input:

import { hoist } from "hoistr";

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

Output:

const ___hoisted_1 = { value: 123 };

function A() {
  return ___hoisted_1;
}