UNPKG

refql

Version:

A Node.js and Deno library for composing and running SQL queries.

11 lines (10 loc) 398 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); const isFirstKey = (standardProps) => (obj, key) => { const nonNullKeys = Object.keys(obj).filter(k => { const standardProp = standardProps.find(sp => sp.as === k); return obj[k] !== undefined && standardProp != null; }).sort(); return key === nonNullKeys[0]; }; exports.default = isFirstKey;