Initial commit
This commit is contained in:
17
node_modules/motion-utils/lib/errors.js
generated
vendored
Normal file
17
node_modules/motion-utils/lib/errors.js
generated
vendored
Normal file
@ -0,0 +1,17 @@
|
||||
import { noop } from "./noop";
|
||||
let warning = noop;
|
||||
let invariant = noop;
|
||||
if (process.env.NODE_ENV !== "production") {
|
||||
warning = (check, message) => {
|
||||
if (!check && typeof console !== "undefined") {
|
||||
console.warn(message);
|
||||
}
|
||||
};
|
||||
invariant = (check, message) => {
|
||||
if (!check) {
|
||||
throw new Error(message);
|
||||
}
|
||||
};
|
||||
}
|
||||
export { warning, invariant };
|
||||
//# sourceMappingURL=errors.js.map
|
||||
Reference in New Issue
Block a user