Exciting release!Introducing "safe npm". Learn more
Socket
Log inDemoInstall

infinite-loop-loader

Package Overview
Dependencies
2
Maintainers
5
Versions
10
Issues
File Explorer

Advanced tools

infinite-loop-loader

A webpack loader to transform ∞ loops so that they throw

    1.0.9latest
    Github

Version published
Maintainers
5
Weekly downloads
887
increased by33.18%

Weekly downloads

Readme

Source

infinite-loop-loader

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--; }

Installation

npm install --save-dev infinite-loop-loader

Usage

Webpack config example

... module: { rules: [ { test: /\.js$/, use: [ loader: 'infinite-loop-loader', options: { // iteration limit limit: 10000, // falafel -> acorn options opts { allowImportExportEverywhere: true } } ] } ], ... } ...

Keywords

FAQs

Last updated on 26 Oct 2021

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.

Install Socket
Socket
support@socket.devSocket SOC 2 Logo

Product

  • Package Issues
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc