Skip to content

Commit

Permalink
Minor README improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
scripthunter7 committed Feb 19, 2023
1 parent fa89ea4 commit 68ee2a2
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ You can install the library using one of the following methods:
yarn add ecss-tree
```

NPM package: https://www.npmjs.com/package/ecss-tree
Links:
- NPM package: https://www.npmjs.com/package/ecss-tree
- JSDelivr CDN: https://www.jsdelivr.com/package/npm/ecss-tree

## Supported Extended CSS elements

Expand Down Expand Up @@ -354,8 +356,16 @@ Example usage:

```html
<script>
const ast = ECSSTree.parse("input", { context: "selector" });
// Selector to parse
const selector = `div[title="Hello world!"]`;
// Double linked list version of AST
const ast = ECSSTree.parse(selector, { context: "selector" });
// Plain object version of AST
const plain = ECSSTree.toPlainObject(ast);
// Print AST object to console
console.log(plain);
</script>
```
Expand Down

0 comments on commit 68ee2a2

Please sign in to comment.