lib/task.js
function Task(task) {
  _.extend(this, task);
  if (task != undefined) this.createId();

  // Short id
  this.__defineGetter__('id', function () {
    return this.__uuid__.substr(0, 8).toString();
  });

  // Keyword
  this.__defineGetter__('keyword', function () {
    return this.labels[0].replace('#', '').toUpperCase();
  });

  // Stemmed
  this.__defineGetter__('stemmed', function () {
    return (this.title+' '+this.body).toLowerCase()
      .split(' ').map(stem).join(' ');
  });

  // All
  this.__defineGetter__('all', function () {
    return '*';
  });
}
function Task(task) {
  _.extend(this, task);
  if (task != undefined) this.createId();

  // Short id
  this.__defineGetter__('id', function () {
    return this.__uuid__.substr(0, 8).toString();
  });

  // Keyword
  this.__defineGetter__('keyword', function () {
    return this.labels[0].replace('#', '').toUpperCase();
  });

  // Stemmed
  this.__defineGetter__('stemmed', function () {
    return (this.title+' '+this.body).toLowerCase()
      .split(' ').map(stem).join(' ');
  });

  // All
  this.__defineGetter__('all', function () {
    return '*';
  });
}
function Task ( task ) { _ . extend ( this , task ) ; if ( task != undefined ) this . createId ( ) ; // Short id this . __defineGetter__ ( 'id' , function ( ) { return this . __uuid__ . substr ( 0 , 8 ) . toString ( ) ; } ) ; // Keyword this . __defineGetter__ ( 'keyword' , function ( ) { return this . labels [ 0 ] . replace ( '#' , '' ) . toUpperCase ( ) ; } ) ; // Stemmed this . __defineGetter__ ( 'stemmed' , function ( ) { return ( this . title + ' ' + this . body ) . toLowerCase ( ) . split ( ' ' ) . map ( stem ) . join ( ' ' ) ; } ) ; // All this . __defineGetter__ ( 'all' , function ( ) { return '*' ; } ) ; }
Task
Model used by Barricane
Task Model used by Barricane