babel-plugin-looptar

0.0.1 • Public • Published

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"]
});

Dependents (0)

Package Sidebar

Install

npm i babel-plugin-looptar

Weekly Downloads

0

Version

0.0.1

License

none

Last publish

Collaborators

  • darkyen00