UNPKG

@imbricate/core

Version:

Imbricate Core, Notebook for Engineers

20 lines (19 loc) 541 B
"use strict"; /** * @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;