UNPKG

568 BJavaScriptView Raw
1/**
2 * Unique symbol to mark Frame instances.
3 *
4 * We use a symbol because in some cases importing the Frame to do
5 * instanceof checks introduces circular references.
6 *
7 * Having the symbol in it's own file prevents any potential circular
8 * references and allows checking if an object is a frame
9 */
10export const FRAME_SYMBOL = Symbol('FRAME_SYMBOL');
11/**
12 * Helper to determine if the passed object is a Frame
13 *
14 * @param object
15 */
16export function isFrame(object) {
17 return object && object[FRAME_SYMBOL] === true;
18}
19//# sourceMappingURL=frame-helpers.js.map
\No newline at end of file