X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=node_modules%2Fgrunt-uncss%2Fnode_modules%2Fasync%2Finternal%2FconsoleFunc.js;fp=node_modules%2Fgrunt-uncss%2Fnode_modules%2Fasync%2Finternal%2FconsoleFunc.js;h=0f716f7b752ae9d26f45113e3553e593e3b9f3ab;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hp=0000000000000000000000000000000000000000;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad;p=yaffs-website diff --git a/node_modules/grunt-uncss/node_modules/async/internal/consoleFunc.js b/node_modules/grunt-uncss/node_modules/async/internal/consoleFunc.js new file mode 100644 index 000000000..0f716f7b7 --- /dev/null +++ b/node_modules/grunt-uncss/node_modules/async/internal/consoleFunc.js @@ -0,0 +1,35 @@ +'use strict'; + +Object.defineProperty(exports, "__esModule", { + value: true +}); +exports.default = consoleFunc; + +var _arrayEach = require('lodash/_arrayEach'); + +var _arrayEach2 = _interopRequireDefault(_arrayEach); + +var _rest = require('./rest'); + +var _rest2 = _interopRequireDefault(_rest); + +function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } + +function consoleFunc(name) { + return (0, _rest2.default)(function (fn, args) { + fn.apply(null, args.concat((0, _rest2.default)(function (err, args) { + if (typeof console === 'object') { + if (err) { + if (console.error) { + console.error(err); + } + } else if (console[name]) { + (0, _arrayEach2.default)(args, function (x) { + console[name](x); + }); + } + } + }))); + }); +} +module.exports = exports['default']; \ No newline at end of file