Skip to content

Commit

Permalink
docs: update clone (#277)
Browse files Browse the repository at this point in the history
  • Loading branch information
btea committed May 1, 2023
1 parent 66b5152 commit 2c24f44
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions API.md
Original file line number Diff line number Diff line change
Expand Up @@ -278,16 +278,13 @@ if (node.type === 'id') {
}
```

### `node.clone()`
### `node.clone([opts])`

Returns a copy of a node, detached from any parent containers that the
original might have had.

```js
const cloned = parser.id({value: 'search'});
String(cloned);

// => #search
const cloned = node.clone();
```

### `node.isAtPosition(line, column)`
Expand Down

0 comments on commit 2c24f44

Please sign in to comment.