31 lines
784 B
JavaScript
31 lines
784 B
JavaScript
goog.provide("goog.reflect");
|
|
goog.reflect.object = function(type, object) {
|
|
return object;
|
|
};
|
|
goog.reflect.objectProperty = function(prop, object) {
|
|
return prop;
|
|
};
|
|
goog.reflect.sinkValue = function(x) {
|
|
goog.reflect.sinkValue[" "](x);
|
|
return x;
|
|
};
|
|
goog.reflect.sinkValue[" "] = function() {
|
|
};
|
|
goog.reflect.canAccessProperty = function(obj, prop) {
|
|
try {
|
|
goog.reflect.sinkValue(obj[prop]);
|
|
return true;
|
|
} catch (e) {
|
|
}
|
|
return false;
|
|
};
|
|
goog.reflect.cache = function(cacheObj, key, valueFn, opt_keyFn) {
|
|
const storedKey = opt_keyFn ? opt_keyFn(key) : key;
|
|
if (Object.prototype.hasOwnProperty.call(cacheObj, storedKey)) {
|
|
return cacheObj[storedKey];
|
|
}
|
|
return cacheObj[storedKey] = valueFn(key);
|
|
};
|
|
|
|
//# sourceMappingURL=goog.reflect.reflect.js.map
|