13 lines
309 B
JavaScript
13 lines
309 B
JavaScript
import { getItem } from "./storage";
|
|
|
|
export default function logger(sink) {
|
|
return (...args) => {
|
|
if (getItem(`log:${sink}`)) {
|
|
console.log(
|
|
`%c[${sink}]`,
|
|
"color: #8f3f71; font-weight: bold;",
|
|
...args
|
|
);
|
|
}
|
|
};
|
|
}
|