@0ria/addlogging 中文文档教程
Espree-Logging module
一个为作业创建的小型库,它有一些方法可以添加 console.log() ,在 nodejs 中输入时显示函数的名称和一些信息。
Instalation
npm install @0ria/addlogging --save
Usage
let espreelog = require('@0ria/addlogging');
const input = `
let result = function foo(a, b) {
let x = 'blah';
}
foo(1, 'wut', 3);
`;
const output = espreelog.addLogging(input);
console.log(`input:\n${input}\n---`);
console.log(`output:\n${output}\n---`);
Tests
npm test
Contributing
代替正式的风格指南,注意维护现有的编码风格。 为任何新的或更改的功能添加单元测试。 Lint 并测试您的代码。
Release History
- 0.1.0 Initial release
Espree-Logging module
A small library created for an assignment that has some methods to add a console.log() showing the name and some info about a function when entering to it in nodejs.
Instalation
npm install @0ria/addlogging --save
Usage
let espreelog = require('@0ria/addlogging');
const input = `
let result = function foo(a, b) {
let x = 'blah';
}
foo(1, 'wut', 3);
`;
const output = espreelog.addLogging(input);
console.log(`input:\n${input}\n---`);
console.log(`output:\n${output}\n---`);
Tests
npm test
Contributing
In lieu of a formal styleguide, take care to maintain the existing coding style. Add unit tests for any new or changed functionality. Lint and test your code.
Release History
- 0.1.0 Initial release
更多