17 Matching Annotations
  1. Sep 2021
    1. You can help make Node.js and browsers more unified. For example, Node.js has util.promisify, which is commonly used. I don’t understand why such an essential method is not also available in browsers. In turn, browsers have APIs that Node.js should have. For example, fetch, Web Streams (The Node.js stream module is awful), Web Crypto (I’ve heard rumors this one is coming), Websockets, etc.
    2. The main reason I love Node.js is that I don’t have to deal with the awfulness that is JS front-end tooling.
  2. Jun 2021
    1. The globalThis property provides a standard way of accessing the global this value (and hence the global object itself) across environments. Unlike similar properties such as window and self, it's guaranteed to work in window and non-window contexts. In this way, you can access the global object in a consistent manner without having to know which environment the code is being run in.
  3. Jan 2021
  4. Dec 2020
    1. Note that preload will run both on the server side and on the client side. It may therefore not reference any APIs only present in the browser.
  5. Nov 2020
  6. Oct 2020
  7. Sep 2020
    1. Some modules, like events or util, are built in to Node.js. If you want to include those (for example, so that your bundle runs in the browser), you may need to include rollup-plugin-node-polyfills.