<!-- Do not edit this file. It is automatically generated by API Documenter. -->

[Home](./index.md) &gt; [@csstools/css-tokenizer](./css-tokenizer.md) &gt; [cloneTokens](./css-tokenizer.clonetokens.md)

## cloneTokens() function

Deep clone a list of tokens. Useful for mutations without altering the original list.

**Signature:**

```typescript
export declare function cloneTokens(tokens: Array<CSSToken>): Array<CSSToken>;
```

## Parameters

<table><thead><tr><th>

Parameter


</th><th>

Type


</th><th>

Description


</th></tr></thead>
<tbody><tr><td>

tokens


</td><td>

Array&lt;[CSSToken](./css-tokenizer.csstoken.md)<!-- -->&gt;


</td><td>


</td></tr>
</tbody></table>

**Returns:**

Array&lt;[CSSToken](./css-tokenizer.csstoken.md)<!-- -->&gt;

