2.0.2 • Published 8 years ago

scoped-warning v2.0.2

Weekly downloads
4
License
MIT
Repository
github
Last release
8 years ago

scoped-warning

A version of React's warning() function that adds a "scope" to warnsings. As with the original, setting NODE_ENV to "production" sets the warning to a noop, eliminating them completely.

var scopedWarning = require('scoped-warning')

var pathWarning = scopedWarning('path')

pathInvariant(false, "failed!") // warns '[path] Invariant Violation: failed!'

scopedWarning('my-module')(false, "failed!") // warns '[my-module] Invariant Violation: failed!'
2.0.2

8 years ago

2.0.1

8 years ago

2.0.0

8 years ago

1.0.0

9 years ago