On Saturday 2013-03-02 10:34 -0800, Norbert Lindenberg wrote:
> I think a better solution would be API that either lets you easily
> generate a series of Date instances representing midnight (of
> every day, of every Monday, of every first day of the month, ...)
> in a specified time zone and calen
On Saturday 2013-03-02 10:50 -0800, Norbert Lindenberg wrote:
> On Mar 2, 2013, at 8:46 , Mark Davis ? wrote:
> > The TZDB has the equivalence class {Asia/Calcutta Asia/Kolkata}. They used
> > to have the former as the canonical name (in Zone), but then changed it to
> > the latter. Here is the c
I didn't forget in the post, neither is necessary here, I put in the post
to deal with an integer but that's superflous for the purpose so no mistake
(we all know arr["1"] is gonna be handled as arr[1], as example)
Anyway, RegExp.$N is just fine and standard across all engines I know and
RegExp#te
On Sun, Mar 3, 2013 at 12:45 PM, David Bruant wrote:
> [2, 8, 7].forEach(function(e){
> if(e === 8)
> throw StopIteration;
This would be taking a piece of one low-level protocol, and using it for a
sorta-kinda related thing that actually, on closer inspection
On 03/04/2013 08:38 AM, Andrea Giammarchi wrote:
> I believe creating a redundant array of matches for no reason since these are
> retrievable in any case through the RegExp constructor, considering exec and
> match points to those RegExp properties anyhow, ain't needed when
> re.test(value) is
Le 4 mars 2013 à 23:37, Claude Pache a écrit :
> The Set constructor accepts an iterable (including an Array and a Set) as an
> argument to populate the newly-constructed Set with several values. There
> should also be the possibility to add or remove multiple elements of an
> already-constr
Thanks a lot.
On find(), I believe it will always be ambiguous, compared to findIndex,
for the simple reason that an Array could contain undefined too [1,
undefined, 2] ... probably an edge case not worth the consideration, but
this looks like a legit code to me:
[1, undefined, 2].find(function (
The Set constructor accepts an iterable (including an Array and a Set) as an
argument to populate the newly-constructed Set with several values. There
should also be the possibility to add or remove multiple elements of an
already-constructed Set. That covers unions and differences, but it is mo
One idea we've discussed: allow the sentinel that is OOB with respect to
the domain (element type) be an optional second parameter:
const K = Symbol("not found");
console.log( [1, 2, 3].find(x => isNaN(x), K) ); // K, logs as "not
found"
console.log( [1, 2, , 3].find(x => isNaN(x)) ); /
From: es-discuss-boun...@mozilla.org [es-discuss-boun...@mozilla.org] on behalf
of Rick Waldron [waldron.r...@gmail.com]
> Thanks, I've submitted an agenda item that includes _both_ find and findIndex.
Awesome!
One issue with `find` is what distinguishes
find([1, 2, 3], x => isNaN(x)); //
On Mon, Mar 4, 2013 at 2:37 PM, Andrea Giammarchi <
andrea.giammar...@gmail.com> wrote:
> this is what 've wrote as prototype at the end of the post. findIndex
> makes sense to me and is better, in term of manipulation, than finding just
> an element.
>
> (function(AP){
> AP.findIndex || (
> AP.
this is what 've wrote as prototype at the end of the post. findIndex makes
sense to me and is better, in term of manipulation, than finding just an
element.
(function(AP){
AP.findIndex || (
AP.findIndex = function(fn, self) {
var $i = -1;
AP.some.call(this, function(v, i, a) {
if
On Mon, Mar 4, 2013 at 11:29 AM, Jeff Walden wrote:
> On 03/03/2013 06:49 PM, Rick Waldron wrote:
> > Is this +1 to findIndex?
>
> Not that I much care between the two, just making sure another reasonable
> name is considered, but I'm not sure why it wouldn't be named "find" rather
> than "findIn
On Mon, Mar 4, 2013 at 10:08 AM, wrote:
> It would be useful to be able to form the intersection and the union of
> two Sets. These are natural operations that are currently not part of
> the API
> (http://wiki.ecmascript.org/doku.php?id=harmony:simple_maps_and_sets).
>
> Similar methods would ma
* Jeff Walden wrote:
>On 03/03/2013 06:49 PM, Rick Waldron wrote:
>> Is this +1 to findIndex?
>
>Not that I much care between the two, just making sure another
>reasonable name is considered, but I'm not sure why it wouldn't be named
>"find" rather than "findIndex". The index seems like the onl
It would be useful to be able to form the intersection and the union of
two Sets. These are natural operations that are currently not part of
the API
(http://wiki.ecmascript.org/doku.php?id=harmony:simple_maps_and_sets).
Similar methods would make sense for Map, but one would have to think
about
> I still think the stability issue should be addressed in the IANA time zone
> database itself, not by adopting a IANA-derived alternate registry. Has that
> been tried?
I agree, we should be chatting with the IANA folks.
-Shawn
___
es-discuss mail
My proposed fallback was the English name. Granted that isn't always very
readable, however my point was that using UTC-XX isn't just potentially hard to
read, but it's also wrong.
I don't mind standardizing the fallback behavior, or recommending fallback
behavior, I don't want misleading fall
" that does not find a thing, that find an index" I meant that simply store
once the index without needing an outer scope access and variable inside
the closure
On Mon, Mar 4, 2013 at 8:38 AM, Andrea Giammarchi <
andrea.giammar...@gmail.com> wrote:
> I use RegExp.$1 , RegExp.$2, etc quite a lot
I use RegExp.$1 , RegExp.$2, etc quite a lot since I am a huge fan of the
RAM and I believe creating a redundant array of matches for no reason since
these are retrievable in any case through the RegExp constructor,
considering exec and match points to those RegExp properties anyhow, ain't
needed w
On 03/03/2013 06:49 PM, Rick Waldron wrote:
> Is this +1 to findIndex?
Not that I much care between the two, just making sure another reasonable name
is considered, but I'm not sure why it wouldn't be named "find" rather than
"findIndex". The index seems like the only bit you'd reasonably be l
On 03/03/2013 06:53 PM, Andrea Giammarchi wrote:
> I had to check msdn rather than MDN since latter does not mention it while
> mans shows an example:
> http://msdn.microsoft.com/en-us/library/ie/3k9c4a32(v=vs.94).aspx
The RegExp statics aren't mentioned because they're a bad idea, imposing cost
22 matches
Mail list logo