Type-guard for DerivedRecord
Install
npm install @strong-roots-capital/is-derived-record
Use
import isDerivedRecord from '@strong-roots-capital/is-derived-record'
const object = fetchMysteryObject()
if (isDerivedRecord(object)) {
console.log(object.Close) // ok
} else {
console.log(object.Close) // potential error!
}