Skip to content
This repository has been archived by the owner on Dec 30, 2023. It is now read-only.

strong-roots-capital/is-derived-record

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

is-derived-record Build status npm version codecov

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!
}

Related