adminjs
Version:
Admin panel for apps written in node.js
18 lines (15 loc) • 550 B
text/typescript
import { RecordJSON } from '../../interfaces/index.js'
const isEntireRecordGiven = (
propertyOrRecord: RecordJSON | string,
value?: string,
): boolean => !!(typeof value === 'undefined'
// user can pass property and omit value. This makes sense when
// third argument of the function (selectedRecord) is passed to onChange
// callback
&& !(typeof propertyOrRecord === 'string')
// we assume that only params has to be given
&& propertyOrRecord.params)
export {
isEntireRecordGiven as default,
isEntireRecordGiven,
}