infinite-loop-loader
Advanced tools
Weekly downloads
Readme
A webpack 2 loader to transform ∞ loops so that they throw
Before:
while(true){
// your logic here
}
After:
var __ITER = 1000000000;
while(true) {
if (__ITER <= 0) {
throw new Error("Loop exceeded maximum allowed iterations");
}
// your logic here
__ITER--;
}
npm install --save-dev infinite-loop-loader
Webpack config example
...
module: {
rules: [
{
test: /\.js$/,
use: [
loader: 'infinite-loop-loader',
options: {
// iteration limit
limit: 10000,
// falafel -> acorn options
opts {
allowImportExportEverywhere: true
}
}
]
}
],
...
}
...
FAQs
A webpack loader to transform ∞ loops so that they throw
The npm package infinite-loop-loader receives a total of 674 weekly downloads. As such, infinite-loop-loader popularity was classified as not popular.
We found that infinite-loop-loader demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 5 open source maintainers collaborating on the project.
Did you know?
Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.