Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

babel-plugin-transform-es2015-for-of

Package Overview
Dependencies
Maintainers
6
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

babel-plugin-transform-es2015-for-of

Compile ES2015 for...of to ES5

  • 7.0.0-alpha.8
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1.2M
decreased by-30.72%
Maintainers
6
Weekly downloads
 
Created

What is babel-plugin-transform-es2015-for-of?

The babel-plugin-transform-es2015-for-of npm package is a plugin for Babel, a JavaScript compiler, that transforms for...of loops in ES2015 (ES6) to more compatible ES5 syntax. This transformation allows developers to use for...of loops, which iterate over iterable objects (like Arrays, Maps, Sets, etc.), in environments that do not support ES2015 syntax natively.

What are babel-plugin-transform-es2015-for-of's main functionalities?

Transform for...of loops to ES5

This feature automatically converts for...of loops into compatible ES5 syntax using a simple for loop. This allows the code to run in environments that do not support ES2015. The code sample shows how a for...of loop is transformed into a for loop that iterates over an array.

"use strict";\n\nvar _arr = [1, 2, 3];\nfor (var _i = 0; _i < _arr.length; _i++) {\n  var i = _arr[_i];\n  console.log(i);\n}

Other packages similar to babel-plugin-transform-es2015-for-of

Keywords

FAQs

Package last updated on 17 Apr 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc