Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/lete114/output-line
When executing a node program, the console outputs the console line number
https://github.com/lete114/output-line
console filepath javascript line nodejs
Last synced: 14 days ago
JSON representation
When executing a node program, the console outputs the console line number
- Host: GitHub
- URL: https://github.com/lete114/output-line
- Owner: Lete114
- License: mit
- Created: 2022-02-18T11:23:42.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-03-08T15:44:37.000Z (over 2 years ago)
- Last Synced: 2024-10-30T05:27:13.750Z (14 days ago)
- Topics: console, filepath, javascript, line, nodejs
- Language: JavaScript
- Homepage:
- Size: 13.7 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Output-Line
执行node程序时,控制台中输出console行号
## 安装
```bash
npm install output-line --save
```## 快速开始
```js
/*
┌────────────┬────────────┬────────────┐
│ property │ default │ type │
├────────────┼────────────┼────────────┤
│ methods │ Console │ Array │
│ prefix │ '🐞' │ String │
│ isRelative │ false │ Boolean │
└────────────┴────────────┴────────────┘
*/// 使用默认参数
// require('output-line')()// 自定义参数
const options = {
methods: ['debug', 'log', 'warn', 'error'],
prefix: '🐸',
isRelative: true
}
require('output-line')(options)console.log('%s %d', 'age', 18)
console.log({ f: 'foo', b: 'bar' })
```