How to wrap async function calls into a sync function in Node.js or Javascript?

This page summarizes the projects mentioned and recommended in the original post on /r/codehunter

InfluxDB - Power Real-Time Data Analytics at Scale
Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
www.influxdata.com
featured
SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  • node-fibers

    Fiber/coroutine support for v8 and node.

  • Asynchronous function using callback/promise is the DNA of JavasSript and Node.js. Any non-trivial JS app is probably permeated with this coding style. But this practice can easily lead to so called callback pyramid of doom. Even worse, if any code in any caller in the call chain depends on the result of the async function, those code has to be wrapped in callback function as well, imposing a coding style constraint on caller. From time to time I find the need to encapsulate an async function (often provided in a 3rd party library) into a sync function in order to avoid massive global re-factoring. Searching for a solution on this subject usually ended up with Node Fibers or npm packages derived from it. But Fibers just cannot solve the problem I am facing. Even the example provided by Fibers' author illustrated the deficiency:

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

  • Cyber Security: A Pre-War Reality Check

    1 project | news.ycombinator.com | 18 May 2024
  • wxHexEditor — a Free Hex Editor / Disk Editor for Huge Files or Devices

    2 projects | news.ycombinator.com | 18 May 2024
  • Ubershaders: A Ridiculous Solution to an Impossible Problem (2017)

    1 project | news.ycombinator.com | 18 May 2024
  • Non-Euclidean Doom: what happens to a game when pi is not 3.14159 (2022) [video]

    2 projects | news.ycombinator.com | 17 May 2024
  • Playstation 4 Jailbroken using bug from 2006

    1 project | news.ycombinator.com | 17 May 2024