43ea36b2e423c89d606619d107abb8d7a0bf7b5e0c177f164fad8be5ea48f3b28e7cfc5c6452de905100c1a650713de45633a19a42b1ad0fb288b34f02a9ff 604 B

1234567891011121314151617181920212223242526272829303132333435
  1. # babel-plugin-transform-es2015-block-scoped-functions
  2. > Babel plugin to ensure function declarations at the block level are block scoped.
  3. ## Installation
  4. ```sh
  5. npm install --save-dev babel-plugin-transform-es2015-block-scoped-functions
  6. ```
  7. ## Usage
  8. ### Via `.babelrc` (Recommended)
  9. **.babelrc**
  10. ```json
  11. {
  12. "plugins": ["transform-es2015-block-scoped-functions"]
  13. }
  14. ```
  15. ### Via CLI
  16. ```sh
  17. babel --plugins transform-es2015-block-scoped-functions script.js
  18. ```
  19. ### Via Node API
  20. ```javascript
  21. require("babel-core").transform("code", {
  22. plugins: ["transform-es2015-block-scoped-functions"]
  23. });
  24. ```