hey-listen

Warning and invariant dev-ex messaging.

MIT 9 个版本
安装
npm install hey-listen
yarn add hey-listen
pnpm add hey-listen
bun add hey-listen
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"
版本列表
1.0.8 2019-04-11
1.0.7 2019-04-10
1.0.6 2019-04-10
1.0.5 2018-05-16
1.0.4 2018-05-13
1.0.3 2018-05-13
1.0.2 2018-05-09
1.0.1 2018-05-09
1.0.0 2018-05-09