Registry / serialization / fast-async

fast-async

JSON →
library1.1.0jsnpmunverified

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.

npm install fast-async
INSTALL
IMPORT
SIG · FAST-ASYNC
F
fast-async
serializationjavascriptv1.1.0
Install
—
Import
—
Disk
—
Pass rate
0/ 6
Env Coverage0 / 6
glibc
18–22
musl
18–22
Install & Compatibility
Where this runs
tested against v? · npm install
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
node 18–226 runs
build_error
glibc
node 18–226 runs
build_error
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

default
✓ module.exports = require('fast-async')
✗ import fastAsync from 'fast-async'
CommonJS only; no default ES import provided. Use require or dynamic import.

Shows basic babel plugin configuration and the transformation from async/await to Promises.

// .babelrc { "plugins": ["fast-async"] } // Input async function fetchData(url) { const response = await fetch(url); return response.json(); } // Output (simplified) function fetchData(url) { return Promise.resolve().then(function() { return fetch(url); }).then(function(response) { return response.json(); }); }
Debug
Known issues
breakingBabel 7 requires 'module:fast-async' plugin prefix instead of 'fast-async'
fix
Use 'module:fast-async' in plugins array for Babel 7.
affects: >=7.0.0
breakingOptions 'augmentObject', 'dontMapStackTraces', 'dontInstallRequireHook' removed in v6.3.x
fix
Remove these options from configuration; they are no longer supported.
affects: >=6.3.0
deprecatedCompiled code typically requires nodent runtime unless 'noRuntime' or 'spec' option is used
fix
Either include runtime via 'runtimePattern' or set 'compiler.promises: false' if your environment supports Promises.
affects: >=6.0.0
gotchaES7 extensions like 'await' outside async function or 'async return' are not supported because Babel parses the code
fix
Only use standard async/await syntax; those extensions are only available with nodent directly.
affects: >=1.0.0
gotchaStack trace mapping can conflict with Babel's own mapping, causing confusion
fix
Ensure 'dontMapStackTraces' defaults to true; avoid enabling both mappings simultaneously.
affects: >=6.1.0
Errors
Common errors & fixes
Error: Couldn't find preset "es2015" relative to directory ...
Missing Babel presets required by fast-async or configuration error
fix
Ensure babel-preset-es2015 (or equivalent) is installed and listed in .babelrc 'presets'.
TypeError: Cannot read property 'async' of undefined
Plugin loaded incorrectly or Babel version mismatch (e.g., using v6 plugin with Babel 7)
fix
Verify Babel version and install correct fast-async version (v6 for Babel 6, v7 for Babel 7).
SyntaxError: Unexpected token (1:14) ... while parsing async function
Babel parser does not support certain async/await syntax edge cases (e.g., await in non-async function)
fix
Ensure all await expressions are inside async functions. Use standard ES2017 syntax.
Upgrade
Version history
1.1.0latest on npm
Audit
Dependencies
nodentrequiredCore transformation library; provides async/await compilation logic
Agent activity
6 hits · last 30 days
node
6
Resources
fast-async — npm install fast-async · libregistry