Neverending Programming Mistakes

npm

Check out our latest tech talk, "JavaScript Supply Chain Security" presented by VP of Security, Adam Baldwin.Watch it here »

@strong-roots-capital/is-derived-record

1.0.0 • Public • Published

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

install

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

Downloadsweekly downloads

1

version

1.0.0

license

ISC

homepage

github.com

repository

Gitgithub

last publish

collaborators

  • avatar
  • avatar
Report a vulnerability