1 | import {
|
2 | isObject, isFunction,
|
3 | hasOwnProperty,
|
4 | HINT_OBSERVE, defineHint,
|
5 | MESSAGE_NOT_OBJECT, throwError
|
6 | } from "./util.js";
|
7 |
|
8 | /** See lib/patella.d.ts */
|
9 | export function ignore(object) {
|
10 | if (!isObject(object) && !isFunction(object)) {
|
11 | throwError(MESSAGE_NOT_OBJECT);
|
12 | }
|
13 |
|
14 | if (!hasOwnProperty(object, HINT_OBSERVE)) {
|
15 | defineHint(object, HINT_OBSERVE);
|
16 | }
|
17 |
|
18 | return object;
|
19 | }
|