Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Apr 19, 2026. It is now read-only.

andreineculau/babel-plugin-thin-arrows

Open more actions menu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
7 Commits
 
 
 
 
 
 
 
 

Repository files navigation

NOTE https://bitbucket.org/rainydio/node-babel-plugin-thin-arrows fork

Works on babel v6 IFF babylon/lib/index.js is patched with exports.plugins = plugins;.


Thin arrow function expression syntax for babel.

[1, 2, 3].map(v -> {
	return v * 2;
});

Installation

npm install --save-dev git+https://github.com/andreineculau/babel-plugin-thin-arrows

Disclaimer

It's monkey-patching babylon parser to turn () -> { } into function expression. Keep in mind that this is not supported and not recommended by babel developers.

loganfsmyth [9:26 PM]

custom syntax isn’t supported, monkey-patching the parser is really not recommended

About

It's using somewhat same approach that JSX and Flow plugins. But cutting a corner by not introducing new token ThinArrowFunctionExpression. Mostly because babel-types isn't extensible and it's hard to monkey-patch it.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages

Morty Proxy This is a proxified and sanitized view of the page, visit original site.