Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

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

Awesome Lists containing this project

README

        


语言:
中文
English

Output-Line


执行node程序时,控制台中输出console行号


Version
dev
MIT License

## 安装

```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' })
```