babel-plugin-looptar
v0.0.1
Published
Breaks infinite loops in ui therads in dev environment
Downloads
4
Readme
babel-plugin-looptar
Breaks infinite loops in ui therads in dev environment, this is really helpful if you are building user interfaces, will save your butt a lot :P
Example
This will work with for
, while
, do while
loops alike.
In
// input code
for( let i = 0; i < 9001; i++ ){
}
Out
"use strict";
const __looptar = require('looptar')();
// output code
for( let i = 0; i < 9001; i++ ){
__looptar.iterates(0);
}
__looptar.exits(0);
Installation
$ npm install babel-plugin-looptar
Usage
Via .babelrc
(Recommended)
.babelrc
{
"plugins": ["looptar"]
}
Via CLI
$ babel --plugins looptar script.js
Via Node API
require("babel-core").transform("code", {
plugins: ["looptar"]
});