Merge pull request #7515 from abouthiroppy/feature/modify-readme-of-babel-plugin-transform-block-scoped-functions
Update README.md and add test
This commit is contained in:
commit
2c0d492674
@ -20,11 +20,10 @@ name("Steve");
|
|||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
{
|
{
|
||||||
var _name = function _name(n) {
|
let name = function (n) {
|
||||||
return n;
|
return n;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
name("Steve");
|
name("Steve");
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
function name (n) {
|
||||||
|
return n;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
name("Steve");
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
{
|
||||||
|
"plugins": ["transform-block-scoped-functions"]
|
||||||
|
}
|
||||||
@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
let name = function (n) {
|
||||||
|
return n;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
name("Steve");
|
||||||
@ -0,0 +1,3 @@
|
|||||||
|
import runner from "@babel/helper-plugin-test-runner";
|
||||||
|
|
||||||
|
runner(__dirname);
|
||||||
Loading…
x
Reference in New Issue
Block a user