You Don't Know JS: ES6 and Beyond by Kyle Simpson

You Don't Know JS: ES6 and Beyond by Kyle Simpson

Author:Kyle Simpson [Simpson, Kyle]
Language: eng
Format: epub
Tags: js, o'reilly
Publisher: O'Reilly Media
Published: 0101-01-01T00:00:00+00:00


export default function foo() { .. } foo.bar = function() { .. }; foo.baz = function() { .. };

You can do:

export default function foo() { .. } export function bar() { .. } export function baz() { .. }

Note

In this previous snippet, I used the name foo for the function that default labels. That foo name however is ignored for the purposes of export — default is actually the exported name. When you import this default binding, you can give it whatever name you want, as you’ll see in the next section.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.