Group, I am trying to figure out why slice appears to be slower when executed upon a large string than merely pointing to a group of indexes. My presumption...
1465
Marcel Duran
marcelduran
Sep 4, 2010 1:02 am
For those who haven't seen already: http://closuretools.blogspot.com/2010/08/introducing-closure-linter.html ...
1466
Marcel Duran
marcelduran
Sep 4, 2010 1:17 am
Hi Austin, It's hard to tell why it's slower/faster without checking the algorithm implemented for slice on different engines. I did some background research ...
1467
Cheney, Edward A SSG ...
sandyhead25
Sep 4, 2010 2:59 am
Marcel, I did consider those. The limitation of indexOf method is that it can only be used once without altering your source data, and regular expression...
1468
AlexDMiller
Sep 4, 2010 3:40 am
Hello JavaScript enthusiasts, I'm the organizer of the Strange Loop conference in St. Louis. This year's conference will contain a number of interesting...
1469
Marcel Duran
marcelduran
Sep 5, 2010 5:46 am
What if you use regular expression with String.replace, you have a list of index plus you can alter the source data. Ex: var re = /<style/gi, str =...
1470
sandyhead25
Sep 5, 2010 12:51 pm
Marcel, String replace would certainly be faster, because such instructions pass to the same code base on which the JavaScript interpreter sits. String...
1471
Douglas Crockford
douglascrock...
Sep 9, 2010 1:12 am
JSLint now warns about arguments.callee and arguments.caller. These will not be available in future editions of the language, so it is best to start avoiding...
1472
IceBox
santini.alberto
Sep 9, 2010 6:52 am
JSLint doesn't report any error, because "foos" is considered global. Any suggestion to avoid that error? Thanks in advance, Alberto ... "use strict"; function...
1473
IceBox
santini.alberto
Sep 9, 2010 6:56 am
... Typo in the typo... :) I mean "foo" is considered global. Regards, Alberto...
1474
Cheney, Edward A SSG ...
sandyhead25
Sep 9, 2010 11:03 pm
Icebox, You cannot avoid having at least one global variable name. The only way a variable stops being global is from containment by a function, but at some...
1475
Rob Richardson
erobrich@...
Sep 10, 2010 2:56 pm
It seems effective to identify if a variable is defined as a function (either var f = function () {... or function f() {...) or not and whine if it switches or...
1476
Cheney, Edward A SSG ...
sandyhead25
Sep 10, 2010 5:55 pm
Rob, What is the problem if a function changes its method of definition? I do understand that there is a difference between the method of declaring a function...
1477
Rob Richardson
erobrich@...
Sep 10, 2010 6:44 pm
I think I wasn't adequately clear previously. If a variable whose value is a function changes value to a non-function such as number or string or object, I...
1478
Mike West
mikewest_y
Sep 11, 2010 10:36 am
... I don't foresee browser makers removing the functionality, especially given it's prevalence in libraries that emulate some form of classical inheritance...
1479
Dominic Mitchell
happygiraffe...
Sep 13, 2010 9:09 am
Hi all! I've released an update to my jslint wrapper, jslint4java. This release is just a bug fix, plus an update to the latest version of JSLint. For full...
1480
douglas@...
douglascrock...
Sep 13, 2010 9:12 am
ES5/Strict requires browsers to disable callee and caller. Future editions will be based on ES5/Strict....
1481
Michael S. Mikowski
z_mikowski
Sep 14, 2010 6:38 am
FWIW, here's my $0.02: Porting style from Conway's PBP, breaking before every operator and using K&R style indenting makes for very readable JS code IMO. var...
1482
Michael S. Mikowski
z_mikowski
Sep 14, 2010 7:03 am
Hi Mark: ... I agree. That's a cure almost worse than the disease. So I do turn off strict white space, as implied in an unrelated jslint response I just...
1483
douglas@...
douglascrock...
Sep 15, 2010 12:06 am
JSLint now considers function statements to produce something that is more const than var. That means that you will get a warning for attempting change the...
1484
douglas@...
douglascrock...
Sep 16, 2010 8:54 pm
JSLint is now doing more checking of strict mode code. Use of strict mode is highly recommended, but do not use strict mode unless you fully understand what it...
1485
Sean Kelly
seank_com
Sep 17, 2010 4:44 am
I'm new to this list so this may have been answered before but aside from reading the source code to JSLint (thanks BTW), how do we go about understanding...
1486
Cheney, Edward A SSG ...
sandyhead25
Sep 17, 2010 7:43 am
Where does the "use strict" declaration go? Does it go at the top of a JavaScript file, or at the top of a function, or both, or somewhere else? Thanks, ...
1487
Dominic Mitchell
happygiraffe...
Sep 17, 2010 8:23 am
On Fri, Sep 17, 2010 at 8:43 AM, Cheney, Edward A SSG RES USAR < ... It must be the very first statement in a file. I'm sure that jslint will tell you this....
1488
Morgaut Alexandre Lou...
morgaut_a
Sep 17, 2010 8:45 am
It may also be at set as the first line of a JavaScript function so even if the rest of the code (after concatenation or loaded from other <script> tags)...
1489
abyssoft@...
abyssoft...
Sep 17, 2010 5:52 pm
Ignoring newcap setting. acting as always true....
1490
Harry Whitfield
harry152566
Sep 17, 2010 6:42 pm
The newcap setting is working correctly in the 2010-09-16 edition that I am using in Widget Tester. I download the file from http://www.JSLint.com/jslint.js ....
1491
Harry Whitfield
harry152566
Sep 17, 2010 7:44 pm
I've also tested the newcap option on the web version at http://www.JSLint.com/ . That is also working correctly. Harry....
1492
abyssoft@...
abyssoft...
Sep 17, 2010 8:09 pm
@harry152566, I'm using the Web version one too and yes I've cleared my cache and newcap is even when manually set to false. Just tested it again and I'm...
1493
douglas@...
douglascrock...
Sep 17, 2010 8:39 pm
If JSLint sees "use strict"; then it turns on option.newcap for you....