Download spectrum/api/test/utils/__mocks__/debug.js from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 284 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/api/test/utils/__mocks__/debug.js
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/spectrum/api/test/utils/__mocks__/debug.js
-
curl -L -o debug.js https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/spectrum/api/test/utils/__mocks__/debug.js
284 Bytes
| // @flow | |
| const loggers = {}; | |
| function makeLogger() { | |
| function logger(...args: any[]) { | |
| logger.log.push(args.join(' ')); | |
| } | |
| logger.log = []; | |
| return logger; | |
| } | |
| module.exports = (namespace: string) => { | |
| return (loggers[namespace] = loggers[namespace] || makeLogger()); | |
| }; | |