{"name":"@webassemblyjs/ast","version":"1.13.2","keywords":["webassembly","javascript","ast"],"author":{"name":"Sven Sauleau"},"license":"MIT","_id":"@webassemblyjs/ast@1.13.2","homepage":"https://github.com/xtuc/webassemblyjs#readme","bugs":{"url":"https://github.com/xtuc/webassemblyjs/issues"},"dist":{"shasum":"69580293aa0aad97187f7b54b52c094f64022046","tarball":"http://registry-npm.ywwl.com/@webassemblyjs/ast/download/@webassemblyjs/ast-1.13.2.tgz","fileCount":36,"integrity":"sha512-Ju9l5kll1EvyeaZTytcnMgdt8Mng+VpZP2cdgzJgLFbOYyHgLyaHXCvqtkU3AOKJKKNQEwKZoUHSw6kYbxzA4Q==","signatures":[{"sig":"MEYCIQCsHpBa9B3Ac9+CYy5xzswhhZxTWsYSqAjwJbUjQOJ3mgIhAP4h544UCONEpy7E1lUoVQ5wWAa8SEEwhIFzbAv7GtgI","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":207436,"size":29342,"noattachment":false,"key":"/@webassemblyjs/ast/-/@webassemblyjs/ast-1.13.2.tgz"},"main":"lib/index.js","module":"esm/index.js","gitHead":"897aeb784f042a46a00626f1d1cca96159aa5db3","_npmUser":{"name":"xtuc","email":"npm@sauleau.com"},"repository":{"url":"git+https://github.com/xtuc/webassemblyjs.git","type":"git"},"_npmVersion":"lerna/5.1.6/node@v21.7.1+x64 (linux)","description":"AST utils for webassemblyjs","directories":{},"_nodeVersion":"21.7.1","dependencies":{"@webassemblyjs/helper-numbers":"1.13.2","@webassemblyjs/helper-wasm-bytecode":"1.13.2"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"mamacro":"^0.0.7","dump-exports":"^0.1.0","array.prototype.flatmap":"^1.2.1","@webassemblyjs/helper-test-framework":"1.13.2"},"_npmOperationalInternal":{"tmp":"tmp/ast_1.13.2_1730929433513_0.657250984275163","host":"s3://npm-registry-packages"},"readme":"# @webassemblyjs/ast\n\n> AST utils for webassemblyjs\n\n## Installation\n\n```sh\nyarn add @webassemblyjs/ast\n```\n\n## Usage\n\n### Traverse\n\n```js\nimport { traverse } from \"@webassemblyjs/ast\";\n\ntraverse(ast, {\n  Module(path) {\n    console.log(path.node);\n  }\n});\n```\n\n### Instruction signatures\n\n```js\nimport { signatures } from \"@webassemblyjs/ast\";\n\nconsole.log(signatures);\n```\n\n### Path methods\n\n- `findParent: NodeLocator`\n- `replaceWith: Node => void`\n- `remove: () => void`\n- `insertBefore: Node => void`\n- `insertAfter: Node => void`\n- `stop: () => void`\n\n### AST utils\n\n- function `module(id, fields, metadata)`\n- function `moduleMetadata(sections, functionNames, localNames)`\n- function `moduleNameMetadata(value)`\n- function `functionNameMetadata(value, index)`\n- function `localNameMetadata(value, localIndex, functionIndex)`\n- function `binaryModule(id, blob)`\n- function `quoteModule(id, string)`\n- function `sectionMetadata(section, startOffset, size, vectorOfSize)`\n- function `loopInstruction(label, resulttype, instr)`\n- function `instruction(id, args, namedArgs)`\n- function `objectInstruction(id, object, args, namedArgs)`\n- function `ifInstruction(testLabel, test, result, consequent, alternate)`\n- function `stringLiteral(value)`\n- function `numberLiteralFromRaw(value, raw)`\n- function `longNumberLiteral(value, raw)`\n- function `floatLiteral(value, nan, inf, raw)`\n- function `elem(table, offset, funcs)`\n- function `indexInFuncSection(index)`\n- function `valtypeLiteral(name)`\n- function `typeInstruction(id, functype)`\n- function `start(index)`\n- function `globalType(valtype, mutability)`\n- function `leadingComment(value)`\n- function `blockComment(value)`\n- function `data(memoryIndex, offset, init)`\n- function `global(globalType, init, name)`\n- function `table(elementType, limits, name, elements)`\n- function `memory(limits, id)`\n- function `funcImportDescr(id, signature)`\n- function `moduleImport(module, name, descr)`\n- function `moduleExportDescr(exportType, id)`\n- function `moduleExport(name, descr)`\n- function `limit(min, max)`\n- function `signature(params, results)`\n- function `program(body)`\n- function `identifier(value, raw)`\n- function `blockInstruction(label, instr, result)`\n- function `callInstruction(index, instrArgs)`\n- function `callIndirectInstruction(signature, intrs)`\n- function `byteArray(values)`\n- function `func(name, signature, body, isExternal, metadata)`\n- Constant`isModule`\n- Constant`isModuleMetadata`\n- Constant`isModuleNameMetadata`\n- Constant`isFunctionNameMetadata`\n- Constant`isLocalNameMetadata`\n- Constant`isBinaryModule`\n- Constant`isQuoteModule`\n- Constant`isSectionMetadata`\n- Constant`isLoopInstruction`\n- Constant`isInstruction`\n- Constant`isObjectInstruction`\n- Constant`isIfInstruction`\n- Constant`isStringLiteral`\n- Constant`isNumberLiteral`\n- Constant`isLongNumberLiteral`\n- Constant`isFloatLiteral`\n- Constant`isElem`\n- Constant`isIndexInFuncSection`\n- Constant`isValtypeLiteral`\n- Constant`isTypeInstruction`\n- Constant`isStart`\n- Constant`isGlobalType`\n- Constant`isLeadingComment`\n- Constant`isBlockComment`\n- Constant`isData`\n- Constant`isGlobal`\n- Constant`isTable`\n- Constant`isMemory`\n- Constant`isFuncImportDescr`\n- Constant`isModuleImport`\n- Constant`isModuleExportDescr`\n- Constant`isModuleExport`\n- Constant`isLimit`\n- Constant`isSignature`\n- Constant`isProgram`\n- Constant`isIdentifier`\n- Constant`isBlockInstruction`\n- Constant`isCallInstruction`\n- Constant`isCallIndirectInstruction`\n- Constant`isByteArray`\n- Constant`isFunc`\n- Constant`assertModule`\n- Constant`assertModuleMetadata`\n- Constant`assertModuleNameMetadata`\n- Constant`assertFunctionNameMetadata`\n- Constant`assertLocalNameMetadata`\n- Constant`assertBinaryModule`\n- Constant`assertQuoteModule`\n- Constant`assertSectionMetadata`\n- Constant`assertLoopInstruction`\n- Constant`assertInstruction`\n- Constant`assertObjectInstruction`\n- Constant`assertIfInstruction`\n- Constant`assertStringLiteral`\n- Constant`assertNumberLiteral`\n- Constant`assertLongNumberLiteral`\n- Constant`assertFloatLiteral`\n- Constant`assertElem`\n- Constant`assertIndexInFuncSection`\n- Constant`assertValtypeLiteral`\n- Constant`assertTypeInstruction`\n- Constant`assertStart`\n- Constant`assertGlobalType`\n- Constant`assertLeadingComment`\n- Constant`assertBlockComment`\n- Constant`assertData`\n- Constant`assertGlobal`\n- Constant`assertTable`\n- Constant`assertMemory`\n- Constant`assertFuncImportDescr`\n- Constant`assertModuleImport`\n- Constant`assertModuleExportDescr`\n- Constant`assertModuleExport`\n- Constant`assertLimit`\n- Constant`assertSignature`\n- Constant`assertProgram`\n- Constant`assertIdentifier`\n- Constant`assertBlockInstruction`\n- Constant`assertCallInstruction`\n- Constant`assertCallIndirectInstruction`\n- Constant`assertByteArray`\n- Constant`assertFunc`\n\n","publish_time":1730929433731,"maintainers":[{"name":"xtuc","email":"npm@sauleau.com"}],"_cnpm_publish_time":1730929433731,"dist-tags":{"latest":"1.14.1"}}