{"id":20025,"library":"fast-async","title":"fast-async","description":"A Babel plugin that transforms ES7 async/await to Promise-based code without generators, offering 3-4x performance improvement in browsers vs Babel's default regenerator approach. Current stable version is 6.3.8 (for Babel 6) and version 7 for Babel 7 (beta). Uses the nodent library under the hood. Key differentiators: avoids generators and regenerator, supports 'spec' mode for spec-compliance, and allows runtime pattern customization. Has undergone several fixes for edge cases like destructuring and export hoisting.","status":"active","version":"6.3.8","language":"javascript","source_language":"en","source_url":"https://github.com/MatAtBread/fast-async","tags":["javascript","babel","plugin","Javascript","ES7","async","await"],"install":[{"cmd":"npm install fast-async","lang":"bash","label":"npm"},{"cmd":"yarn add fast-async","lang":"bash","label":"yarn"},{"cmd":"pnpm add fast-async","lang":"bash","label":"pnpm"}],"dependencies":[{"reason":"Core transformation library; provides async/await compilation logic","package":"nodent","optional":false}],"imports":[{"note":"CommonJS only; no default ES import provided. Use require or dynamic import.","wrong":"import fastAsync from 'fast-async'","symbol":"default","correct":"module.exports = require('fast-async')"}],"quickstart":{"code":"// .babelrc\n{\n  \"plugins\": [\"fast-async\"]\n}\n\n// Input\nasync function fetchData(url) {\n  const response = await fetch(url);\n  return response.json();\n}\n\n// Output (simplified)\nfunction fetchData(url) {\n  return Promise.resolve().then(function() {\n    return fetch(url);\n  }).then(function(response) {\n    return response.json();\n  });\n}","lang":"javascript","description":"Shows basic babel plugin configuration and the transformation from async/await to Promises."},"warnings":[{"fix":"Use 'module:fast-async' in plugins array for Babel 7.","message":"Babel 7 requires 'module:fast-async' plugin prefix instead of 'fast-async'","severity":"breaking","affected_versions":">=7.0.0"},{"fix":"Remove these options from configuration; they are no longer supported.","message":"Options 'augmentObject', 'dontMapStackTraces', 'dontInstallRequireHook' removed in v6.3.x","severity":"breaking","affected_versions":">=6.3.0"},{"fix":"Either include runtime via 'runtimePattern' or set 'compiler.promises: false' if your environment supports Promises.","message":"Compiled code typically requires nodent runtime unless 'noRuntime' or 'spec' option is used","severity":"deprecated","affected_versions":">=6.0.0"},{"fix":"Only use standard async/await syntax; those extensions are only available with nodent directly.","message":"ES7 extensions like 'await' outside async function or 'async return' are not supported because Babel parses the code","severity":"gotcha","affected_versions":">=1.0.0"},{"fix":"Ensure 'dontMapStackTraces' defaults to true; avoid enabling both mappings simultaneously.","message":"Stack trace mapping can conflict with Babel's own mapping, causing confusion","severity":"gotcha","affected_versions":">=6.1.0"}],"env_vars":null,"search_vec":"'-4':20 '3':19 '6':39 '6.3.8':36 '7':42,45 'allow':68 'approach':31 'async':3,89 'async/await':10 'avoid':56 'await':90 'babel':5,27,38,44,85 'base':14 'beta':46 'browser':25 'case':78 'code':15 'complianc':66 'current':32 'custom':71 'default':29 'destructur':80 'differenti':55 'edg':77 'es7':9,88 'export':82 'fast':2 'fast-async':1 'fix':75 'generat':17,57 'hoist':83 'hood':53 'improv':23 'javascript':84,87 'key':54 'librari':50 'like':79 'mode':62 'nodent':49 'offer':18 'pattern':70 'perform':22 'plugin':6,86 'promis':13 'promise-bas':12 'regener':30,59 'runtim':69 'sever':74 'spec':61,65 'spec-compli':64 'stabl':33 'support':60 'transform':8 'undergon':73 'use':47 'version':34,41 'vs':26 'without':16 'x':21","created_at":"2026-04-25T11:20:55.913465+00:00","updated_at":"2026-04-25T11:20:55.913465+00:00","problems":[{"fix":"Ensure babel-preset-es2015 (or equivalent) is installed and listed in .babelrc 'presets'.","cause":"Missing Babel presets required by fast-async or configuration error","error":"Error: Couldn't find preset \"es2015\" relative to directory ..."},{"fix":"Verify Babel version and install correct fast-async version (v6 for Babel 6, v7 for Babel 7).","cause":"Plugin loaded incorrectly or Babel version mismatch (e.g., using v6 plugin with Babel 7)","error":"TypeError: Cannot read property 'async' of undefined"},{"fix":"Ensure all await expressions are inside async functions. Use standard ES2017 syntax.","cause":"Babel parser does not support certain async/await syntax edge cases (e.g., await in non-async function)","error":"SyntaxError: Unexpected token (1:14) ... while parsing async function"}],"ecosystem":"npm","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"1.1.0","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/MatAtBread/fast-async","docs":null,"changelog":null,"pypi":null,"npm":"https://www.npmjs.com/package/fast-async","openapi_spec":null,"status_page":null,"smithery":null,"categories":["serialization"],"base_url":null,"auth_type":null,"provenance":{"verified_status":null,"verified_at":null,"last_verified":"2026-06-17","next_check":"2026-07-24","install_tag":null}}