TinyTick logoTinyTick

delCategory

The delCategory method deletes a category configuration.

delCategory(categoryId: string): Manager
TypeDescription
categoryIdstring

The Id of the category to delete.

returnsManager

A reference to the Manager.

Example

This example creates a category called network which is then deleted.

import {createManager} from 'tinytick';

const manager = createManager();
manager.setCategory('network', {maxDuration: 5000});
console.log(manager.getCategoryIds());
// -> ['network']

manager.delCategory('network');
console.log(manager.getCategoryIds());
// -> []

Since

v1.0.0