0.0.1 • Published 10 years ago
babel-plugin-looptar v0.0.1
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-looptarUsage
Via .babelrc (Recommended)
.babelrc
{
"plugins": ["looptar"]
}Via CLI
$ babel --plugins looptar script.jsVia Node API
require("babel-core").transform("code", {
plugins: ["looptar"]
});0.0.1
10 years ago