Promise.allSettled() - why string?

2020-04-17 Thread Felipe Gasper
he problem in my code. Was this pattern perhaps considered and rejected? Or is there some liability to the object methods relative to the string comparison that I’m not seeing? If so, what was/is the rationale there? Thank you for your time!

Re: Promises: unhandled rejections and finally()

2020-03-28 Thread Felipe Gasper
> its rejection isn't uncaught, but now both `one` and `two` have no handlers, > so _both_ will trigger an uncaught rejection error. > > 4) > ``` > var p = Promise.reject(789); > var one = p.finally(() => {}); > var two = p.finally(() => {}); > var three = p.finally(()

Promises: unhandled rejections and finally()

2020-03-28 Thread Felipe Gasper
2nd and subsequent ones trigger their own unhandled-rejection warnings. Thank you! cheers, -Felipe Gasper ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: RegExp lookbehind

2012-03-16 Thread Felipe Gasper
Bump++. :) -F On 3/16/12 3:56 PM, Lea Verou wrote: After all these years, ES regular expressions still don't support lookbehind. It turns out this was discussed in late 2010 [1] and was heading towards being accepted, but the discussion just stalled. So, consider this a bump of that thread.

for..in, hasOwnProperty(), and inheritance

2011-11-08 Thread Felipe Gasper
, but will allow iteration through inherited properties. This seems to me far more useful in general than the hasOwnProperty() check. Thoughts? -Felipe Gasper cPanel, Inc. ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es

Re: for..in, hasOwnProperty(), and inheritance

2011-11-08 Thread Felipe Gasper
On 11/8/11 12:37 PM, Axel Rauschmayer wrote: What’s the use case? I thought I gave a pretty reasonable one before, but just in case: In YUI, it’s impossible to use this otherwise-useful pattern: - var base_config = { width: 600px }; … var my_config = Object.create(base_config);

Re: for..in, hasOwnProperty(), and inheritance

2011-11-08 Thread Felipe Gasper
On 11/8/11 1:17 PM, Axel Rauschmayer wrote: What’s the use case? In YUI, it’s impossible to use this otherwise-useful pattern: - var base_config = { width: 600px }; … var my_config = Object.create(base_config); my_config.visible = false; var widget = new Y.Widget(my_config); -

Re: for..in, hasOwnProperty(), and inheritance

2011-11-08 Thread Felipe Gasper
On 11/8/11 2:19 PM, Jake Verbaten wrote: Flexibility of shared state? Are you really corrupting the state of defaults at runtime? Do you really want changes to your default options to propogate to all objects extending the defaults? It’s the same thing as redefining a method inherited from a

Re: for own(...) loop (spin-off from Re: for..in, hasOwnProperty(), and inheritance)

2011-11-08 Thread Felipe Gasper
On 11/8/11 2:49 PM, Brendan Eich wrote: Should ES.next provide sugar for the recommended pattern? To make it compose with declarations and destructuring in the for head, it should use a contextual keyword immediately after 'for': for own (i in o) { /body/ } This is a small thing but it might

Re: for..in, hasOwnProperty(), and inheritance

2011-11-08 Thread Felipe Gasper
On 11/8/11 2:19 PM, Brendan Eich wrote: On Nov 8, 2011, at 12:12 PM, Luke Smith wrote: Sure. People make classes by defining function C(){} and decorating C.prototype.method1 = function(...){...}, etc. A for-in loop on (new C) will see all the methods, unlike the case with built-in

Re: Are some es-discuss submissions automatically blocked?

2011-11-07 Thread Felipe Gasper
On 11/7/11 2:48 PM, David Bruant wrote: Le 06/11/2011 15:37, Axel Rauschmayer a écrit : Claus Reinke could not submit his js-tools discussion group announcement (interestingly, I could do it for him). And the email I appended underneath my signature never got through. Can someone explain the

Re: sort keys with JSON.stringify()

2011-09-12 Thread Felipe Gasper
On 9/12/11 10:07 AM, Brian Kardell wrote: But Doug, just to clarify: You mean that the parsed objects create no predictable insertion order right? It is actually possible to use replacer to serialize keys in a particular order, and that might be enough for what he is looking for (if two

Re: sort keys with JSON.stringify()

2011-09-11 Thread Felipe Gasper
On 9/11/11 5:05 PM, Douglas Crockford wrote: On 11:59 AM, Felipe Gasper wrote: Is it possible to get sorted keys: {a:1,c:3} …from running JSON.stringify when declaring an object thus: {c:3,a:1} JSON objects are unordered. If order is important, then use an array. That’s actually my point

sort keys with JSON.stringify()

2011-09-10 Thread Felipe Gasper
Hello, Is it possible to get sorted keys: {a:1,c:3} …from running JSON.stringify when declaring an object thus: {c:3,a:1} ?? -FG ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: sort keys with JSON.stringify()

2011-09-10 Thread Felipe Gasper
().forEach(function(name) { ret[name] = obj[name] }) return ret } before passing it to JSON.stringify On Sat, Sep 10, 2011 at 9:14 PM, Felipe Gasper fel...@felipegasper.com mailto:fel...@felipegasper.com wrote: Hello, Is it possible to get sorted keys: {a:1,c:3

Object.keys(): Why no inherited properties?

2011-09-07 Thread Felipe Gasper
Why does Object.keys() not allow, as an option, iterating through inherited properties? -FG ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

Re: Object.allKeys? WAS Re: Object.keys(): Why no inherited properties?

2011-09-07 Thread Felipe Gasper
On 9/7/11 11:17 AM, David Bruant wrote: Le 07/09/2011 18:11, Felipe Gasper a écrit : On 9/7/11 11:08 AM, David Bruant wrote: Le 07/09/2011 17:33, Felipe Gasper a écrit : Why does Object.keys() not allow, as an option, iterating through inherited properties? I do not have the answer

Re: String.prototype.repeat

2011-01-09 Thread Felipe Gasper
On 1/9/11 6:02 AM, Jorge wrote: Or perhaps to overload * ? 'a' * 5 - a Perl has the “x” operator for things like that... -FG ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

substitutes for arguments and arguments.callee in ECMAScript 5

2011-01-05 Thread Felipe Gasper
Hi all, I read with dismay about the deprecation of arguments.callee in ECMAScript 5. I can appreciate the security concerns of passing the arguments object as a parameter to another method, but why not make that the “red flag” action rather than nixing “arguments” entirely? e.g. this