Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 16x 16x 16x 64x 16x 54x 20x 16x | /** * The helper function that returns an array of common schema * from two fieldStore instances. * * @param {FieldStore} fs1 - The first FieldStore instance. * @param {FieldStore} fs2 - The second FieldStore instance. * @return {Array} An array containing the common schema. */ export function getCommonSchema (fs1, fs2) { const retArr = []; const fs1Arr = []; fs1.fields.forEach((field) => { fs1Arr.push(field.schema.name); }); fs2.fields.forEach((field) => { if (fs1Arr.indexOf(field.schema.name) !== -1) { retArr.push(field.schema.name); } }); return retArr; } |