JSPM

@strong-roots-capital/is-record

1.0.5
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • 0
  • Score
    100M100P100Q20097F
  • License ISC

Type-guard for Record

Package Exports

  • @strong-roots-capital/is-record

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@strong-roots-capital/is-record) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

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