mafintosh / are-feross-and-mafintosh-stuck-in-an-elevator

Are @feross and @mafintosh stuck in an elevator?
MIT License
80 stars 7 forks source link

Version 2.0 will always return `false`; even if Feross and Mafintosh are indeed stuck in an elevator/lift #4

Open gausby opened 9 years ago

gausby commented 9 years ago

I have only tested this with simulation. My model of reality could very well differ from the real reality.

fnky commented 9 years ago

I think we'll need the NSA in on this.

stuartpb commented 9 years ago

What if only one of @feross or @mafintosh get stuck in an elevator? I feel the implementation behavior here is undefined.

feross commented 9 years ago

@stuartpb We'll need to make two new modules and refactor this module like this:

module.exports = function () {
  return require('is-feross-stuck-in-an-elevator')() && require('is-mafintosh-stuck-in-an-elevator')()
}
fnky commented 9 years ago

What if the elevator gets stuck in @feross and/or @mafintosh? Need more clarification

jbenet commented 9 years ago

@feross i don't know, maybe we can abstract it out:

return require('is-entity-stuck-in-entity')(people['feross'], transports['elevator']) && require('is-entity-stuck-in-entity')(people['mafintosh'], transports['elevator'])

though maybe it really could be even more general:

require('is-entity-condition-qualifier-entity')(f, 'stuck', 'in', m) 
fnky commented 9 years ago

@jbenet I like the second approach as it is more generic. Would it return a Boolean?

jbenet commented 9 years ago

@fnky not flexible enough. maybe a function() { return Boolean(true) }

fnky commented 9 years ago

@jbenet I meant you should be able to set the conditions for when an entity is stuck or not.