Tiny Embeddable Syntax Tree - GitHub
A compact, fast, and embeddable JavaScript AST for transpilation.
Tinyest supports source mapping.
Use embedSourceMap function to obtain a new node with the source map embedded.
Use stripSourceMap function to restore the original node and source map.
Note that both functions create a new AST instead of modifying the existing one:
const node: Identifier = [NodeTypeCatalog.identifier, 'ident'];
const sourceMap: SourceMap = new Map([[node, [1, 2]]]);
const sourceMappedNode = embedSourceMap(node, sourceMap);
const [restoredNode, restoredSourceMap] = stripSourceMap(sourceMappedNode);
console.log(restoredNode); // [9, 'ident'];
console.log(restoredSourceMap.get(restoredNode)); // [1, 2];
console.log(node === restoredNode); // false
console.log(restoredSourceMap.get(node)); // undefined- TypeGPU - A TypeScript library that enhances the WebGPU API, allowing resource management in a type-safe way.
Since 2012 Software Mansion is a software agency with experience in building web and mobile apps. We are Core React Native Contributors and experts in dealing with all kinds of React Native issues. We can help you build your next dream product – Hire us.