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

strong-roots-capital/is-record

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

is-record Build status npm version codecov

Type-guard for Record

Install

npm install @strong-roots-capital/is-record

Use

import isRecord from '@strong-roots-capital/is-record'

const object = fetchMysteryObject()
if (isRecord(object)) {
    console.log(object.Volume) // ok
} else {
    console.log(object.Volume) // potential error!
}

Related