UNPKG

apollo-client-cors-hack

Version:

A simple yet functional GraphQL client.

21 lines 551 B
import { isProduction, isTest } from './environment'; var haveWarned = Object.create({}); export function warnOnceInDevelopment(msg, type) { if (type === void 0) { type = 'warn'; } if (isProduction()) { return; } if (!haveWarned[msg]) { if (!isTest()) { haveWarned[msg] = true; } switch (type) { case 'error': console.error(msg); break; default: console.warn(msg); } } } //# sourceMappingURL=warnOnce.js.map