cross-platform-node-guide icon indicating copy to clipboard operation
cross-platform-node-guide copied to clipboard

📗 How to write cross-platform Node.js code

cross-platform-nodejs logo

License Twitter Medium

How to write cross-platform Node.js code.

Why you should care: according to the 2018 Node.js user survey, 24% of Node.js developers use Windows locally and 41% use Mac. In production 85% use Linux and 1% use BSD.

Table of contents

Summary

🤖 Development environment

  • Node setup
  • Core utilities
  • Testing

📝 File encoding

  • Character encoding
  • Newlines
  • EOF and BOM

📂 Filesystem

  • Directory locations
  • File paths
  • Filenames
  • Symlinks
  • File metadata

💻 Terminal

  • Shell
  • File execution
  • Package binaries
  • Environment variables

🔒 Security

  • Permissions
  • Users

📡 Networking / IPC

  • Networking
  • Processes
  • Signals
  • Errors

🎛️ System

  • OS identification
  • System configuration
  • Hardware
  • Time

See also

  • cross-platform-terminal-characters: All the characters that work on most terminals
  • https://github.com/bcoe/awesome-cross-platform-nodejs
  • https://github.com/Microsoft/nodejs-guidelines
  • https://shapeshed.com/writing-cross-platform-node/

Support

For any question, don't hesitate to submit an issue on GitHub.

Everyone is welcome regardless of personal background. We enforce a Code of conduct in order to promote a positive and inclusive environment.

Contributing

This project was made with ❤️. The simplest way to give back is by starring and sharing it online.

If the documentation is unclear or has a typo, please click on the page's Edit button (pencil icon) and suggest a correction.

If you would like to help us fix an error or add more information, please check our guidelines. Pull requests are welcome!

Thanks go to these wonderful people:

ehmicky
ehmicky

💻 🎨 🤔 📖
thatalextaylor
thatalextaylor

🤔 📖
Ben Noordhuis
Ben Noordhuis

🤔 📖
Steve Lee
Steve Lee

🤔 📢
Michael J. Ryan
Michael J. Ryan

🤔
Fabio Spampinato
Fabio Spampinato

🤔
AyrA
AyrA

🤔
Felix Becker
Felix Becker

📖 🤔
Nicola Dal Maso
Nicola Dal Maso

🤔