Build your own tools
Use our parsers to build your own tools or add AsyncAPI support to your product.
JavaScript parser
Parse AsyncAPI documents in your JavaScript tooling and products. It works on Node.js and browsers.
npm install @asyncapi/parser
1import { parse } from '@asyncapi/parser'
2
3const doc = await parse(`
4asyncapi: '3.0.0'
5info:
6 title: Example
7 version: '1.0.0'
8channels:
9 example:
10 address: example-channel
11 messages:
12 example:
13 payload:
14 type: object
15 properties:
16 exampleField:
17 type: string
18 exampleNumber:
19 type: number
20 exampleDate:
21 type: string
22 format: date-time
23operations:
24 example:
25 action: send
26 channel:
27 $ref: '#/channels/example'
28`)
29
30console.log(doc.info().title())
31// => Example