mirror of
https://github.com/expo/react-native-maps.git
synced 2026-11-15 09:18:08 -10:00
25 lines
580 B
JavaScript
25 lines
580 B
JavaScript
export default (...tags) => {
|
|
if (__DEV__) {
|
|
const tag = `${tags.join(' -> ')} ->`;
|
|
const warn = console.warn.bind(this, tag);
|
|
return {
|
|
log: console.log.bind(this, tag),
|
|
warn,
|
|
error: console.error.bind(this, tag),
|
|
unsupported: props => {
|
|
const keys = Object.entries(props)
|
|
.filter(([, value]) => value != null)
|
|
.map(([key]) => key);
|
|
for (const key of keys) warn(`Prop \`${key}\` is not supported`);
|
|
},
|
|
};
|
|
}
|
|
|
|
return {
|
|
log() {},
|
|
warn() {},
|
|
error() {},
|
|
unsupported() {},
|
|
};
|
|
};
|