@webassemblyjs/ast
Advanced tools
Weekly downloads
Readme
AST utils for webassemblyjs
yarn add @webassemblyjs/ast
import { traverse } from "@webassemblyjs/ast";
traverse(ast, {
Module(path) {
console.log(path.node);
}
});
import { signatures } from "@webassemblyjs/ast";
console.log(signatures);
findParent: NodeLocator
replaceWith: Node => void
remove: () => void
insertBefore: Node => void
insertAfter: Node => void
stop: () => void
module(id, fields, metadata)
moduleMetadata(sections, functionNames, localNames)
moduleNameMetadata(value)
functionNameMetadata(value, index)
localNameMetadata(value, localIndex, functionIndex)
binaryModule(id, blob)
quoteModule(id, string)
sectionMetadata(section, startOffset, size, vectorOfSize)
loopInstruction(label, resulttype, instr)
instruction(id, args, namedArgs)
objectInstruction(id, object, args, namedArgs)
ifInstruction(testLabel, test, result, consequent, alternate)
stringLiteral(value)
numberLiteralFromRaw(value, raw)
longNumberLiteral(value, raw)
floatLiteral(value, nan, inf, raw)
elem(table, offset, funcs)
indexInFuncSection(index)
valtypeLiteral(name)
typeInstruction(id, functype)
start(index)
globalType(valtype, mutability)
leadingComment(value)
blockComment(value)
data(memoryIndex, offset, init)
global(globalType, init, name)
table(elementType, limits, name, elements)
memory(limits, id)
funcImportDescr(id, signature)
moduleImport(module, name, descr)
moduleExportDescr(exportType, id)
moduleExport(name, descr)
limit(min, max)
signature(params, results)
program(body)
identifier(value, raw)
blockInstruction(label, instr, result)
callInstruction(index, instrArgs)
callIndirectInstruction(signature, intrs)
byteArray(values)
func(name, signature, body, isExternal, metadata)
isModule
isModuleMetadata
isModuleNameMetadata
isFunctionNameMetadata
isLocalNameMetadata
isBinaryModule
isQuoteModule
isSectionMetadata
isLoopInstruction
isInstruction
isObjectInstruction
isIfInstruction
isStringLiteral
isNumberLiteral
isLongNumberLiteral
isFloatLiteral
isElem
isIndexInFuncSection
isValtypeLiteral
isTypeInstruction
isStart
isGlobalType
isLeadingComment
isBlockComment
isData
isGlobal
isTable
isMemory
isFuncImportDescr
isModuleImport
isModuleExportDescr
isModuleExport
isLimit
isSignature
isProgram
isIdentifier
isBlockInstruction
isCallInstruction
isCallIndirectInstruction
isByteArray
isFunc
assertModule
assertModuleMetadata
assertModuleNameMetadata
assertFunctionNameMetadata
assertLocalNameMetadata
assertBinaryModule
assertQuoteModule
assertSectionMetadata
assertLoopInstruction
assertInstruction
assertObjectInstruction
assertIfInstruction
assertStringLiteral
assertNumberLiteral
assertLongNumberLiteral
assertFloatLiteral
assertElem
assertIndexInFuncSection
assertValtypeLiteral
assertTypeInstruction
assertStart
assertGlobalType
assertLeadingComment
assertBlockComment
assertData
assertGlobal
assertTable
assertMemory
assertFuncImportDescr
assertModuleImport
assertModuleExportDescr
assertModuleExport
assertLimit
assertSignature
assertProgram
assertIdentifier
assertBlockInstruction
assertCallInstruction
assertCallIndirectInstruction
assertByteArray
assertFunc
FAQs
AST utils for webassemblyjs
The npm package @webassemblyjs/ast receives a total of 21,620,774 weekly downloads. As such, @webassemblyjs/ast popularity was classified as popular.
We found that @webassemblyjs/ast demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket installs a Github app to automatically flag issues on every pull request and report the health of your dependencies. Find out what is inside your node modules and prevent malicious activity before you update the dependencies.