# flash-console **Repository Path**: imdongrui/flash-console ## Basic Information - **Project Name**: flash-console - **Description**: 用于小工具的控制台内容滚动刷新 - **Primary Language**: NodeJS - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-06-08 - **Last Updated**: 2021-06-10 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # 介绍 用于小工程的控制台内容滚动刷新 # 使用方法 引入flash-console包 ```shell npm install flash-console ``` 代码中使用 ```javascript import flashConsole from 'flash-console' flashConsole.log('1') flashConsole.log('key', '2') flashConsole.log('1') flashConsole.log('key', '3') ``` 上述代码输出: ``` 1 3 1 ``` **注意:** - 调用log时,会执行console.clear()将当前控制台输出的内容清空,然后重新输出flashConsole中搜集到的日志,所以使用时应将所有输出内容都用flashConsole输出 - 因实现原理有性能忧虑,所以此工具仅适用于小工具,并不适合更大规模的工程