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

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

## isToken() function

Assert that a given value has the general structure of a CSS token: 1. is an array. 2. has at least four items. 3. has a known token type. 4. has a string representation. 5. has a start position. 6. has an end position.

**Signature:**

```typescript
export declare function isToken(x: any): x is CSSToken;
```

## Parameters

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

Parameter


</th><th>

Type


</th><th>

Description


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

x


</td><td>

any


</td><td>


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

**Returns:**

x is [CSSToken](./css-tokenizer.csstoken.md)

