esm: provide named exports for all builtin libraries by devsnek · Pull Request #18131 · nodejs/node
Navigation Menu
- Notifications You must be signed in to change notification settings
- Fork 35.1k
Conversation
devsnek
changed the title
esm: provide wrappers for all builtin libraries
esm: provide named exports for all builtin libraries
jasnell previously approved these changes Jan 13, 2018
provide named exports for all builtin libraries so that the libraries may be
imported in a nicer way for esm users: `import { readFile } from 'fs'`
instead of importing the entire namespace, `import fs from 'fs'`, and
calling `fs.readFile`. the default export is left as the entire
namespace (module.exports)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters