Extra functions on Arrays, Maps, etc..

2012-04-05 Thread Adam Shannon
?:\/\//).test(item.href) }); Or, var arr = document.querySelector(div) var divMap = arr.fold(new Map, function(acc, item) { acc.add(item.id, item); }); -- Adam Shannon Developer University of Northern Iowa Sophomore -- Computer Science B.S. Mathematics http://ashannon.us

Re: RegExps in array functions

2012-03-23 Thread Adam Shannon
,bAr].filter(/foo/i); For non-string members of the array, the current behavior of the RegExp.prototype.test method (ie. converting the value to a string) applies. Any reasons why this is a bad idea? (Or is it just my bad attitude? :D ) -- Adam Shannon Developer University of Northern Iowa

Re: RegExps in array functions

2012-03-23 Thread Adam Shannon
idea? (Or is it just my bad attitude? :D ) ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss -- Adam Shannon Developer University of Northern Iowa Sophomore -- Computer Science B.S. Mathematics http

Re: UUIDs?

2012-03-22 Thread Adam Shannon
@mozilla.org https://mail.mozilla.org/listinfo/es-discuss ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss -- Adam Shannon Developer University of Northern Iowa Sophomore -- Computer Science B.S

Re: set.delete method name

2012-02-28 Thread Adam Shannon
. Using a clear name that also happens not to run afoul of older browsers for shim purposes isn't caving to the past: it's being pragmatic about helping people adopt a new feature with very little cost. Yehuda Katz (ph) 718.877.1325 -- Adam Shannon Developer University of Northern Iowa

Re: set.delete method name

2012-02-28 Thread Adam Shannon
Phone From: Mark S. Miller Sent: 2/28/2012 11:54 AM To: Adam Shannon Cc: Yehuda Katz; es-discuss Subject: Re: set.delete method name I appreciate the feedback, but I do not understand the rationale. Is it just to avoid needing to say     map['delete'](key

Re: set.empty() method

2012-02-14 Thread Adam Shannon
() so it would also be familiar to many people. Perhaps deleteAll() would be more mnemonic, as its relationship with delete() would be obvious? On Tue, Feb 14, 2012 at 10:39 PM, Adam Shannon a...@ashannon.us wrote: I'd agree with using clear() and isEmpty() with their respective actions

Re: Set iterators

2012-02-13 Thread Adam Shannon
mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss -- Adam Shannon Developer University of Northern Iowa Sophomore -- Computer Science B.S. Mathematics http://ashannon.us ___ es-discuss mailing list es-discuss@mozilla.org

Re: Set iterators

2012-02-12 Thread Adam Shannon
___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss -- Adam Shannon Web Developer University of Northern Iowa Sophomore -- Computer Science B.S. Mathematics http://ashannon.us ___ es-discuss mailing list

Re: Array.range() (was: Suggestion: Array.prototype.repeat)

2012-01-03 Thread Adam Shannon
@mozilla.org https://mail.mozilla.org/listinfo/es-discuss -- Adam Shannon Web Developer University of Northern Iowa Sophomore -- Computer Science B.S. Mathematics http://ashannon.us ___ es-discuss mailing list es-discuss@mozilla.org https

Proposal: Signed variables

2012-01-03 Thread Adam Shannon
- = -12e7; var pos+ = 12e7; -- Adam Shannon Web Developer University of Northern Iowa Sophomore -- Computer Science B.S. Mathematics http://ashannon.us ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss

String.prototype.until

2012-01-02 Thread Adam Shannon
for ES.next. It could be defined as acting the same way as the following code: String.prototype.until = function (needle) { return this.substr(0, this.indexOf(needle)); } -- Adam Shannon Web Developer University of Northern Iowa Sophomore -- Computer Science B.S. Mathematics http://ashannon.us

Re: String.prototype.until

2012-01-02 Thread Adam Shannon
Company) On Mon, Jan 2, 2012 at 12:03 PM, Adam Shannon a...@ashannon.us wrote: Hello all, I recently ran into a situation where I would like to obtain a substring from the beginning until the first encounter with another substring. This promoted me to write a simple function, called until and I

Re: String.prototype.until

2012-01-02 Thread Adam Shannon
by the regular expression produced by re``. [1] http://wiki.ecmascript.org/doku.php?id=harmony:quasis [2] http://www.2ality.com/2011/09/quasi-literals.html On Jan 2, 2012, at 18:03 , Adam Shannon wrote: Hello all, I recently ran into a situation where I would like to obtain a substring from

Re: Suggestion: Array.prototype.repeat

2012-01-02 Thread Adam Shannon
A. Smith Web Developer True Action Network (an eBay company) ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss -- Adam Shannon Web Developer University of Northern Iowa Sophomore -- Computer Science

Re: Date.prototype.format

2011-05-27 Thread Adam Shannon
, doesn't that allow for more expressive power? -- John A. Tamplin Software Engineer (GWT), Google -- Marc (@wavded) ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss -- Adam Shannon Web

Re: A proposal to add String.prototype.format

2011-03-09 Thread Adam Shannon
-discuss ___ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss -- Adam Shannon UNI Freshman Web Developer ashannon.us ___ es-discuss mailing list es-discuss