UNPKG

react-native-webview-comlink

Version:

Add JavaScript interface for react-native-webview, based on Comlink

10 lines (9 loc) 238 B
export function createLogger(log) { if (!log) { return () => { }; } const logger = typeof log === 'function' ? log : (msg) => console.log(msg); return (msg) => { logger(`[WebViewComlink] ${msg}`); }; }