* Provides open-source compatible instrumentation for monitoring certain API * uses before we're ready to issue a warning or refactor. It accepts an event * name which may only contain the characters [a-z0-9_] and an optional data * object with further information.
(eventName, data)
| 14194 | */ |
| 14195 | |
| 14196 | function monitorCodeUse(eventName, data) { |
| 14197 | ("production" !== process.env.NODE_ENV ? invariant( |
| 14198 | eventName && !/[^a-z0-9_]/.test(eventName), |
| 14199 | 'You must provide an eventName using only the characters [a-z0-9_]' |
| 14200 | ) : invariant(eventName && !/[^a-z0-9_]/.test(eventName))); |
| 14201 | } |
| 14202 | |
| 14203 | module.exports = monitorCodeUse; |
| 14204 |
no test coverage detected