Underscore.string browser support - javascript

Underscore.string seems to provide nice features for javascript string manipulation.
It seems to have all the good points:
license : MIT
dependencies : none, it is an extension for Underscore.js but it can be used as standalone, without underscore.js
weight (minified & gzipped): 4KB
community, contributors: 58 contributors on Github
history, contributions: since mid 2010 on Github, contributions seem rather stable although pretty quiet since 2014
Except one point for which I am missing info: the "browser support/compatibility". I am especially worried about older version of IE.
I could find some issues (who have been fixed) on Github for various browser versions, but I could not find any clear statement regarding the browser support:
https://github.com/epeli/underscore.string/pull/37
https://github.com/epeli/underscore.string/issues?q=IE8
https://github.com/epeli/underscore.string/issues/115
I also searched on StackOverflow & did some googling but no luck.
I assume there is no "official" support for browsers so if anyone has experience in using Underscore.string in a production environment where users are on old browsers (IE8+) that would be great.
EDIT:
I also added a question directly on Github to try to get an answer, I'll update this page if I hear anything from there. See https://github.com/epeli/underscore.string/issues/304

As pointed out by epeli on the issue I posted on the Github project: running the test suite on IE8 seems a good way to find out if this library is supported by IE8.
Hence I did so, and found out that the result was positive: IE8 is supported by Underscore.string javascript library.
See the result of my test below

Related

JavaScript module not working in Edge browser

I am having trouble with my JavaScript module in the Edge browser. In Chrome everything works perfectly. Since my users have both Edge and Chrome available to them, the application has to work in both.
I asked the question here earlier, but I failed to to provide enough code to reproduce the problem. I have now made this pen https://codepen.io/johannes1/pen/GRjBpxz, that works in Chrome but not in Edge.
In my header I have:
<script type="module" src="js/app.js"></script>
It is my understanding that ES6 modules work in Edge and chrome alike, so the mistake has to be mine, but I cannot find it. I am really stuck and would very much appreciate any insight.
Edge only supports ES6 modules in version 79 (Jan 2020) or newer.
Since Edge releases are tied to major updates to Windows 10, it is easy to get stuck on an old version.
In general I recommend that Windows users make it a point to check Windows Update for prompts to install upgrades to the OS, but that doesn't help much from the typical developer's point of view.
If you need to support old versions of Edge, then use Webpack (or one of its rivals like rollup) to bundle your modules instead of relying on browser support for them.

imagesloaded javascript library: what is the browser & device support?

imagesLoaded seems like the best solution (at the time of writing, Nov 2014) to detect whether an image is loaded or not.
I found that imagesLoaded library has the following characteristics:
license: MIT License
dependencies: none
weight (minified & gzipped) : 7kb minified (light!)
download builder (helps to cut weight) : no need, already tiny
on Github : YES
community & contributors : pretty big, 4000+ members, although only 13 contributors
history & contributions : stable as relatively old (since 2010) but still active project
All the above features point into the direction of a very high quality product. However, there is a couple of information I still cannot find explicitly mentioned nor on the official website imagesloaded.desandro.com, nor on the Github page github.com/desandro/imagesloaded:
what is the browser support?
what is the device support?
Even though I assume the answer to the 2nd question being obvious, I would appreciate a confirmation.
EDIT: I just remembered this answer mentioned it working on IE7+ https://stackoverflow.com/a/19959809/759452, further feedback is still welcome though
EDIT 2: I just found another source saying it does not support IE7, this time by the creator of the library himself, see message from "desandro on 30 Nov 2012" on github.com/desandro/imagesloaded/issues/16
It seems that imagesloaded is officially supported by IE8+.
See the answer from David DeSandro (the creator of the library) on https://github.com/desandro/imagesloaded/issues/168
Officially, imagesLoaded v3 does not support IE7 and below.
And also:
In my testing, it was successful in IE8, IE9, IE10, Chrome, Safari, and Firefox on desktop, and Mobile Safari for iOS.
Note: I will do some further testing & update this answer accordingly

Which Tools are there for Code Comparison or Side by Side Comparing? How to Find Bugs in Javascript?

Though 99% of the code on our site is the work of 1 programmer, recently for the first time (and probably last) a programmer was hired to work on our site, he was given remote access to log in via ftp.
Background: He is located in a continent unknown to us, speaks a mothertongue that I cannot guesse from the English mails, and works in ways that are bit different than ours. It seems, this common workflow in long distant small projects where the original programmer is essential to update/customise their code.
Problem: The genius writes like a hacker, good quality but very poorly documented, some bugs occuring here or there. Now we are stuck with almost brilliant code with some bugs. Its Javascript mainly.
Question: First of all 1. What ways/utilities/websites are there to find bugs in freshly delivered JavaScript code, when its difficult to understand parts of thes code to begin with? 2. What are good code comparison programs/utilities/websites sothat one can vew in parallel side by side comparison differences between two versions of code?
Obviously both are very related so hopefully there is one great tool on this planet that aims to combine bug finding as well as shows you the differences between versions.
Any suggestions are good answers to me as I have no clue where to start from here.
I agree with the posts above, Firebug for Firefox and Google Chrome/Chromium's Web Developer tools are great for most JavaScript debugging purposes. IE8 has an o-k set of Developer Tools. I'd only recommend using them if you're having issues in IE-only, otherwise, the previously mentioned tools will perform much, much better. If you really want to run the JavaScript through the error-checking and code-quality gauntlet, take a look at Douglas Crockford's JSLint.
It's also worth mentioning community-driven JSHint as a resource for testing JavaScript code. It's not as strict as JSLint and has better support for commonly-used JavaScript libraries.
The Windows applications listed above should work great for comparing files. If you're on OS X though, Kaleidoscope is a wonderful comparison app. It costs a little money, but it integrates very nicely with most versioning systems.
I agrre with #BiAiB, about the need for a code management/versioning tool - this will save you hours of heartache.
Another excellent file comparison tool is Beyond Compare - it truly is worth every penny that it costs (which is not much)
Probably the best tool to help in the discovery of what is happening in your JavaScript code is Firebug, a plug-in to Firefox. Google Chrome and IE have similar functionality, although each solution may lack feature (or have extra features) that the others don't.
And, I agree with everybody else - you need source control in a big way.
For file comparison tools, there is also the excellent and free WinMerge
Eclipse can do compare.
JsTestDriver is a wonderful testing tool.
But you will need to write unit tests for it.
A great tool is using firebug and the Webdeveloper toolbar plugins for mozilla firefox.

How to debug Javascript on old browsers

Forgive me if this has been asked elsewhere. I was not able to find a good answer yet. I have some Javascript code that works perfect in the latest release of Firefox. However, there is some odd behavior on an older browser that is used on our site. For reasons beyond my control, I need to support this hacked up version of a browser that is actually embedded into another piece of software.
I am stabbing in the dark as to the cause of the issues. I see no error console and of course tools like Firebug are a pipe dream. How do I effectively debug browser-specific issues? The old guess-and-check method will cost way too much time.
You can use Firebug Lite in IE6+ and older versions of FF/Opera/Webkit. The most useful feature of Firebug Lite in my opinion is probably the logging capabilities (console.log).
Checking the JavaScript for syntax errors before you even load the page with a tool like JSLint can save you some headaches. As a last resort, the reliable window.alert is always there.
It depends on the browser.
You may want to look at Firebug Lite for Firebug-like features in older and non-Mozilla browsers.
If the browser is weird enough that you really have to guess and check on the client side, I'd recommend writing a pretty good set of tests to run on every browser.
good luck with alert()'s
but you can try :
1) IE8 has the developer tools, that works fine in compatibility mode.
2) Firebug lite http://getfirebug.com/firebuglite#Stable
3) charge more from your damn clients that wants the thing to work in IE6
If you can make do with logging, my own logging library log4javascript works in every major browser released since 1999.

Is jWYSIWYG editor too buggy for production use?

After reading the comments on this site:
http://www.webresourcesdepot.com/jwysiwyg-jquery-inline-content-editor-plugin/
There is a bit of consensus that jWYSIWYG editor is too buggy (especially in the last few recent comments). Has anyone had experience with it in a large production site?
I haven't run a huge sample of markup through it yet, but so far it has seemed to do the job fine.
I have been using jwysiwyg (https://github.com/akzhan/jwysiwyg) for about 4 months now on several production sites and I have to say that it is the best lightweight wysiwyg editor that I have used. It is small, fast, and reliable. I strongly recommend it for anyone that doesn't need a full-featured editor. If you need to work with complex source code and html markup then this may not be for you, but for business-level users it works very well.
I am guessing that the original question and all comments until here are out-dated. This is a great plugin.
are u tried to find some other place where this editor can be located? for example: http://github.com/akzhan/jwysiwyg/downloads ? There u can find v. 0.9 released few days ago
This answer may no longer reflect the current state of the project.
Checkout out the current version on https://github.com/akzhan/jwysiwyg and decide yourself.
I don't know the project but I conclude: Don't use it (at least at the moment)
the google code page jwysiwyg contains no documentation
the download also doesn't contain any
there are 91 open issues in the tracker (which for such a small project isn't a good indicator)
last commit (r33) was on the 21. September 2009
the second-last commit (r32) was on 21. April 2009
so no frequent updates to codebase either
no new download file (current is jwysiwyg-0.5.zip which dates from January 2009), although he made 3 commits after publishing v0.5 of which:
2 contain fixes for issues
1 restructures directory layout and adds a minimal example to the codebase
jwysiwyg has grown year-to-year development activity and community.
It hosted on GitHub more than1 year, so feel free to use, fork, patch and do pull request.

Categories