1export enum ReactiveFlags {
2 SKIP = '__v_skip',
3 IS_REACTIVE = '__v_isReactive',
4 IS_READONLY = '__v_isReadonly',
5 IS_SHALLOW = '__v_isShallow',
6 RAW = '__v_raw',
7}
8
9
10 * Checks if an object is a proxy created by {@link reactive},
11 * {@link readonly}, {@link shallowReactive} or {@link shallowReadonly()}.
12 *
13 * @param value - The value to check.
14 * @see {@link https://vuejs.org/api/reactivity-utilities.html#isproxy}
15 */
16export function isProxy(value: any): boolean {
17 return value ? !!value[ReactiveFlags.RAW] : false
18}