Skip to content

Commit

Permalink
docs(core): document symbolic expression tranformer (#3383)
Browse files Browse the repository at this point in the history
  • Loading branch information
char0n authored Nov 13, 2023
1 parent b904cf3 commit adbda5f
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions packages/apidom-core/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -687,6 +687,25 @@ const numberElement = new NumberElement(1);
dehyrate(numberElement); // => { element: 'number', content: 1 }
```

### S-Expression

Transforms ApiDOM into [symbolic expression](https://en.wikipedia.org/wiki/S-expression).

```js
import { sexprs, ObjectElement } from '@swagger-api/apidom-core';

const objectElement = new ObjectElement({ a: 1 });

sexprs(objectElement);
// =>
// (ObjectElement
// (MemberElement
// (StringElement)
// (NumberElement)))


```

### toString

Create a [refracted string](https://github.com/refractproject/refract-spec) representation of an Element.
Expand Down

0 comments on commit adbda5f

Please sign in to comment.