@strong-roots-capital/is-record
TypeScript icon, indicating that this package has built-in type declarations

1.0.5 • Public • Published

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

Package Sidebar

Install

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

Weekly Downloads

1

Version

1.0.5

License

ISC

Unpacked Size

4.94 kB

Total Files

4

Last publish

Collaborators

  • amchelle
  • hamroctopus