Skip to content

a "fluent-setter" #10

@matthewmueller

Description

@matthewmueller

Running into this nice-to-have. When setting, it's fluent, when getting, it's a getter.

function Queue() {
  this.state = {
    concurrency: 1,
    timeout: false
  }
}

delegate(Queue, 'state')
   .fluent('concurrency')
   .fluent('timeout')

Queue.prototype.run = function() {
  var concurrency = this.concurrency // [Function] oh noz. 
}

Not sure of a name :-/

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions