UNPKG

mora-scripts

Version:
40 lines (34 loc) 792 B
/** * @module libs/sys/warn * @createdAt 2016-07-14 * * @copyright Copyright (c) 2016 Zhonglei Qiu * @license Licensed under the MIT license. */ var util = require('util') var data = require('./_data') function format() { return data.warn + util.format.apply(util, arguments) + data.end } /** * 输出黄色的字符串 * * 函数参数和 util.format 一样 * * @author Zhonglei Qiu * @since 2.0.0 */ module.exports = function() { console.log(format.apply(null, arguments)) } /** * 返回黄色的字符串 * * 函数参数和 util.format 一样 * * @type {Function} * * @author Zhonglei Qiu * @since 2.0.0 */ module.exports.format = format // /* istanbul ignore next */ // if (!module.parent) console.log(format.apply(null, process.argv.slice(2)))