Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

hey-listen

Popmotion5.5mMIT1.0.8TypeScript support: included

Warning and invariant dev-ex messaging.

warning, invariant

readme

Hey, Listen!

Dev-ex warning functions with added childhood flashbacks

npm version npm downloads Twitter Follow Join the community on Spectrum

Hey, Listen! provides simple versions of the popular warning and invariant dev-experience functions.

The library checks against process.env.NODE_ENV to minify away messages in production.

Install

npm

npm install hey-listen

Yarn

yarn add hey-listen

Usage

warning

import { warning } from 'hey-listen';

warning(false, 'Warning message'); // console.warn "Warning message"

invariant

import { invariant } from 'hey-listen';

invariant(false, 'Error message'); // throws "Error message"

changelog

Changelog

Hey, Listen! adheres to Semantic Versioning.

[1.0.7] 2019-04-10

  • Moving destination folder from lib to dist.

[1.0.6] 2019-04-10

  • Removing "hey listen" messaging.

[1.0.5] 2018-05-16

  • Fixing Rollup config.

[1.0.3] 2018-05-13

  • Adding UMD bundles via Rollup

[1.0.2] 2018-05-09

  • Point to correct types

[1.0.1] 2018-05-09

  • Updating docs

[1.0.0] 2018-05-09

  • First release