A tokenlist allows you to manage tokens (individual character strings such as css classes in an attribute string).
The tokenlist offers various functions to manipulate values. For example, you can add, remove or replace a class in a CSS list.
You can call the method via the monster namespace new Monster.Types.TokenList()
.
<script type="module">
import {Monster} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/monster.js';
new Monster.Types.TokenList("myclass row")
</script>
Alternatively, you can also integrate this function individually.
<script type="module">
import {TokenList} from 'https://cdn.jsdelivr.net/npm/@schukai/monster@1.30.0/dist/modules/types/tokenlist.js';
new TokenList("myclass row")
</script>
This class implements the iteration protocol.
typeof new TokenList("myclass row")[Symbol.iterator];
// ↦ "function"