@imbricate/core
Version:
Imbricate Core, Notebook for Engineers
21 lines (20 loc) • 558 B
JavaScript
;
/**
* @author WMXPY
* @namespace Document_Property
* @description Primary
*/
Object.defineProperty(exports, "__esModule", { value: true });
exports.findPrimaryProperty = void 0;
const findPrimaryProperty = (schema, properties) => {
for (const property of schema.properties) {
if (property.isPrimaryKey) {
const value = properties[property.propertyIdentifier];
if (value) {
return value;
}
}
}
return null;
};
exports.findPrimaryProperty = findPrimaryProperty;