You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

task.js 238B

12345678910111213141516
  1. 'use strict';
  2. function task(name, fn) {
  3. if (typeof name === 'function') {
  4. fn = name;
  5. name = fn.displayName || fn.name;
  6. }
  7. if (!fn) {
  8. return this._getTask(name);
  9. }
  10. this._setTask(name, fn);
  11. }
  12. module.exports = task;