summaryrefslogtreecommitdiff
path: root/preact/devtools/src/index.js
blob: 693429f56c1908fada8deec75520ef32d0f4ec57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import { options } from 'preact';
import { initDevTools } from './devtools';

initDevTools();

/**
 * Display a custom label for a custom hook for the devtools panel
 * @type {<T>(value: T, name: string) => T}
 */
export function addHookName(value, name) {
	if (options._addHookName) {
		options._addHookName(name);
	}
	return value;
}