@x-ray/core
Version:
X-Ray Core
21 lines (16 loc) • 418 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.getMeta = void 0;
const getMeta = options => {
const [name, id] = options.query.id.split('::');
const result = options.results.get(options.pathsMap.get(name)).results.get(id);
if (result.type === 'OK') {
return null;
}
if (Reflect.has(result, 'meta')) {
return result.meta;
}
return null;
};
exports.getMeta = getMeta;