[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Bug#802595: ITP: node-defined -- return the first argument that is `!== undefined`



On 10/23/2015 04:21 PM, Thorsten Glaser wrote:
On Fri, 23 Oct 2015, Steve McIntyre wrote:

separate library for a single function as trivial as:

     for (var i = 0; i < arguments.length; i++) {
         if (arguments[i] !== undefined) return arguments[i];
     }

Yes, by all means if you're using it a lot. But a separate library
with its own docs and test suite and everything? No, that's a joke.

Look at it like this: the language is so hard to get things
right in that libraries like this are necessary…

Sorry - I've been ill. Actually, it is depended on by approx 120 packages in npm, otherwise I would have just bundled it with tape.


Reply to: